开发者

creating a WCF client proxy with 3 solution windows open

开发者 https://www.devze.com 2023-01-14 17:54 出处:网络
My WCF service library, the console host for the service, and the client are all in separate Visual Studio solutions.Does this choice of organization impose a problem?I cannot seem to create the clien

My WCF service library, the console host for the service, and the client are all in separate Visual Studio solutions. Does this choice of organization impose a problem? I cannot seem to create the client proxy by using the Add Service Reference and Discovery features.

When I run the console hosted WCF service, then change focus to the Visual Studio solution for developing a client, invoke "add service reference" and "discover" it says "no services found in the solution". Do I have to develop the client code inside the sam开发者_如何学运维e Visual Studio solution as I have developed the host code? That would seem unreasonable.


Having several projects for your WCF solution is a great idea - definitely stick with that!

But you cannot run the WCF host application from within Visual Studio and then use Visual Studio to add the service reference, too, at the same time....

So what you need to do is run the service host application from outside Visual Studio (find the directory, double-click on the EXE to spin up the host) and then you can add the client service reference inside Visual Studio.


In such cases I usually use a single solution file containing all projects across all subsystems + separate solution files for individual subsystems. This allows me to develop the system as a whole, and, at the same time, build individual subsystems separately. This way you can overcome any “editing-time experience” shortcomings, while preserving good separation and independence of subsystems.


Solutions are meant to have multiple projects in them. They are meant to be the level of organization that contains all of the projects you are working on at a time.

No, it's not unreasonable to put all of those related projects into a single solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消