I know there are a lot of questions like this, but none of them solved my problem.
I have a Windows Phone project, with some associated projects. I need to create a new project with the service reference, but I can't add it.
I found a link where they said to install a component from Add Connected Service > find other services > WCF Services but it says that my project is not supported.
Which kind of project must I create? I have in the same solution a project which has the right-click > add service reference but I was not the creator and I don't know what kind of project it is.
PS:
- I can't right click > Add service reference, I tried it in both project name and reference name.
- I need a Windows Phone Stuff. I link what i mean with a picture:
PSS: The destination version of windows phone is not the reason. I tryed changing the WP8.0 into WP8.1 and I can still add the ref
Does anyone know which kind of project I have to add for being able to add service ref?
Thanks
Instead of using Service Reference would suggest you to switch to the Windows recommended REST API endpoints instead. As now Windows is focusing more on REST service consumption than adding service reference that was available earlier.
Sadly now Windows Phone Store apps in Windows Phone 8.1 do not support the System.ServiceModel namespace generated by the Add Service Reference menu. Hence they have removed the option Add Service Reference.
To be able to use it you will have to create a Silverlight application and use this Workaround of using a WCF service.
You can find a MSDN Forum discussion of the same.
Related
Any help would be greatly appreciated!! I have scoured the web trying to find an answer. I am writing a UWP app that will be deployed to the Xbox platform. I need to access a web service written in .Net 2.0. In earlier versions of .Net / Visual Studio the Add Web Reference Button was hidden in a panel accessed through ->Add Service Reference ->Advanced ->Add Web Reference. With latest build of VS2015 the Add Web Reference Button is missing. Did this completely go away or is it hidden even deeper in the environment somewhere?
XML Web Services, also known as ASMX services, were the predecessor of Windows Communication Foundation (WCF). You can access Web Services by adding a service reference just as you would for any other WCF service.
A service reference enables a project to access one or more Windows Communication Foundation (WCF) services. Use the Add Service Reference dialog box to search for WCF services in the current solution, locally, on a local area network, or on the Internet.
For more info, please How to: Add, Update, or Remove a Service Reference.
so I'm creating an app with Xamarin Forms Portable and I want to use a Web service that I hosted in Azure. As far as I know, I can't add a reference by right clicking on the Reference tab in the PCL project... So I wonder if anyone could provide me with a fairly simple and straight forward solution?
Need to change to Pcl profile 78.
Ok to do so... Right Click , properties on the PCL Project.
Uncheck Windows Phone 8.
Check Windows Phone Silverlight.
You are now using Profile78! Allowing you to add Silverlight WCF client :).
Wish this was documented better.
You can see what profile you are currently using by opening the proj file in notepad.
Happy Xamarining!
References can be added if your project targets does not connect windows. Right click the PCL project and change the targets, remove windows.
you can use application => "Service Reference Generator For .net Standard & Xamarin.Forms" from : https://files.fm/u/mduffseg
first read help in application
I need a timer in my universal windows app. I have read that the only one available for universal windows apps is System.Windows.Threading.DispatcherTimer. In order to use this I manually added the WindowsBase.dll to my app's references in the solution explorer in visual studio. Now I get the following error:
Error 3 Cannot find type System.ComponentModel.TypeConverter in module System.dll. Game.Windows
The error goes away if I delete the WindowsBase reference. What am I doing wrong?
The assemblies you can add to a Universal app are listed in the Project + Add Reference, Assemblies, Framework list.
Yes, it is empty.
That was intentional.
Because you already have a reference to all possible .NET assemblies in a Universal app project. Using the Browse button is not a workaround. And causes the kind of misery you describe, WindowsBase has types that can only work in a WPF app. The kind that runs with the full .NET Framework you've got installed on a desktop. Not the kind that a user has on his phone, called .NETCore. It is small, phones are small.
You already have the Windows.UI.Xaml.DispatcherTimer available in a Universal app project, no need to add a reference.
I think the one that windows store apps use is located in Windows.UI.Xaml namespace
I have been using ThreadPoolTimer, in Windows.System.Threading.
I have some web services that I need to reference in a Windows 8 Metro style application, normally you can just add a reference to the service via VS2012, but the services are behind a security layer.
I have downloaded the .WSDL file to my local PC, and now I need to generate the class file for this service.
The WSDL.exe that I have found on my local PC is for .NET 4.0 and produces code that is not suitable for the .NETCore framework. Is there a WSDL.exe equivalent for Windows 8 apps?
Visual Studio 2012 can obviously add a reference to non-secure asmx WSDL web services, so the functionality must be somewhere.
As per little investigation, the original .NET 1.x asmx-based Web Reference proxies are not supported in Metro style apps.
Web Service with SOAP 1.1 end point is supported by Add Service Reference (right-click on a project and choose Add Service Reference) in Metro style apps.
A workaround should be remove the offending constructor that fails to build (unfortunately, you'll need to do that everytime you regenerate the code), and to pass an instance BasicHttpBinding and EndpointAddress to one of the constructors of the WSFTerminalsSoapClient.
Have a look at following references, which might help you in this regard:
Web Services from WinRT Metro
WCF in Windows 8 Metro styled apps? Absolutely supported
I found out how to do this if anyone is interested.
You simply download the XML WSDL file from the site via a normal browser.
Then in VS2012, you can add a service reference to that file directly (i.e. put in the full path to the file c:\tmp\mywsdl.xml) and it will be able to generate the proxy for you.
I've created a windows service in c# and I'm trying to install it for debug using the installutil as recommended here: http://msdn.microsoft.com/en-us/library/sd8zc8ha.aspx
The installutil says Install completed. However, nothing appears in the service control manager.
I've tried this on Server 2008 and XP with the same result.
Any ideas?
A colleague of mine had a more or less identical problem.
Did you add an installer to your project? For the service to be installed you need to add an installer to your Visual Studio Project.
The easiest way to add an installer in Visual Studio is to open your service in Design Mode and right click the design area and select Add Installer. This will add a file ProjectInstaller.cs with itself contains a ServiceInstaller object and a ServiceProcessInstaller object.
With the installer added you can set the Service Name, Description and other options that will be used when installing the service. If you now try to use InstallUtil your service should be installed and should show up in the Services list.
I had a similar issue (build installer, no errors, no service appears in services.msc) but a different solution, as I had configured the installers.
In my case, the Service-project's Application Properties (Alt-Enter, Application-tab) Startup object was (not set) as shown below:
Picking the default .Program and rebuilding service and installer worked (service appeared in services.msc).
Setting this property is one of the steps in the MSDN service installer walkthrough referenced in this SO answer. Make sure to follow all of the steps!
I can't speak specifically to any issues that are the fault of C# or .NET, but I have a writeup of what has to happen for a service to be installed and work in the form of an extensively documented framework (source code included) for writing services in Lua. I offer it up here as an example of another way to do it, because sometimes just seeing things from another point of view can be helpful.
Disclaimer: It is very much at an alpha quality level, and yes, I am its author.
The framework has all the code needed to interact with the Windows SCM to install and remove the service.