Possible to remove and add a reference to csproj programmatically via a batch file?

后端 未结 2 1263
夕颜
夕颜 2020-12-21 16:05

I am writing a short batch file to prepare a control library DLL with Examples project for deployment via sip file and have the following question.

Given a csproj f

2条回答
  •  忘掉有多难
    2020-12-21 16:10

    csproj files are XML files - you can easily write a command line application to manipulate these files (adding, removing nodes etc).

    You can call such a command line application from your batch file.

    You can find the schema for this file at:

    %windir%\Microsoft.NET\Framework\[framework version]\Microsoft.Build.xsd
    

    As described in this SO answer.

提交回复
热议问题