How to generate files during build using msbuild

后端 未结 2 824
不知归路
不知归路 2020-12-30 06:27

Does anyone know how to modify a csproj file in a way to generate code files during build without actually referencing the files?

A process like :

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-30 06:37

    I wanted to use a bash script to generate code for a project using dotnet core on Linux. Here is what worked for me. And thanks @stukselbax, I built this off of your answer.

      
        
          
        
        
          
          
        
      
    

    Note that the script I'm using to generate the code is called generatecode.sh. Replace this with your own.

提交回复
热议问题