I am trying to Install lead sample web service from gp2016 SDK for web services and getting erros on build like
Warning 1 The primary reference "Microsoft.Dynamics.Common" could not be resolved because it was built against the ".NETFramework,Version=v4.5.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". Microsoft.Dynamics.GP.Samples.Leads
Warning 2 The primary reference "Microsoft.Dynamics.GP.BusinessLogic" could not be resolved because it has an indirect dependency on the assembly "Microsoft.Dynamics.Common, Version=16.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which was built against the ".NETFramework,Version=v4.5.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". Microsoft.Dynamics.GP.Samples.Leads
and on saving Project getting below messages, folder is not read only and I am login with Administrator.
*This post is locked for comments
I finally changes target framework by editing it two more places and now able to create a dll. Thank you very much.
Thanks Derek for the reply.
This is what I did so far.
I installed web services from SDK 2016 and tried to follow the instruction mentioned in web services pdf for sample project.
when I open it on Visual Studio 2013, it opens fine.
when I try to BUILD the project for dlls it gives the warning messages which I shared earlier.
I followed your instruction and but still have the same issue.
I tried to change the framework to 4/5/1 but it returns back it to 4 and gives this message
Do I need to reinstall anything?
When you get the above error about the Microsoft.Dynamics.Common reference not being resolved because it was built against .NET 4.5.1, what exactly are you doing when you get this error? I.e. clicking on the 'Microsoft.Dynamics.GP.Samples.Leads' project file to open it in Visual Studio or something else?
The closest I could find on this was mentioned at this page:
It mentions the following:
The error occurs when the build version is a higher version number than the version that was pre-installed with the version of Visual Studio.
Workaround
The simplest workaround is to edit the modeling project file to ignore target framework version mismatches as follows:
1. Unload the modeling project by right clicking on it in Solution Explorer window and choosing Unload Project.
2. Open the project file into the editor by right clicking on it in Solution Explorer window and choosing Edit projectname.modelproj.
3. Add the following element inside the <Project> element:
<PropertyGroup>
<ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>true</ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>
</PropertyGroup>
4. Save the project file.
5. Right click on the modeling project in Solution Explorer and choose Reload Project.
6. Validate your architecture in the usual way.
Looking at this project, I can load it into Visual Studios fine and save it without any errors.
Thanks,
No it's not read only and even with selecting .NET Framework 4 it gives off the error.
If you right click and check the properties of the project file are not read only from file explorer.
I know you said this was ok for the folder, I'm checking with you that it is ok on the file.
Try setting your target framework in visual studio to 4.
You need to do this by going into the project properties (right click project in VS)
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156