Hi, I have downloaded the Sample C# project and referenced the dlls from my Quantify client install. I am getting an error during compile "The type or namespace name ‘Rental’ does not exist in the namespace ‘Avontus’(are you missing an assembly reference?)
Below are the references used. Can you please let me know if you get the same error.
Avontus Core v2.0.50727 version 126.96.36.199
Avontus.Rental.Library v4.0.30319 version 7.7.1174.112
Avontus.Rental.Utility v4.0.30319 version 7.7.1174.112
I just downloaded the sample to try it out and think I know the issue. I think the sample has not been updated to the most recent .net framework version which the later versions of the Quantify .dlls are built against. Were you also getting warnings like this?
warning MSB3274: The primary reference "Avontus.Rental.Library" could not be resolved because it was built against the ".NETFramework,Version=v4.6" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".`
We need to update the sample to compile targeting at least .Net 4.6. In the mean time, you can do the same by right-clicking on the project in the visual studio solution explorer, clicking properties, and changing the target framework to 4.6 or 4.6.1. We use Visual Studio 2015 here.
I have also updated both the samples to use .Net 4.6. You can re-download the c# one here or change the target framework in the sample you’ve already downloaded to 4.6.
Thank you, that works. I did try changing the framework but only had 4.5.2 installed. Upgraded to 4.6 and it compiled straight away. Cheers