Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Web Services Sample Project

Posted on by 447

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.
SaveAs.png

*This post is locked for comments

  • elmo Profile Picture
    elmo 447 on at
    RE: Web Services Sample Project

    I finally changes target framework by editing it two more places and now able to create a dll. Thank you very much.

  • elmo Profile Picture
    elmo 447 on at
    RE: Web Services Sample Project

    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.

    0363.4.png

    I followed your instruction and but still have the same issue.

    04548.2.png

    6114.3.png

    I tried to change the framework to 4/5/1 but it returns back it to 4 and gives this message

    0363.4.png

    Do I need to reinstall anything?

  • Verified answer
    RE: Web Services Sample Project

    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:

    blogs.msdn.microsoft.com/.../reference-could-not-be-resolved-error-when-validating-your-architecture-using-visual-studio-architecture-modeling-tools

    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,

  • elmo Profile Picture
    elmo 447 on at
    RE: Web Services Sample Project

    No it's not read only and even with selecting .NET Framework 4 it gives off the error.

    7128.SaveAs.png

  • Tim Wappat Profile Picture
    Tim Wappat 5,701 on at
    RE: Web Services Sample Project

    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.

    2018_2D00_02_2D00_06_5F00_12_2D00_30_2D00_46.jpg

    Try setting your target framework in visual studio to 4.

    2018_2D00_02_2D00_06_5F00_12_2D00_30_2D00_46.jpg

    You need to do this by going into the project properties (right click project in VS)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans