02-15-2017, 11:24 PM
(This post was last modified: 02-16-2017, 03:53 PM by BillC.)
I've got licences for DXEngine and PowerToys. Is there anyway I can change the Sample Projects so they compile and run?
I tried adding my license file, but that didn't work.
To be clear, my trial ran out long time ago, but I have current licenses and I'd like to run the samples to check behavior of some features I'd like to add. I can compile, but when I run the sample it tells me the trial has ended and I need a license. If I try adding my license file to the Sample project (DXEngine) the build fails saying "Could not load file or assembly 'Ab3d.DXEngine' or one of its dependencies." I've tried this with the DXEngine sample and PowerToys. I get other errors for PowerToys including "The type or namespace 'Assimp' could not be found (are you missing a using directive or an assembly reference?)" and a SignTool Error.
If I remove the license.licx file then both Sample projects build and run but then end quickly with the trial over message.
After a few private messages the problem was fixed.
Here are a few general hints that can help solve the problems with references in Ab3d.DXEngine (and other AB4D products):
Commercial version assemblies (Ab3d.DXEngine.dll and Ab3d.DXEngine.Wpf.dll) are different from the evaluation version assemblies. Commercial assemblies contain licensing code that allows them to be distributed with your project and can work on computers without installed Ab3d.DXEngine. Evaluation version assemblies always show evaluation info message.
The easiest way to know if the assembly is a commercial version, is to check its revision number (4th number in the version) - it should be bigger than 1000: 1045 (for .Net 4.5), 1040 (for .Net 4.0) or 1035 (for .Net 3.5); evaluation assemblies have revision numbers 45 (for .Net 4.5), 40 (for .Net 4.0) or 35 (for .Net 3.5).
Ab3d.DXEngine.dll v2.0.6178.1045 is a commercial version compiled for .Net 4.5. (v2.0.6178.45 is an evaluation version).
Commercial version installer installs its own samples projects to slightly different location then the evaluation version. The commercial samples are already set up to work with commercial version, so you do not have to change the references in the evaluation version samples to commercial version assemblies. The shortcut link to the samples directory can be found in the installation folder - for example in "C:\Program Files\Ab3d.DXEngine\" and also in the start menu (except in standard Windows 10 start menu).
If you want to use commercial version but you still get evalution info message when starting your application, check that the references are correct.
If you are referencing the Ab3d.DirectX.Client.Diagnostics and Ab3d.DirectX.Client.Settings projects, you also need to check the references to DXEngine in those two projects.
To check the actually used versions of assemblies when your application is running, you can use the Modules windows (can be opened from Debug - Windows menu).
If your references are correct, but your application is still loading the evaluation version, you can set the SpecificVersion element in csproj file to true. This will ensure that the version that you have specified will be used - otherwise the application could use some other version from some other source - for example from GAC.
Also check that the are no evaluation versions in GAC.
If you want to use a pre-release version and have problems, check that the dll-s are not blocked by Windows. Because pre-release versions are distributed with zip files, Windows can mark the dlls as unsafe because they come from internet. To solve that problem, right click on the dll file, select Properties and if there is a "Unblock" button in the lower right corner, click it.
Thanks for the help. I'm up and running again.
It was a case where I overwrote my DLL's with pre-release DLL's then forgot I had done that. When I restored the DLL's I didn't need a license file for the Sample projects and it all compiles and runs.