Nuget - packing a solution with multiple projects (targeting multiple frameworks)

前端 未结 1 485
执笔经年
执笔经年 2021-02-01 21:45

Say I have the following solution with multiple versions of the same code each targeting a different framework and I would like to generate a nuget package from it.



        
1条回答
  •  粉色の甜心
    2021-02-01 22:10

    No, there's currently no way to do this other than to write a custom build script that puts the files in the right place and then runs NuGet pack on them, or to take the .nuspec approach you described.

    This is a feature we'd like to have, but haven't thought of a good way to do it. However, your post just gave me an idea.

    Today, you can point nuget pack at a .csproj file.

    We could consider an approach that allowed you to point it at a .sln file and if the project names follow some convention, we'd package all the projects into a single package.

    If you really want this feature, consider logging an issue in the NuGet issue tracker. http://nuget.codeplex.com/workitem/list/basic

    0 讨论(0)
提交回复
热议问题