web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Web Services Sample Project

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Tim Wappat Profile Picture
    5,711 on at

    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)

  • elmo Profile Picture
    447 on at

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

    7128.SaveAs.png

  • Verified answer
    Derek Albaugh Profile Picture
    on at

    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
    447 on at

    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?

  • elmo Profile Picture
    447 on at

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans