Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Bugfix/495 dotnet build #496

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

johncrim
Copy link

This commit fixes #495 , which I opened. I believe it's reasonable to skip the sn.exe step when building under dotnet, since strong-naming is discouraged for non-.NET Core SDK libraries and apps.

John Crim and others added 2 commits April 11, 2017 22:55
Fixes microsoft#471 due to missing Microsoft.VisualBasic.dll assembly, and after that an invalid reference to Microsoft.Research/Contracts/MsCorlib/MsCorlib.Contracts.csproj.
Disable sn.exe in VS 2017 code contracts targets, to allow code contracts to build within "dotnet build" or "dotnet test".

.NET core does not support sn.exe nor `GetFrameworkSdkPath`
@yaakov-h
Copy link
Contributor

If sn.exe doesn’t exist in in .net core sdk, how does it do strong-name signing (on Windows)?

@microsoft microsoft deleted a comment from msftclas Sep 27, 2017
@johncrim
Copy link
Author

From the examples I've seen (eg https://github.com/aspnet/Logging/blob/dev/Directory.Build.props ), sn.exe is run outside of the msbuild blah.csproj or dotnet build process.

@yaakov-h
Copy link
Contributor

Lines 8 and 9 in that file suggest otherwise.

@johncrim
Copy link
Author

johncrim commented Sep 28, 2017

@yaakov-h : My last comment didn't provide a useful answer. Directory.Build.props defines an msbuild property reference to the .snk file, and properties in that file become part of all the msbuild file in project subdirectories.

However, none of the above answers "how is strong-naming done in dotnet core projects". I haven't yet been able to find an answer to that, but indications are that strong-naming isn't done by the default dotnet msbuild targets. This topic deserves further research before merging my fix.

Framework NuGet package servicing and the GAC don't apply to .NET Core on non-Windows OSes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build with CodeContracts fails with dotnet build
4 participants