Packing a NuSpec file
See original GitHub issueI’m converting a part of our build which depended on using nuget pack
on a nuspec file directly to use dotnet pack
. I’ve read a number of threads on this, including dotnet/sdk#5525, and none seem to fit the scenario I have here.
The nupkg I’m trying to build is for the Roslyn compiler tools. This is a collection of projects which are built separately. There is no single project that builds the entire set of binaries that I can attach a <NuspecFile>
entry too.
I’ve tried creating a dummy csproj file just to drive the NuSpec file argument but that’s not working:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<NuspecFile>Microsoft.NETCore.Compilers.nuspec</NuspecFile>
</PropertyGroup>
<Target Name="Build" />
</Project>
Attempting to run dotnet pack
on this project still tries to build the project. That’s a huge step backwards for us. Particularly because there are ~30 nuspec files we need to migrate. Adding 30 new dummy builds is excessive here.
How can I use a nuspec file for a project that has no reasonable build story?
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (11 by maintainers)
Top GitHub Comments
This has come up before: supporting nuspec directly without a csproj file. I suggest filling an issue on nuget/home for that.
This issue was moved to NuGet/Home#6672