Personalized Community is here!
Quickly customize your community to find the content you seek.
Now Available in Community - New TechTalk Videos for 2021
2022 Release Wave 1 PlanDynamics 365 release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
2022 release wave 1 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
Before the nuget packages were introduced I had my reference in the C# projects, set up similar to the CRT examples and I didn't have to update the version number after each standard version upgrade.
Then the Nuget packages were introduced and it all changed. My projects are still Class Library (.NET Framework) projects. I didn't change them all over to be .NET Standard class libraries.
Looking at the CRT examples, I see the projects use also a variable for the version number, same as before the Nuget package introduction, except this variable has a different name:
However the CRT sample examples are all .NET Standard class libraries.
If I add the "$(ChannelRepoPackagesVersion)" version number to my .NET Framework projects, on compilation it tells me that it downgrades the Framework package for example.
Warning NU1605 Detected package downgrade: Microsoft.Dynamics.Commerce.Runtime.Framework from 10.0.20344.2 to 10.0.20303.3. Reference the package directly from the project to select a different version. TMCRoundUpDownCRT -> Microsoft.Dynamics.Commerce.Runtime.Services.Messages 9.24.20345.1 -> Microsoft.Dynamics.Commerce.Runtime.Framework (>= 10.0.20344.2) TMCRoundUpDownCRT -> Microsoft.Dynamics.Commerce.Runtime.Framework (>= 9.24.0) TMCRoundUpDownCRT
Currently, every time I upgrade to the next version, I have to go into every single project and click on Manage Nuget Packages and update the version for each package in every project.
This is very time consuming.
Is there a way to use the same variable as the example samples for .NET Framework class libraries projects and not have it downgrade the packages?
Any help is much appreciated..
Hi Retha,I am researching this; and will let you know what I find out.
Just keep in mind, because we use class library (.Net Framework) and not .Net Standard, we do not have a Dependencies node in our C# projects, we have a References-node.
If I use the floating version numbering, then I can only add the asterisk on the 3rd number. So the moment the 1st or 2nd number changes on the next upgrade, I have to manually change all of the nuget package versions manually again.
So for the v10.0.14 we are currently on, the actual version number is 9.24.20345.1
The previous hotfix version of v10.0.14 was 9.24.20340.1
So a floating version number of 9.24.* builds the project correctly without errors.
However I have no idea if it picks up the correct version because if I right-click on the References-node in my project and choose Manage Nuget Packages, I see the following:
So, is it downgrading to v9.24.0 when it builds the project or is it actually building with v9.24.20345.1? It doesn't give me a downgrading message, but looking at the Nuget Package Manager I also cannot trust that it uses the latest version.
So being able to use the variable that is in the Microsoft CRT examples, would be nice because I assume it has the variable set up somewhere with the latest version number.
Here is what I have been able to find out.
It appears that somewhere they are using the wrong version number; and that is why the warning message is coming up.
If you do not want to go and update all the projects individually for each version, you can have one build prop file and update the version number there.
Ex: In our SDK we have the Directory.Build.props, where all the version numbers are maintained, for each release they just have to update this file, by default this file will have the latest version number they downloaded.
In the extension project, use these variables for the package version:
Please let me know if this answers your question.
Thank you Todd
I have added to the top of my projects the import line for :
And to be sure it always uses the correct framework version, I added the following line to all the CRT projects:
<PackageReference Include="Microsoft.Dynamics.Commerce.Runtime.Framework" Version="$(FrameworkRepoPackagesVersion)" />
The retail server projects that uses Hosting.Contracts, is already from Version="$(FrameworkRepoPackagesVersion)"
And then I added Version="$(ChannelRepoPackagesVersion)" to all the package references that the project uses.. I made sure that I used the correct variable by comparing what the sampleExtensions are using for the same package reference.
All the projects built their DLLs without any errors.
Thanks for your help.
Business Applications communities