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