-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Encountered conflict" build messages reported for satellite assemblies during build of .NET Core project #1465
Comments
/cc @nguerrera |
Looks like we're not computing the output path correctly. We don't wack either of them but it'd be nice to avoid that log spew. Here's the code that tries to compute the output path: Can you share the full set of metadata on those resource DLL items so that we can see what we're missing? |
I have these dlls. How do I go about getting their metadata? |
@AmadeusW you'd need the symbols. What is it you're trying to do exactly? |
I'm trying to see how does it happen that |
Typically you start debugging the msbuild targets by examining logs. If you determine that you need to debug a task its often simplest to just build a copy of that task locally and then use that one (so that you're sure you have symbols).
Just to be clear, these targets aren't doing anything to strip the info, so if you see that happening in the output directory it would be the root cause and not this. The task I mentioned would just be noticing that these would be clashing in the output and you'd need to look earlier in the build to see what wasn't passing the resource directory through. |
Yeah, it looks like there is a different root cause here that's worse than just a message. A better way to state this issue is:
In non-SDK projects the subfolder was controlled with locale info from the lock file. See https://github.com/NuGet/NuGet.BuildTasks/blob/057af5b6ff9521551cf6dcee5cd737993a943472/src/Microsoft.NuGet.Build.Tasks/ResolveNuGetPackageAssets.cs#L782-L789. This gets set to TargetPath by the task that raises items. In SDK projects it looks like NuGet populates this as locale metadata on the FileDependencies item, but SDK doesn't do anything with it. The bug appears to be in the SDK targets. The place to look at for a potential fix is likely here: sdk/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.PackageDependencyResolution.targets Lines 505 to 540 in 98ea6b2
|
@AmadeusW What version of Visual Studio (if any) are you using and what NET Core SDK are you using: That looks like #1360 which was fixed in version 2.0 of the .NET Core SDK. You should try again with Visual Studio 15.3 (if you're using VS) and https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-core-2-0/ Alternatively, if for some reason you can't upgrade, there is a workaround described for older SDK versions in the linked bug. |
@nguerrera The problem is continue with Core 2.0 SDK and VS 17.3 6> Encountered conflict between 'Platform:System.Security.Cryptography.Csp.dll' and 'Runtime:C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.security.cryptography.csp\4.3.0\runtimes\unix\lib\netstandard1.3\System.Security.Cryptography.Csp.dll'. Choosing 'Platform:System.Security.Cryptography.Csp.dll' because AssemblyVersion '4.1.0.0' is greater than '4.0.1.0'. |
@mehmetilker you seem to be discussing something different. That isn't a resource assembly and the message you are seeing is merely conflict resolution working by design. It's choosing the higher versioned assembly from the platform rather than one from a package. If you have a specific question about that, open a new issue please. |
…unt in conflict resolution Fixes dotnet#1465
@ericstj How can we force it so that the assembly from the package gets preference over the one from the platform? |
Give it a higher version. See https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/ConflictResolution/ConflictResolver.cs. |
Repro:
The build succeeds but the log contains messages like:
The text was updated successfully, but these errors were encountered: