What do you do about references when unloading a project in Visual Studio?

前端 未结 4 1250
伪装坚强ぢ
伪装坚强ぢ 2020-12-18 03:39

When you unload a project in Visual Studio, any referencing projects get warning triangles on their reference to the unloaded project. I\'ve written myself a macro to do cle

4条回答
  •  误落风尘
    2020-12-18 04:09

    For my projects, I create an assemblies folder which the projects automatically copy into from a set location to which other projects copy builds.

    Post-build for referenced assembly's project:

    if not exist "C:\builds\Project1" md "C:\builds\Project1\"
    copy "$(TargetDir)$(TargetName).*" "C:\builds\Project1\"
    

    Pre-build for referencing projects:

    if exist "c:\builds\Project1\" copy "c:\builds\Project1*.*" "$(ProjectDir)assemblies"

    The project file points to its assemblies subfolder for references so even if the source projects are unloaded from the solution, the last-built assemblies will be used without the performance problems of having the whole project in memory while developing.

提交回复
热议问题