I have two projects in my solution. First project is web site (actually web service) and other project is console app.
Is it possible to add reference in second project to the first one ? Under web site project I have some code I'd like to use it in console app.
I can add reference from web site to the second console project 开发者_开发知识库but I don't need nor want this. This second project is just for some testing purposes.
You should create a third project, of the type Class Library
. And then you make both the other projects reference that.
As it says on this MSDN page about the available project templates: Use the Class Library template to quickly create reusable classes and components that can be shared with other projects.
Ran into the same scenario. You need to open 2 instances of Visual Studio, load up your solution in both as administrator, debug your web service in the 1st instance, then add the service reference in the 2nd instance to your console project.
精彩评论