How to get version number in post-build event

后端 未结 4 1968
遥遥无期
遥遥无期 2021-02-01 22:44

I want to use post-build event to automatically create a nuget package and then copy it to a shared folder on our network, something like this (the version number 1.0.0.0. is sp

4条回答
  •  野性不改
    2021-02-01 23:13

    This post build script works for me. It packages and publishes my dev versions on each build. Pretty simple.

    del $(ProjectDir)bin\Debug\*.nupkg
    "$(ProjectDir)NuGet.exe" pack "$(ProjectDir)MyProject.csproj"
    forfiles /P $(ProjectDir)bin\Debug\ /m *.nupkg /c "cmd /c "$(ProjectDir)NuGet.exe" push @FILE -Source \\SHARE\NuGet"
    

提交回复
热议问题