Upozornění NuGet NU5501
Scénář 1
The following dependency group(s) require(s) dots in the framework version: net50-windows7.0
Problém
Architektura skupiny závislostí musí obsahovat tečky do čísla verze architektury. To se vyžaduje pro architektury novější než net5.0.
K tomuto problému obvykle dochází, když je nuspec autor ručně, například:
<metadata>
<dependencies>
<group targetFramework="net50-windows7.0">
<dependency id=""Dependency"" version=""1.0.0"" />
</group>
</dependencies>
</metadata>
Řešení
Změnit net50 na net5.0.
<metadata>
<dependencies>
<group targetFramework="net5.0-windows7.0">
<dependency id=""Dependency"" version=""1.0.0"" />
</group>
</dependencies>
</metadata>
Scénář 2
The following packaged file folder(s) require(s) dots in the framework version: contentFiles/any/net50/a.img.
Problém
Složky označující architekturu musí obsahovat tečky do čísla verze rozhraní. To se vyžaduje pro architektury novější než net5.0.
K tomuto problému obvykle dochází při ručním přidávání položek do balíčku pomocí něčeho podobného ve vaší .csproj:
<ItemGroup>
<None Include="a.img" Pack="true" PackagePath="contentFiles/any/net50" />
</ItemGroup>
nebo nuspec:
<files>
<file src="resources/a.img" target="contentFiles/any/net50" />
</files>
Řešení
Změnit net50 na net5.0.
<ItemGroup>
<None Include="a.img" Pack="true" PackagePath="contentFiles/any/net5.0" />
</ItemGroup>
nebo nuspec:
<files>
<file src="resources/a.img" target="contentFiles/any/net5.0" />
</files>