microsoft / Dynamics365Commerce.Solutions

Repository for hosting the Dynamics 365 Commerce end to end sample solutions
Other
58 stars 26 forks source link

Microsoft Store Commerce customizations Nugets use some outdated dll’s/references #222

Closed GoncaloTeixeira closed 10 months ago

GoncaloTeixeira commented 11 months ago

Discussed in https://github.com/microsoft/Dynamics365Commerce.Solutions/discussions/221

Originally posted by **GoncaloTeixeira** November 23, 2023 Microsoft Nugets provided to develop customizations to store commerce use some dll’s, which are not on the latest version available. For example Microsoft.Dynamics.Commerce.Sdk.Runtime nuget has the following dll version, Dll name Version in use Latest Version MicrosoftCSharp.dll 4.0.4.0 4.0.5.0 MicrosoftOpenAPI.dll 1.2.3.0 1.6.10.0 System.Security.AccessControl.dll 4.1.3.0 6.0.0.0 System.Security.Permissions.dll 4.0.0.0 7.0.0.0 System.Security.Principal.Windows.dll 4.1.4.0 5.0.0.0 There is any reason for not using the latest version ? Which one should we support as an ISV solution provider? We have already a client with this situation and had problems using our package because of these dll been duplicated with multiple versions on the same project. We have solved the situation updating our Nuget packages with the latest version of these dlls. But as an ISV we can’t support a individual version for each client with a different version of dlls. We need to understand which version should we support and if possible why. Thanks Gonçalo Teixeira
### Tasks
Pikhulya commented 10 months ago

There will always be a moment in time where the SDK we ship doesn't reference the latest available nuget packages.

Can you please explain with specific example why that creates issues for you? You should be able to reference any assemblies you need in your extensions, assuming they are targeting .netstandard2.0/.NET 6, with the only exception of:

  1. Microsoft.Extensions.*
  2. Microsoft.ApplicationInsights.*
  3. Those which are located under RuntimeEnvironment.GetRuntimeDirectory()

In the above cases, even if you compile your extension referencing certain versions of the above DLLs, the runtime will use those which are part of the base CSU, given the newer versions of CSUs reference newer packages, it is good idea to keep CSU Auto Upgrade ON.

Pikhulya commented 10 months ago

Closing given no further comments/questions, if you still need help on this, please re-open.