Open
Description
Issue moved from NuGet/Home#10438
- Please respond to @weltkante.
From @weltkante on Friday, January 8, 2021 4:19:41 PM
Details about Problem
In #4989 alias support for PackageReference was added, but when I try to create an alias to a framework-provided package this does not appear to work.
In particular, in a .NET 5 web application I add
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" Aliases="logging" />
but extern alias logging;
does not compile:
error CS0430: Der externe Alias "logging" wurde nicht in einer /reference-Option angegeben.
If I instead do it in a console application it indeed does work.
Using VS 2019 Update 9 Preview 2