If you leave the project links, MSBUILD will copy all the project links in the form of DLLs to the target bin directory of the site, even if you installed these DLLs in the GAC, and I assume that you want to change this to the release level - so that the space can be saved .
I also assume that you intend to do this only in Release Release, and not in the development branch of your original control. Because if you do this in all branches of the source control, manual execution is the best and fastest way to do this for a one-time change.
To do this in MSBUILD, you need to create a custom task that can modify the project file. The project file is an XML file, so you can use XPath as your custom task in MSBUILD. In the project file, you will find tags for โfor your projects that you are referencing. You will need to replace them with tags.โ Use existing tag examples in your project to see how it should look.
Sorry, I donโt have a sample code for this - doing it this way will be a little deliberate, as there will be many things that need to be taken into account, and this may not be feasible.
source share