Wcf refresh file reference not updating

Android application project, set all the project properties to match your old project, and add all of your resources, source files, etc. 2) Make a backup copy of your original project's .csproj file, then open it in a text editor, and add back in the missing elements from a cleanly generated .csproj file.

After experimenting with these elements, you may notice that after adding back the elements and rebuilding the project, the Resource.file would update, but then you might still have to close and re-open the solution to get code completion to recognize the new types contained in Resource.

So in Reflector or other tools you’d only see what was output.

Given this you could be even more aboslutely explicit and do something like this: Using this conditional compilation method you’re doing a bit more ‘hard-coding’ than relying on changing configuration and not code, but it might be more suitable to your liking.

Obviously you don’t want to hard-code various endpoint names in your instantiation of the service proxies.

In fact, you may be struggling because you may push your code out via automated build servers and you don’t want to have to build the XAP, then change something, blah blah. For instance, here’s how I have the code in this project: Now I just have to make sure that my compile tasks add those conditional flags. You could use Visual Studio’s Configuration Build Manager to create new profiles, or you could also customize an MSBuild task to append those constants.

It is simple and there are plenty of resources to help you here.

wcf refresh file reference not updating-29wcf refresh file reference not updating-25wcf refresh file reference not updating-10wcf refresh file reference not updating-1

Being more explicit leads to easier code to read/track in my opinion. You forgot that your service reference had your local URI endpoint in there and when you moved it to staging and/or production it failed.I’m going to throw out what is my preferred mechanism and add some additional tips and tricks here that hopefully some are using. You have a Silverlight application and a web service.Now that you know that the client config file can have multiple configuration endpoints, how would you use them? If you take a look at the proxy code that gets generated for you when you (this is in the file when you use the ‘show all files’ option in VS) you’ll notice that the constructor for Hello World Service is overloaded to allow and endpoint configuration, or optionally explicit binding/endpoint address information.It’s the former that will make this easier for you.

Leave a Reply