Tuesday, October 6, 2020

D365FO | how to change the target Framework

In D365FO, when a project is created in Visual Studio, it is targeted to the value of "at that time" .NET Framework, for example 4.5.2 or 4.6. This can cause the following warning when building or compiling a project which has the a reference from the newer version.


Warning The primary reference "ABCXXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" could not be resolved because it was built against the ".NETFramework,Version=v4.8" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.6". MyXYZModel (ISV) [my XYZ Model] C:\Program Files (x86)\MSBuild\Microsoft\Dynamics\AX\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets 76




Solution

I follow this useful url.

1. Unload your D365FO project.


2. Edit the rnrproj file


3. Find "TargetFrameworkVersion" tag, and change the value to your desired version.




4. Reload your project.




No comments:

Post a Comment