[英]Reference Path in Visual Studio not working when I unload the project in the same solution
I have an ASP.NET MVC
project with one solution and 52 projects in the same solution.我有一个
ASP.NET MVC
项目,其中一个解决方案和 52 个项目在同一个解决方案中。 As you know, It takes long time to build whole solution.如您所知,构建整个解决方案需要很长时间。 So I decided to unload some of the projects until there is some change or sprint task in the code in the unloaded project.
所以我决定卸载一些项目,直到卸载的项目中的代码有一些变化或冲刺任务。 However we are a team and use TFS version control and we need to use update unloaded assembly.
但是我们是一个团队,使用 TFS 版本控制,我们需要使用更新卸载程序集。 So I have a build server that makes me sure whenever somebody starts to check-in (for example ->
C:\bin
in our network) the last version of all assembly can be found there.所以我有一个构建服务器,它可以确保每当有人开始签入时(例如 ->
C:\bin
在我们的网络中),都可以在那里找到所有程序集的最后一个版本。
I added C:\bin
path as Reference Path to the UI Project (main project of the solution) of the solution and I expect when some projects is unloaded the reference comes to visual studio from the build server path ( C:\bin
) otherwise the reference of the project comes to Visual Studio from the nested project (not from build server).我添加了
C:\bin
路径作为解决方案的 UI 项目(解决方案的主项目)的参考路径,我希望当卸载某些项目时,参考来自构建服务器路径( C:\bin
)的 Visual Studio,否则项目的引用来自嵌套项目(而不是来自构建服务器)的 Visual Studio。
But the reference can not be found when the project is unloaded.但是卸载项目时找不到引用。
And my Build server contains the assembly我的构建服务器包含程序集
Finally I found a way (only in Visual Studio 2019) to unload projects and however use updated class library of unloaded projects.最后,我找到了一种方法(仅在 Visual Studio 2019 中)来卸载项目,但是使用更新的 class 卸载项目库。 And thanks to Hooman Bahreini for his idea of using two separated solutions.
感谢Hooman Bahreini提出的使用两个分离解决方案的想法。
The way is that, there is a feature of Visual Studio 2019 that we can Save As Solution Filter
which is in .slnf extensions.方法是,Visual Studio 2019 有一个功能,我们可以将其
Save As Solution Filter
为.slnf扩展名中的解决方案过滤器。 So I can unload some of my projects and check-in .slnf file via my source control (like tfs).所以我可以卸载我的一些项目并通过我的源代码管理(如 tfs)签入.slnf文件。 So I have two solutions Now, one is .sln which is contains all of projects and the other one is .slnf which is unloaded some of projects in it.
所以我现在有两种解决方案,一种是.sln ,它包含所有项目,另一种是.slnf ,其中卸载了一些项目。
The things can we do is that whenever I want to get my project I have to use .sln file and builds that and then close the file and then open the .slnf file (I'm sure that I have updated class library of unloaded projects) and do my task and check-in my changes.我们可以做的事情是,每当我想获得我的项目时,我必须使用.sln文件并构建它,然后关闭文件,然后打开.slnf文件(我确定我已经更新了 class 未加载项目的库) 并完成我的任务并签入我的更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.