New to Monodevelop
How do i add reference to wcf in Monodevelop. I do not see any option to add wcf reference the version i am using is 2.8.6.5 and running on windows 7
Thanks
The Add Web Reference command now supports adding references based on WCF. When adding the reference, and combo box allows selecting the target framework, which can be WCF. Right-click on the project in the solution explorer and go to Add Web Reference.
Related
I am unable to add a connected service reference to a WCF endpoint in VS 2019. I used to be able to do it in VS2017 with an extension. Now I can't find the extension anywhere, and when I try to add a connected service, I get lots of options but nothing for a WCF service.
Just to clarify, I am not trying to develop a WCF service, just trying to create a service reference to act as a client to a remote WCF service.
There is an article on how to use such a tool, here, but absolutely no information on where to find the tool or how to install it. I even found what may be the source code for the tool, but again with no installation instructions.
My project is a .NET Core project, targeting NetStandard 1.6.
.Net Core is still supporting client-side. You can use hosted service in it and add the ip:port/wcfinterface from the connected services.
You can try it by following this link.
I was able to resolve this issue by simply creating a new class library targeting NetStandard2.0. Right-clicking on Dependencies -> Managed Connected Services now showed an additional item below the Service Dependencies item, called Service References. Adding a new Service Reference, you are then presented with a WCF option.
I tried re-targeting this class lib back to NetStandard1.6, and all is still working. My original class lib was very old, and had some old stuff like dnxcore50 in the .csproj file, so maybe something there was screwing it up.
Thanks all for the suggestions.
I need to upgrade an existing windows 8.1 Mobile app to work on windows 10 and started looking into this.
I have managed to port the code to UWP and it builds and runs the UWP app - so far so good.
However within the app there is a WCF project which is used to go get data and this isn't working.
I am currently getting this error Could not load file or assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Is it even possible for a UWP app to contain a WCF project and this will work?
In the VS2015 solution this all works but in VS2019 it doesn't work as in the ServiceFactory class cant even create an instance.
I have next to no experience of UWP or Windows 8.1 Mobile apps and any advice would be great.
Thanks
Gregor
Note that the WCF Client is actually available for .NET Core/.NET Standard! It's only the server-side part that is not available for .NET Core.
WCF Service: .NET Framework
WCF Client: .NET Standard based (works with .NET Core and .NET Framework)
In your case, if I understand you correctly, you want to call an existing service, which means you need the WCF client, and you can actually use that WCF client with .NET Core/.NET Standard 2.0 and so also with UWP.
Do the following:
Add a new .NET Standard Class Library project to your solution (this will replace the WCF client library that you have already in your solution)
In Solution Explorer, right click on Dependencies and select "Add Connected Service"
This will bring up a page within Visual Studio where you see the "Microsoft WCF Web Service Reference Provider":
Click on it, and the dialog below opens up:
In the dialog above, type in the URL of your service, and the dialog will generate the whole WCF client code for you and it will also add references for the required WCF NuGet packages.
Reference the .NET Standard 2.0 class library project from your UWP project and use it.
Note: WCF-Client in .NET Core does not support the configuration file entries known from .NET Framework projects. That means that the configuration is generated in the C# code.
I hope this helps,
Thomas
I've created a Xamarin Forms project with .netstandard and trying to add the WCF service reference as the connected service using Visual Studio 2017. There is an option in the connected service for adding WCF service reference. When I add the service reference, a dialog box opens and after few seconds an error comes as it is not able to build the solution. But when I try to build the solution, it builds but the reference don't add. How can I add the WCF service reference in .netstandard project with Xamarin Forms.
I managed to solve the problem by uncheck the option for Reuse the types in referenced assemblies in Data Type Options
I have some methods which are not compiled with Silverlight framework but are very essential for execution of SL workflow(by workflow, I mean to process my application completely). What is the best/quickest way to do so?
I was thinking of publishing a web-service(for non-sl compiled methods) and make SL call into my WS.. but I am unable to see/create webservice instance even after registering one in my SL project. (I am using VS 2010)
any help?
Esentially, you have three ways to run code.
native built-in methods in your application--this would be the easiest way
methods that live in an external silverlight assembly, like a class library
use a webservice
if you use a webservice, you have to either host the website yourself or use a 3rd party website, then add a reference to said service. if the service is not hosted on the same website as your silverlight app, there must be a cross-domain policy file in place otherwise silverlight will not use the service.
if you use an external assembly, it MUST be a silverlight assembly. you can not use a windows class library, etc.
There is a common (and relatively easy) way to solve this issue without requiring a web service: you can create a new Silverlight class library and then share the files from the other project through to your new Silverlight library.
To do this, right click on the library in the Solution Explorer, and select Add -> Existing Item, then navigate to the appropriate code file, select it, but instead of just clicking Add you should instead click the little down arrow and select Add As Link.
Of course when you do this you have to ensure that the shared files don't contain anything that cannot be compiled targeting the Silverlight runtime, if they do then you will either have to use conditional compilation directives to isolate out that code, or revert to the web service option.
I am using pollingDuplexHttpBinding and it is working fine as long as i copy paste the web.config from msdn article :- MSDN article
However when i try to manually configure my service using WCF configuration editor, it doesn't work. The option pollingDuplexHttpBinding doesn't show up under endpoints in Binding drop down box. How do i solve this problem? I already have a reference to the required assembly of pollingduplexhttpbinding.
Thanks in advance:)
Just because it doesn't show up in config intellisense, doesn't mean that the binding won't work when you run your application. Make sure that you have the latest version of Silverlight Tools for Visual Studio installed; Even then, it may still not show up (config intellisense unfortunately always seems to be an afterthought at Microsoft, especially for server-side config for Silverlight scenarios).