[英]Can you have two projects of different types (i.e. a desktop project and a web project) in a single visual studio solution?
Let's say I have two C# projects: A and B. 假设我有两个C#项目:A和B。
I put them both in a single visual studio professional 2013 solution. 我将它们都放在一个单独的Visual Studio Professional 2013解决方案中。
However, though B smoothly runs on the web server (IIS-express), I cannot run A because visual studio seems to assume it's also a web application and only offers me to run it on IIS-express (though this project has program.cs class which brings in a static void main(...){}
method). 但是,尽管B可以在Web服务器(IIS-express)上顺利运行,但是我无法运行A,因为Visual Studio似乎假定它也是一个Web应用程序,并且只为我提供了在IIS-express上运行它的能力(尽管该项目具有program.cs会带来static void main(...){}
方法的类。
Two questions: 两个问题:
Can you put two projects of different nature (a desktop project and a web project) in the same solution? 能否将两个不同性质的项目(一个桌面项目和一个Web项目)放在同一解决方案中?
Shouldn't visual studio automatically realize A is a desktop project? Visual Studio不应该自动意识到A是一个桌面项目吗?
For sure you can have 2 projects from different types in one solution ( this is what the solution is made for). 当然,您可以在一个解决方案中拥有2个来自不同类型的项目(这正是解决方案的目的)。
And you should be able to run your A project regardless of B .. 而且您应该能够运行A项目,而不管B ..
Right click
on the project => Debug
=> Start New Instance
Right click
项目=> Debug
=> Start New Instance
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.