Setting the version number for .NET Core projects - CSPROJ - not JSON projects

前端 未结 10 907
一个人的身影
一个人的身影 2020-12-02 08:58

This question is very similar to Setting the version number for .NET Core projects, but not the same. Using the latest stable version of .NET Core at the time of writing (1.

10条回答
  •  失恋的感觉
    2020-12-02 09:52

    To answer your question straight: The new SDK for msbuild is auto generating an assembly info file. You can suppress that using msbuild directives (to see the it by sample: invoke dotnet migrate on a project.json based project).

    But let me tell you my handling: I had multiple projects sharing the same version. I added a version.props file which contained a property group including a item named VersionPrefix. This file I included via the csproj file (Include statement). I also removed all AssemblyInfo.cs files and let the SDK generate them for me.

    I modify the version.props file during build.

提交回复
热议问题