Skip to content

Temporary workaround for AssemblyKeyName and Visual Studio 15.6

Visual Studio 2017 version 15.6 currently has a problem if a project signs an assembly with the AssemblyKeyNameAttribute: https://developercommunity.visualstudio.com/content/problem/209811/strong-name-signing-with-a-key-installed-in-a-cont.html.

One suggested workaround is to add this line in the project file:
<Features>$(Features);UseLegacyStrongNameProvider</Features>

If you have many projects and don't want to include this in every project file, you can create a system-wide configuration for all projects. Create the file %LOCALAPPDATA%\Microsoft\MSBuild\15.0\Imports\Microsoft.Common.props\ImportAfter\Sign.props (the file name can be different, but it must be at that location) with this content:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Features>$(Features);UseLegacyStrongNameProvider</Features>
</PropertyGroup>
</Project>

The workaround will be included in every build on that machine (for the current user account). Since I don't work on .NET Core projects, I don't know whether this breaks signed .NET Core builds.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options