![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| | |||||||
| | Vista - vs2008 Add Service Reference generates Reference.cs which wont com |
| |
| 12-18-2007 | #1 |
| | vs2008 Add Service Reference generates Reference.cs which wont com I have tried several times to build the simplest WCF service lib in VS2008 - out of a dozen tries, the built in tools have worked once. 1. In vs2008, I create a WCF service library called WCFSvcLib, and compile it, goes OK 2. I create a small WinForm app to host it, add a ref to WCFSvcLib, that goes ok I can run the host, and start the service 3. I create a WinForm app as a Client, WCFClient 4. R-Click on the WCFClient Project/Add Service Reference/Discover The tool shows http://localhost:8731/Design_Time_Ad...b/Service1/mex I take the defaults, the service reference is added and Reference.cs is generated 5. When I then try to build WCFClient, I get the same 7 errors on 4 lines from Reference.cs. The lines are 89,94,85, and 11. The error is The type name 'ServiceReference1' does not exist in the type 'WCFClient.WCFClient' Here is a line from Reference.cs that throws the compile error public interface IService1Channel : WCFClient.ServiceReference1.IService1, System.ServiceModel.IClientChannel {} In the WCFClient form1.cs, if I type using WCFClient. the IDE shows me ServiceReference1 But it wont build |
| My System Specs |
| 12-18-2007 | #2 |
| | RE: vs2008 Add Service Reference generated Reference.cs wont compile An interesting detail - in the project that finally took the Service Reference, I can add service methods, rebuild the service, update the service reference in the IDE, and all is well. But in the projects which refused the Reference.cs, nothing I do will make them build - even though they are line for line the same. Did I say any help would be appreciated? It would... "BillInPA" wrote: Quote: > I have tried several times to build the simplest WCF service lib in VS2008 - > out of a dozen tries, the built in tools have worked once. > > 1. In vs2008, I create a WCF service library called WCFSvcLib, and compile > it, goes OK > 2. I create a small WinForm app to host it, add a ref to WCFSvcLib, that > goes ok > I can run the host, and start the service > 3. I create a WinForm app as a Client, WCFClient > 4. R-Click on the WCFClient Project/Add Service Reference/Discover > The tool shows > http://localhost:8731/Design_Time_Ad...b/Service1/mex > I take the defaults, the service reference is added and Reference.cs is > generated > 5. When I then try to build WCFClient, I get the same 7 errors on 4 lines > from Reference.cs. > The lines are 89,94,85, and 11. > The error is > The type name 'ServiceReference1' does not exist in the type > 'WCFClient.WCFClient' > > Here is a line from Reference.cs that throws the compile error > public interface IService1Channel : WCFClient.ServiceReference1.IService1, > System.ServiceModel.IClientChannel {} > > In the WCFClient form1.cs, if I type > using WCFClient. > the IDE shows me ServiceReference1 > > But it wont build > > |
| My System Specs |
| 01-14-2008 | #3 |
| | Re: vs2008 Add Service Reference generated Reference.cs wont compile Hi Bill, Any luck with this? I seem to be having a similar problem.... Thanks! On Dec 18 2007, 2:33 pm, BillInPA <BillI...@xxxxxx> wrote: Quote: > An interesting detail - in the project that finally took the Service > Reference, I can add service methods, rebuild the service, update the service > reference in the IDE, and all is well. > But in the projects which refused the Reference.cs, nothing I do will make > them build - even though they are line for line the same. > > Did I say any help would be appreciated? It would..."BillInPA" wrote: Quote: > > I have tried several times to build the simplest WCF service lib in VS2008 - > > out of a dozen tries, the built in tools have worked once. Quote: > > 1. In vs2008, I create a WCF service library called WCFSvcLib, and compile > > it, goes OK > > 2. I create a small WinForm app to host it, add a ref to WCFSvcLib, that > > goes ok > > I can run the host, and start the service > > 3. I create a WinForm app as a Client, WCFClient > > 4. R-Click on the WCFClient Project/Add Service Reference/Discover > > The tool shows > > http://localhost:8731/Design_Time_Ad...b/Service1/mex > > I take the defaults, the service reference is added and Reference.cs is > > generated > > 5. When I then try to build WCFClient, I get the same 7 errors on 4 lines > > from Reference.cs. > > The lines are 89,94,85, and 11. > > The error is > > The type name 'ServiceReference1' does not exist in the type > > 'WCFClient.WCFClient' Quote: > > Here is a line from Reference.cs that throws the compile error > > public interface IService1Channel : WCFClient.ServiceReference1.IService1, > > System.ServiceModel.IClientChannel {} Quote: > > In the WCFClient form1.cs, if I type > > using WCFClient. > > the IDE shows me ServiceReference1 Quote: > > But it wont build |
| My System Specs |
| 01-14-2008 | #4 |
| | Re: vs2008 Add Service Reference generated Reference.cs wont compi Hi Brent - Yes, I think I have made some headway The issue was, I was selecting a WCF Class Library project type, that is I want the WCF to be insulated from the host app When you do so, there is an App.Config created in the WCF project That file's contents have to be copied into the Host App project's App.Config, as it contains all the service information. Also, I find that in order to generate the proxies, start the WCF service, then from a Client project on the Same Machine, add the service reference. Once you do so, you can take that client project to another machine and build/run it. But, I have been unsuccessful adding the service ref from another machine. I suspect that is because I havent aken the time to actually host the WCF in IIS. HTH - Good Luck, keep in touch "Brent Brown" wrote: Quote: > Hi Bill, > > Any luck with this? I seem to be having a similar problem.... > Thanks! > > > > On Dec 18 2007, 2:33 pm, BillInPA <BillI...@xxxxxx> > wrote: Quote: > > An interesting detail - in the project that finally took the Service > > Reference, I can add service methods, rebuild the service, update the service > > reference in the IDE, and all is well. > > But in the projects which refused the Reference.cs, nothing I do will make > > them build - even though they are line for line the same. > > > > Did I say any help would be appreciated? It would..."BillInPA" wrote: Quote: > > > I have tried several times to build the simplest WCF service lib in VS2008 - > > > out of a dozen tries, the built in tools have worked once. Quote: > > > 1. In vs2008, I create a WCF service library called WCFSvcLib, and compile > > > it, goes OK > > > 2. I create a small WinForm app to host it, add a ref to WCFSvcLib, that > > > goes ok > > > I can run the host, and start the service > > > 3. I create a WinForm app as a Client, WCFClient > > > 4. R-Click on the WCFClient Project/Add Service Reference/Discover > > > The tool shows > > > http://localhost:8731/Design_Time_Ad...b/Service1/mex > > > I take the defaults, the service reference is added and Reference.cs is > > > generated > > > 5. When I then try to build WCFClient, I get the same 7 errors on 4 lines > > > from Reference.cs. > > > The lines are 89,94,85, and 11. > > > The error is > > > The type name 'ServiceReference1' does not exist in the type > > > 'WCFClient.WCFClient' Quote: > > > Here is a line from Reference.cs that throws the compile error > > > public interface IService1Channel : WCFClient.ServiceReference1.IService1, > > > System.ServiceModel.IClientChannel {} Quote: > > > In the WCFClient form1.cs, if I type > > > using WCFClient. > > > the IDE shows me ServiceReference1 Quote: > > > But it wont build > > > |
| My System Specs |