microsoft / Dynamics365Commerce.Solutions

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

upgrding to 9.43 Public contract validation failing #99

Closed Vekto closed 10 months ago

Vekto commented 1 year ago

We're receiving warnings during build in 9.43 from the added package check.

.nuget\packages\microsoft.dynamics.commerce.sdk.runtime\9.43.23118.5\build\Microsoft.Dynamics.Commerce.Sdk.Runtime.targets(62,5): warning : Error in public contract validation: .nuget\packages\microsoft.dynamics.commerce.sdk.runtime\9.43.23118.5\build\Microsoft.Dynamics.Commerce.Sdk.Runtime.targets(62,5): warning : ReflectionOnly loading is not supported on this platform. .nuget\packages\microsoft.dynamics.commerce.sdk.runtime\9.43.23118.5\build\Microsoft.Dynamics.Commerce.Sdk.Runtime.targets(62,5): warning : at System.Reflection.Assembly .ReflectionOnlyLoadFrom(String assemblyFile) .nuget\packages\microsoft.dynamics.commerce.sdk.runtime\9.43.23118.5\build\Microsoft.Dynamics.Commerce.Sdk.Runtime.targets(62,5): warning : at Microsoft.Dynamics.Commerce.Sdk.StoreCommerce.MSBuildTasks.CheckNonPublicContractReferencesUsage.IsPublicContract(String assemblyPath) .nuget\packages\microsoft.dynamics.commerce.sdk.runtime\9.43.23118.5\build\Microsoft.Dynamics.Commerce.Sdk.Runtime.targets(62,5): warning : at Microsoft.Dynamics.Commerce.Sdk.StoreCommerce.MSBuildTasks.CheckNonPublicContractReferencesUsage.Execute()

Pikhulya commented 1 year ago

I could not reproduce this issue in just cloned latest version from 9.43 without any modifications.

Are you seeing these warnings on the clean clone from GitHub or only when you add references to your assemblies?

How/where do you build that - from the command line? From VS Code? From Visual Studio Code? Please also outline the version of the tools (VS Code or Visual Studio) you use.

If you have not done so yet - please run the "install" command from within VS Code as described in the Debugging as there are number of prerequisite checks are performed at that time so if you are missing something that process might help you to find out what exactly prerequisite is missing.

Vekto commented 1 year ago

reproduces for me in 9.43 cloned from here. (no errors in visual studio though. just VSCode) building using the build-extension task in VSCode. VSCode Version both :1.71.2, and updated to 1.78.2 (latest) Using Visual studio build tools 2022 updated to 17.6.0 (latest). MSBuild version 17.6.1+8ffc3fe3d for .NET Current version of .NET Core SDK is '7.0.302'. from the CheckDotnetSdk.ps1. But I have the .Net Core 3.1.32 sdk also as per the pre-reqs.

installed sdk's 3.1.426 [C:\Program Files\dotnet\sdk] 6.0.401 [C:\Program Files\dotnet\sdk] 7.0.203 [C:\Program Files\dotnet\sdk] 7.0.302 [C:\Program Files\dotnet\sdk]

installed runtimes Microsoft.AspNetCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Pikhulya commented 10 months ago

We still are unable to reproduce it, are you still seeing this with recent versions of the SDK/Samples ?

Vekto commented 10 months ago

reproduces in 9.48 image

Pikhulya commented 10 months ago

Do those warnings prevent from building the assembly ?

Vekto commented 10 months ago

No, Can close this ticket if you're not able to reproduce, it must be something in our environment's with one of our .net versions

madyke commented 10 months ago

Closing since we're unable to repro the issue.