You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Program Files\dotnet\sdk\2.1.2\Microsoft.Common.CurrentVersion.targets(2041,5): warning MSB3277: Found conflicts between different versions of "Microsoft.Win32.Registry" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [d:\Projects\FluentValidationBuildWarnings\FluentValidationBuildWarnings.csproj]
C:\Program Files\dotnet\sdk\2.1.2\Microsoft.Common.CurrentVersion.targets(2041,5): warning MSB3277: Found conflicts between different versions of "System.Security.Principal.Windows" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. [d:\Projects\FluentValidationBuildWarnings\FluentValidationBuildWarnings.csproj]
Hi, that's not really related to FluentValidation, but is caused by mixing different netstandard versions in the same project.
As the message says, setting the build log to detailed will show you what's happening. Essentially it's complaining because you're targetting netstandard2.0 but you're bringing in Microsoft.AspNetCore.Mvc 1.1 which targets netstandard1.6 and the .net sdk it's getting confused between different version of mscorlib (the .net core build process is still pretty buggy)
Nuget is bringing in microsoft.aspnetcore.mvc 1.1 because that's the minimum version supported by FluentValidation. But your project is targetting netstandard2.0, so you should be referencing microsoft.aspnetcore.mvc 2.0 instead. Add the following to your project and you'll see the warning goes away:
Alternatively if you actually meant to work with mvc 1.1 then you can safely ignore the warning if you don’t want to downgrade to netstandard 1.6. It don’t believe it actually causes any issues.
Also; if you upgrade to FluentValidation 7.3-beta2 you’ll see this doesn’t happen as it’s metadata explicitly targets different versions of Microsoft.AspNetCore.Mvc depending on which netstandard version you’re running on. So going forward you won’t run into this.
Activity
JeremySkinner commentedon Dec 7, 2017
Hi, that's not really related to FluentValidation, but is caused by mixing different netstandard versions in the same project.
As the message says, setting the build log to detailed will show you what's happening. Essentially it's complaining because you're targetting netstandard2.0 but you're bringing in Microsoft.AspNetCore.Mvc 1.1 which targets netstandard1.6 and the .net sdk it's getting confused between different version of mscorlib (the .net core build process is still pretty buggy)
Nuget is bringing in microsoft.aspnetcore.mvc 1.1 because that's the minimum version supported by FluentValidation. But your project is targetting netstandard2.0, so you should be referencing microsoft.aspnetcore.mvc 2.0 instead. Add the following to your project and you'll see the warning goes away:
Alternatively if you actually meant to work with mvc 1.1 then you can safely ignore the warning if you don’t want to downgrade to netstandard 1.6. It don’t believe it actually causes any issues.
JeremySkinner commentedon Dec 7, 2017
Also; if you upgrade to FluentValidation 7.3-beta2 you’ll see this doesn’t happen as it’s metadata explicitly targets different versions of Microsoft.AspNetCore.Mvc depending on which netstandard version you’re running on. So going forward you won’t run into this.
jincod commentedon Dec 7, 2017
FluentValidation 7.3-beta2works for meThanks a lot!