How to make multiple .net projects copy links only once in assembly

I have a solution with several MVC projects and libraries, and building this solution is very slow.

To improve the assembly performance, I changed all the projects to the output in the same folder and changed all the project links to copy local = false, which improved the assembly performance by almost 90%, from 10 m to 1 m30.

However, this generated a problem; at runtime, my application detects errors because it does not have assembly references in the output folder.

I would like to know if there is a way for the solution to copy links only once to my output folder.

I tried something, as the goal is to copy the dll from the packages folder to the output folder, but this does not work correctly, because DLLs from many versions of the framework may exist in the packages folder.

Any ideas to solve this problem?

+4
source share
1 answer

, CopyLocal = False, ( , ), CopyLocal = True. , , . , .csproj , OutputPath , .

, , CopyLocal True, , , . . SkipCopyUnchangedFiles, true , - :

msbuild my.sln /p:SkipCopyUnchangedFiles=True

hardlinks , , :

msbuild my.sln /p:CreateHardLinksForCopyLocalIfPossible=True

:

msbuild my.sln /p:CreateSymbolicLinksForCopyLocalIfPossible=True

, , , , A.dll, A.dll, .., , .

+1

Source: https://habr.com/ru/post/1684636/


All Articles