简体   繁体   English

来自另一个解决方案的参考项目

[英]reference project from another solution

I'm new in c# my question is how could I reference between 2 project in different solutions?我是 c# 的新手,我的问题是如何在不同解决方案中的 2 个项目之间进行引用?

I tried add project reference but it's just work for project that is in the same solution and I didn't find any helpful resources on the internet我尝试添加项目参考,但它只适用于同一解决方案中的项目,我没有在互联网上找到任何有用的资源

You cannot reference projects from different solutions.您不能引用来自不同解决方案的项目。 What you can do is add the existing library project to the solution you want to reference it in. In the Solution Explorer, right-click the solution and select Add -> Existing Project .您可以做的是将现有的库项目添加到您要在其中引用它的解决方案中。在解决方案资源管理器中,右键单击该解决方案并选择添加 -> 现有项目 You can then navigate to the project file of the project you want to reference and it will be added to the solution.然后,您可以导航到要引用的项目的项目文件,该文件将添加到解决方案中。 The project will not be copied or modified at all.根本不会复制或修改项目。 The path of the project is simply added to the solution file, which you can view in a text editor to see for yourself if you like.项目的路径只是添加到解决方案文件中,您可以在文本编辑器中查看,如果您愿意,可以自己查看。 It's then treated like any other project in that solution, including for the purposes of referencing.然后像该解决方案中的任何其他项目一样对待它,包括出于引用目的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在同一解决方案中使用另一个项目的引用 - Use reference from another project at the same solution 将服务引用从一个项目复制到同一解决方案中的另一个项目 - Copy service reference from one project to another project in same solution 从其他解决方案呼叫参考 - Call reference from another solution 在解决方案中添加另一个外部项目的参考 - Adding reference of another external project in a solution 来自项目配置的参考解决方案配置 - Reference solution config from project config 从同一解决方案C#中的另一个项目引用Web.Config文件 - Reference Web.Config file from another project in same solution C# 解决方案中从一个项目到另一个项目的数据传输 - Data transfer from one to project to another in a Solution 绑定到同一解决方案中另一个项目的属性 - Bind to property from another project in same solution 是否可以在另一个解决方案中从 ASP.NET Webforms 项目中引用 ASP.NET Core 2.0 类库 dll? - Possible to reference an ASP.NET Core 2.0 class library dll from an ASP.NET Webforms project in another solution? 无法从我的解决方案中的新项目添加新引用 - Can not add a new reference from an new project in my solution
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM