Closed paulomorgado closed 10 months ago
Not sure, can you create a PR to fix it?
The use of a NuSpec file is intended or legacy?
Can we move that to using dotnet pack
/msbuild -t:pack
?
I think using csproj to guide pack is always better, as long as the output is identical.
NSwag.AspNetCore also depends on NSwag.Generation.AspNetCore which has upper limits on Microsoft.Extensions.DependencyInjection.Abstractions and Microsoft.Extensions.Options. Can these upper limits also be removed?
Just created #4642 to remove the upper limits.
The usage of NuGet MSBuild targets to produce the packages will be addressed in a later PR.
Trying to upgrade our .NET 7 site to .NET 8 and we're running into this limit too. Is there any way to work around this until a fix is released?
Can you try adding a NoWarn
to the PackageReference
?
<PackageReference Include="NSwag.AspNetCore" Version="13.20.0">
<NoWarn>NU1608</NoWarn>
</PackageReference>
@paulomorgado - Thanks for sharing that snippet but it didn't work for me.
Here's what I ended up with:
<PropertyGroup>
<NoWarn>1701;1702;CA2007</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>$(NoWarn);NU1608</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
Just posting it here in case it helps someone else.
I get NU1107, and i'm unable to supress it via NoWarn:
MyProject.csproj : error NU1107: Version conflict detected for Microsoft.Extensions.FileProviders.Embedded. Install/reference Microsoft.Extensions.FileProviders.Embedded 8.0.0 directly to project MyProject to resolve this issue.
MyProject.csproj : error NU1107: MyProject -> AnotherProject1 -> AnotherProject2 -> AnotherProject3 -> Microsoft.Extensions.FileProviders.Embedded (>= 8.0.0)
MyProject.csproj : error NU1107: MyProject -> NSwag.AspNetCore 13.20.0 -> Microsoft.Extensions.FileProviders.Embedded (>= 7.0.0 && < 8.0.0).
Can sombody please make a pre-prerelease? The latest nuget pre-release is 14.0.0-preview12
, but latest git tag is 14.0.0-preview14
.
Yeah! Some NuGet warnings are hard or impossible to suppress.
Maybe you can find some help at https://github.com/NuGet/Home/discussions.
NSwag.AspNetCore has an upper version limit for Microsoft.Extensions.FileProviders.Embedded.
Is there a reason for that?
As it is, NSwag.AspNetCore is causing a NU1608 on projects targeting .NET 8.0.