Open ghost opened 3 years ago
@aaronla-ms Is this related? https://github.com/NuGet/Home/issues/4254
@JonDouglas no. My question is how to generate a nuget using msbuild. The link you posted is asking how to generate nupkg without msbuild using just a nuspec.
We don't have a nuspec, we would prefer to use msbuild's nuspec generation for consistency with our C# nugets.
It sounded like you want to use NuGet and the SDK without a target framework. That's why I linked this other issue. i.e. decouple pack from target framework/project files.
Hmm, possibly. Though the other issue as filed does state:
I don't think these are duplicates. #4250 is about issues packing with csproj + nuspec. This one is about packing nuspec without a csproj file.
I do have a .csproj file (specifically, using Microsoft.Build.NoTargets), and i don't have a nuspec. I don't want to decouple from project files, just from framework.
@erinlah-ms I think this ask is similar to NuGet.Build.Packaging
(aka NuGetizer-3000). If NuGet team can bring that back, it would help in building complex packages like custom framework/runtime and meta packages without having to fiddle with C# project system.
For VS IDE, we might need barebones project system support which I think is already there but CPS team just need to enable it. Then, NuGet can extend it with little to no changes.
Details about Problem
Detailed in issue https://github.com/dotnet/msbuild/issues/6210
Presently, nuget client errors out during
dotnet restore
if a user's project does not specify either TargetFramework or TargetFrameworks. E.g. if I'm building a nuget package that contains only build scripts or tools, so has no dependency on any dotnet framework version.NuGet product used (NuGet.exe | Visual Studio | MSBuild.exe | dotnet.exe): dotnet 3.1.406 dotnet 6.0.100-preview.1.21103.13
Product version:
Worked before? If so, with which NuGet version:
Repro steps and/or sample project
Detailed in issue https://github.com/dotnet/msbuild/issues/6210
Verbose Logs
N/A