visual studio 2015 "Add service reference" missing - visual-studio

I need to import a WSDL and I do not see "Add service reference" on menu when I right click project.

To add a reference to a service in the current solution
In Solution Explorer, right-click the name of the project that you
want to add the service to, and then click Add Service Reference.
The Add Service Reference dialog box appears.
Click Discover.
All WCF services in the current solution are added to the Service
list.
In the Service list, expand the node for the service that you want to
use and select a service contract.
In the Namespace box, enter the namespace that you want to use for the
reference.
Click OK to add the reference to the project.
A service client (proxy) is generated, and metadata describing the
service is added to the app.config file.
More information.

Related

OpenGL set up problem when create new project via Visual Studio express 2017?

I'm using VisualStudio express 2017 as the IDE. I have set up everything for the OpenGL and everything works fine. But there is a problem, I realized that I have to set up the library and dependencies every time when I create a new project. Can anyone help me with this problem?
There's a solution to that called a Property Sheet. Since I don't use VS Express, I'll explain how to create and reuse properties for a Visual Studio Community Edition project.
Create a new project, for example a C++ Console Application (or whatever programming language you're using)
To display Property Manager go to View > Property Manager or View > Other Windows > Property Manager
In the Property Manager, left-click on the "triangle symbol" next to your project name to display the configurations.Choose the configuration you want to set up (here Debug | Win32 is highlighted)
.
Right-click on the configuration. Choose Add New Project Property Sheet. A property page dialog box appears. Enter a name (file extension .props) and where to save it. Click Add.
Left-click on the "triangle symbol" next to your configuration. You should now see your newly created property sheet. Double-click on it.
Now configure your project how you want, include dependencies , libraries, Linker etc.
After configuring, right-click on your property sheet. Save it.
Now everytime you create a new project, right-click on your project name in the Property Manager and click Add existing property sheet and brwose to its location.

How do I add a whole folder to Visual Studio Team Services (was TFS Online)

I'm currently trying Visual Studio Team Services, and I want to check in a whole folder containing code and more subfolders. I'm in the CODE->EXPLORER tab and when I right-click on the right side (the main area), a context menu appears where there is a menuitem Add. So, I tried adding an existing item, however, it won't let me put in folders. I tried then dragging the whole folder in the content area but it says error. How do I add folders in source control?
I don't believe its possible to add folders from VSTS (formerly VSO) but you could connect to VSTS via VisualStudio and uses the Source Control Explorer to add folders.
You can create new folder directly in Visual Studio Team Services website using the Folder Management extension. Follow this steps:
Login to your VSTS account, f.e. https://{account}.visualstudio.com
In the top of website choose Browse Marketplace
Search extension Folder management or visit direct this URL of extension
Install the extension and choose an account to associate
Go back to VSTS account and choose CODE in main menu
Now you can create new folder directly:
Use Visual Studio/Team Explorer. Map to a local folder, then just use windows explorer to copy/paste your folder/files into your mapped folder. In Team Explorer/VS it will pick up all the added files and you can check them all in in one operation.

Why does Visual Studio automatically reenable "client application services"?

I have a solution consisting of a number of class library project, and a windows service project. When I open the project settings for the windows service project and (accidentally) click on the "Services" tab, Visual Studio insists on automatically ticking the "Enable client application services" checkbox.
The effect of this is that it will add a reference to System.Web.Extensions, and also insert some parts in the app.config. Disabling the checkbox again will not remove the reference. It will however remove the generated configuration, though it will also remove some unrelated configuration that were there before.
Why does it insist on ticking this checkbox, and can I make it not do it? The HELP documentation for the "Settings" tab does not mention any "auto-select" behaviour.
This is Visual Studio 2010, targeting .Net 3.5.
At least one other person have the same issue, unfortunately without any resolution provided:
http://go4answers.webhost4life.com/Example/visual-studio-2010-keeps-enabling-7689.aspx
That in turn links to a Microsoft Connect issue, but for some reason they don't allow access to older reports it seems: https://connect.microsoft.com/VisualStudio/feedback/details/570166
When there is AppSettings item in app.config, the setting “Enable client application services” will be always automatically checked on when to open the project property page.
Reproduce steps:
Using VSTS 2012
Create an empty console application
Add AppSettings section to app.config
Open the project property page and click the "Services" tab
You will see “Enable client application services” is checked on and app.config is updated.
One workaround from our team member:
just to rename the app.config to the its finally deployed file name, such as ConsoleApplication.exe.config and change its file property - "Copy to OutputDirectory" as "Copy if newer".
It works for our project.

cannot add a service reference to Windows Phone 7.1 project (dialog not available)

I added a service reference to project A in the past. I deleted the reference and tried to "add a service reference" by right clicking on the project, and that option is not there anymore. Only "Add reference" is in the menu. Same thing in the Project menu on the top.
I opened another windows phone project of mine (project B), I was able to see "add a service reference" after right clicking THAT project...
I compared cjproj files and I copied project B csproj text to project A, didn't work.
I'm mystified.
I ended up having to create a new windows phone project and migrating each file and folder over. Not fun.
Seems to be a known issue. Try cleaning the solution and reloading it. Also, delete any service references that might be located in the project folder.

Visual Studio does not generate app.config content when "add service reference"

When I add a web service by using "add service reference" in the console app, the app.config does not generate the configuration. How do I generate this app.config with a specific wsdl? Thanks!
When adding the service reference try clicking on the 'Advanced...' button and then uncheck the 'Reuse types in referenced assemblies' checkbox.
I found this out when I had created a simple project to test a third party service which all worked fine. Attempting to add the same reference to the main project resulted in the app.config and reference.vb file not being generated correctly.
I think this may have been because there were already other web references in the application or referenced applications, however unchecking 'Reuse types' resulted in the files being generated correctly.
(Same answer I gave at Visual Studio 2010: adding a service reference to a 2008 generated wsdl )
I have experienced the same issue with Visual Studio 2008. I find I get different results if I'm using the "Add Service Reference..." command, or digging deeper to "Add Service Reference..." | "Advanced..." | "Add Web Reference...".
However, the tried-and-true method--and the solution that worked for me--is still via the command line:
svcutil.exe /language:cs /out:GeneratedProxy.cs /config:app.config http://server/path_to/WebServiceBean?WSDL
That should give you a working app.config. Hope that helps!
In my case, following actions resolved
Commented <services> tag in web.config file in WCF Project (from <services> to </services>
Recompiled WCF project
Hosted it at IIS
At client application delete old reference and add again WCF reference
and it worked :)
You can add a Service Reference as usual (no need for advanced). If the config sections do not appear in app.config, you can click "Configure Service Reference...", and uncheck "Reuse types in referenced assemblies". After that it will correctly generate the sections.
This will not automatically generate your settings, but to create the web.config settings without the command line, you can right click on your app.config after adding the service reference and click the "Edit WCF Configuration" button to add the elements you need for your web service.

Resources