how to auto update Service References in window phone 7 - windows-phone-7

I have add Service References in my app. References Service is always changing, so I want auto update References Services when in server is update ?
How to update ?
Thank you !

That's not possible. As with any other type of project, Visual Studio will generate the proxy classes when you create the service reference or when you manually update it by right clicking it and selecting "Update Service Reference".

A possibility would be to built up proxy classes dynamically everytime you run the app. An example of an applications that does this is the OData Explorer available here http://www.odata.org/developers/odata-sdk including source.
Good luck!

Related

How should I add images using PhoneGap and Windows Phone 7?

I am new to using PhoneGap for windows phone 7.
I'm not entirely sure what the problem is - when I try to add an existing image, it's not added to the CordovaSourceDictionary.xml file, but if I manually add the image to CordovaSourceDictionary.xml, it is deleted when I build. How should I fix this problem?
Here is a tutorial by Daniel Egan. Also I have some other links for you
Tutorial: how to create HTML5 applications on Windows Phone thanks to PhoneGap.
Getting Started with Windows Phone.
Getting Started with Windows 8.
Apache Cordova Documentation.
Hope this will help you.
Check image Build Action property (Solution explorer, item Properties view). It must be set to Content, (when you add image, by default this property value is Resource)
CordovaSourceDictionary.xml is updated by the build process which relies on the way Visual Studio works. You need to trigger a file update, you know, like Right click on the Solution > Add > Add new folder / Existing item etc.
What I do is drag the file from Windows Explorer into the Visual Studio project and drop it in the images folder. NOW Visual Studio knows you have add a new file and when you run the project CordovaSourceDictionary.xml gets automagically updated with your changes.
Keep up the good fight!
This probably isn't what is breaking your system, but the JS framework I use adds a url query to each image when in a debugging mode (in order to force browsers to reload image, instead of using cached). So, my image "image/background.jpg" would be accessed as "image/background.jpg?d=34342233". But, when running on phoneGAP for Windows Phone, it won't recognize the image, and thus it shows up as broken. So, I had to turn off debugging for the framework I use, and suddenly the images showed up. Don't forget to set the Build Action to "Content" as mentioned earlier.

How do I add a .svc file in Visual Studio

I have a file with an .svc extension. First question is what is a .svc file? The second question is how do I create one of these from the Visual Studio add item menu? I've tried all the most obvious options but none of them create a .svc file.
In my experience, an SVC file is a WCF service - create a WCF application from the projects list and then do an "Add new item" and add a new WCF service.
For it to do anything it will need the appropriate bindings and endpoints configuring and wiring up - before it can be called.
See also: WCF service. Where to add . svc file
Q1: what is a SVC file ?
A1: A class for creating a WCF service.
Q2: how do I create one from the VS Add New Item menu ?
A2: I'm assuming you're working with C# here but that's just a detail.
Go to Add New Item
Look for the node that says Web and click it (make sure you haven't selected one of the sub nodes!)
In the middle column look for WCF Service
That's all there is to it ;-)

Unable to add a view to some projects using Smart Client Factory 2010

I used to be able to add a view using the Smart Client Factory context menu in solution manager.
However now the only option available is "Create Disconnected Service Agent".
Having said that one of the projects has the "Add View" menu available.
Any ideas on how to solve it?
Ok, I found the problem:
Microsoft.Practices.CompositeUI & Microsoft.Practices.CompositeUI.WinForms must be referenced by a project in order to add views to it.
(I was referencing custom CompositeUI and CompositeUI.WinForms projects instead)

Trouble with 'Update Web Reference"

Occasionally I have a problem when I attempt to update a web reference in Visual Studio 2008 (this also happened in VS2005). It has happened in several different solutions.
When I have a solution with a (.NET 2.0) web service and a project that references the web service I get "There was an error downloading 'http://localhost:3890/MyWebService.asmx' Unable to connect to the remote server.". Obviously, the port number in the example is an example only, it could be any port number.
The web reference is set to 'Dynamic URL' and the web service is using the ASP.NET Development Server web server rather than IIS. When the error occurs the icon for the service never shows up in the system tray.
I have found two workarounds. The more drastic workaround is to delete the web reference and recreate it. This has worked for me everytime, but has caused some confusion for Subversion and AnkhSVN.
Recently it occurred to me to set the web service as the startup project, start it, and mouse over the ASP.NET Development Server icon on the system tray to find out the port number that it has chosen. Then, edit the port number in the WebReferenceUrl property of the web reference. After doing this I can update the web reference.
While this works I feel that there must be a better way. It seems that VS and Cassini should be able to resolve this without manual intervention. Am I missing something, or is this another case of Microsoft getting the difficult things right and the simple basics wrong?
I have attempted to search an answer for this issue and have found several threads describing the problem. But, no one has identified a real solution.
Right-click the service in Solution Explorer, and choose "View in Browser". That will cause the service to start, and you'll be able to use "Add Web Reference".
You can force the port of the test web site in visual studio.
Open the properties window in visual studio it with "F4" or via the toolbar - "View" -> "Properties Window".
Left click on your web site in the "Solution Explorer" window. Notice the drop down list for the "Use dynamic ports" setting. If you set this to "False", you'll then be able to specify a fixed port in the "Port number" field.
Set this to your desired port value.
Launch your web site. You'll see the port used matches the value you specified.
Go to project Properties-> Settings -> [Update the Service Url]
It Works.
Check appconfig file and update the port number accordingly

Windows Service not showing up when installed with Setup project

I have a simple windows Service developed in VS.net 2008 and VB.net. When I install the service using Installutil.exe from the command prompt it is working like a charm.
When I try to add a setup project and set the output and build and install it though it says successfully installed, it is not showing up in the services.
The event log shows that it is successfully installed. I just did check the registry, it did place the assemblies in HKEY_CURRENT_USER\Software\Microsoft\installer\assemblies.
But I don't understand why it is not showing up in the services listing. I refreshed and restarted.
Any thoughts??
Thanks
Found solution
You have to add a custom action in your MSI project.
So in custom actions, add the output of your service to the Install section. This will then run the required installation code for your service. i.e. the same as what the installutil.exe does
Thanks for all the help
I had the same problem and didn't pay attention to the portion BEFORE creating the Setup project.
http://msdn.microsoft.com/en-us/library/zt39148a(v=VS.100).aspx
To create the installers for your service
In Solution Explorer, right-click Service1.vb or Service1.cs and select View Designer.
Click the background of the designer to select the service itself, instead of any of its contents.
With the designer in focus, right-click, and then click Add Installer.
By default, a component class that contains two installers is added to your project. The component is named ProjectInstaller, and the installers it contains are the installer for your service and the installer for the service's associated process.
In Design view for ProjectInstaller, click ServiceInstaller1 or serviceInstaller1.
In the Properties window, make sure the ServiceName property is set to MyNewService.
Set the StartType property to Automatic.
In the designer, click ServiceProcessInstaller1 (for a Visual Basic project), or serviceProcessInstaller1 (for a Visual C# project). Set the Account property to LocalSystem. This will cause the service to be installed and to run on a local service account.
A couple of ideas:
Are you installing under the same Windows account that you are attempting to run it under? Do you have the Setup Project's "InstallAllUsers" property set to True?
Are you sure that you have the ProductName and Title properties in the Setup Project set correctly? Maybe the service is showing up in the list under a different name, i.e., "SetupProject1" or something.
Similarily, in your service's ProjectInstaller class, in design view, look at the properties of the ServiceInstaller and make sure the ServiceName and DisplayName properties are set to what you want.

Resources