How to read property value from external file?

后端 未结 5 1715
死守一世寂寞
死守一世寂寞 2021-01-04 09:54

I have AssemblyInfo.cs file automatically generated during build. Here\'s part of .csproj file:


    2
    &l         


        
5条回答
  •  执念已碎
    2021-01-04 10:38

    If it's locking of the csproj files by VS that's your concern, my answer to this question - How to turn off caching of build definitions in Visual studio might help you.

    You could move the content of your BeforeBuild task (including the version propertygroup) into a separate proj file and invoke it with an MSBuild task (using a random filename generated by the example in the linked answer above). This would allow you to manually edit your version number properties without having to unload/load your csproj file.

提交回复
热议问题