简体   繁体   English

当我在同一解决方案中卸载项目时,Visual Studio 中的引用路径不起作用

[英]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.

相关问题 如何在Visual Studio中设置解决方案的引用路径? - How to set the reference path for the solution in Visual Studio? 从Visual Studio 2010解决方案中卸载.vdproj(Visual Studio部署项目) - Unload .vdproj (visual studio deployment project) from visual studio 2010 solution 在Visual Studio中的相同解决方案中引用项目 - Referencing a Project in the Same Solution in Visual Studio 将项目添加到Visual Studio解决方案时的问题 - Question when adding a project to a Visual Studio solution 拒绝访问路径“(临时文件夹)”。 将项目或类文件添加到我的Visual Studio解决方案时发生 - Access to the path '(Temp Folder)' is denied. Happens when adding a project or class file to my Visual Studio solution Visual Studio C#项目参考无法正常工作 - Visual Studio C# Project Reference not working Visual Studio 可扩展性 - 卸载当前项目 - Visual Studio Extensibility - Unload current project VS 2010 Visual C# - 在同一解决方案中引用其他项目 - VS 2010 Visual C# - reference other project in same solution 从 Visual Studio 2019 中的 C# 解决方案返回 cmake 项目时,Resharper 智能感知停止工作 - when going back to cmake project from C# solution in visual studio 2019 Resharper intellisense stops working 同一解决方案 Visual Studio 中每个项目的不同测试设置 - Different Test Settings per project in same solution Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM