Avviso NuGet NU5501

Scenario 1

The following dependency group(s) require(s) dots in the framework version: net50-windows7.0

Problema

Il framework del gruppo di dipendenze deve includere punti nel numero di versione del framework. Questa operazione è necessaria per i framework più recenti di net5.0.

Questo problema si verifica in genere quando un nuspec viene creato manualmente, ad esempio:

  <metadata>
      <dependencies>
          <group targetFramework="net50-windows7.0">
              <dependency id=""Dependency"" version=""1.0.0"" />
          </group>
      </dependencies>
  </metadata>

Soluzione

Cambia net50 in net5.0.

  <metadata>
      <dependencies>
          <group targetFramework="net5.0-windows7.0">
              <dependency id=""Dependency"" version=""1.0.0"" />
          </group>
      </dependencies>
  </metadata>

Scenario 2

The following packaged file folder(s) require(s) dots in the framework version: contentFiles/any/net50/a.img. 

Problema

Le cartelle che denomettono un framework devono includere punti nel numero di versione del framework. Questa operazione è necessaria per i framework più recenti di net5.0.

Questo problema si verifica in genere quando si aggiungono manualmente elementi a un pacchetto, usando un aspetto simile al seguente in .csproj:

<ItemGroup>
  <None Include="a.img" Pack="true" PackagePath="contentFiles/any/net50" />
</ItemGroup>

o un nuspec:

  <files>
    <file src="resources/a.img" target="contentFiles/any/net50" />
  </files>

Soluzione

Cambia net50 in net5.0.

<ItemGroup>
  <None Include="a.img" Pack="true" PackagePath="contentFiles/any/net5.0" />
</ItemGroup>

o nuspec:

  <files>
    <file src="resources/a.img" target="contentFiles/any/net5.0" />
  </files>