Optimizing Visual Studio solution build - where to put DLL files?

后端 未结 3 1190
礼貌的吻别
礼貌的吻别 2021-01-06 01:49

I found out that build time of C# solution with many projects gets much faster if you don\'t have \"copy local\" enabled everywhere. I did some tests and it seems that (for

3条回答
  •  醉酒成梦
    2021-01-06 02:32

    We retarget the output directory of projects to be ../../Debug (or ../../Release) Our libs are placed in these directories as well.

    We set the reference paths in each project to be the Debug or Release directory accordingly (this setting is persisted in the user files since it is an absolute rather than relative reference)

    We keep project references as project references, All dll references have copy local false and specific version false unless they are system level dlls we know will be in the GAC on all deployed machines.

    This works a treat and manual builds in the IDE mimic scripted builds from the command line (using MSBuild)

    Test projects not for deployment do not direct their output to the centralized Debug|Release directory, they just use the standard default location (and do use copy local to avoid issues with locking)

    The library versions may be changed by the automated build process replacing the dlls in the Debug and Release directories.

提交回复
热议问题