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

后端 未结 2 1264
夕颜
夕颜 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:15

    I don't understand why you would need to modify the csproj file in your case. Just make sure the library reference in the csproj file is relative, i.e. ..\..\..\SDK\WPF\4.0\ControlLibrary.dll and it will keep working fine even if you move the complete folder hierarchy to a new location.

    If you're trying to simplify adding the library to new projects though, take a look at NuGet. It's the best way for distributing and deploying libraries.

提交回复
热议问题