Adding a Web Reference in Visual Studio 11 - wsdl

I have a wsdl file I am trying to add into a Metro application created in the developer preview for Visual Studio 11. This is from a third party API. The sample application provided runs correctly when built with VS11 and the reference is added under Web References in the solution explorer and appears to have the correct listings under the properties page.
I'm trying to use this same reference in my Metro app however there is no option to add a web reference in Visual Studio 11. I've added the wsdl as a service reference, which I've never used before, and after doing that I can not access all the methods I should be able to. It also only has "Folder Name" under its properties.
Does anyone know how I can correctly use this wsdl in Visual Studio 11? Thanks.

Service reference is the correct way to go as long as you're adding the correct URL. Providing this is correct and you are referencing the correct namespace (or specified via "using" in your code), then you should be good.
You can double check this by navigating to the URL via IE and making sure it displays a list of methods for your web service.
Once your "web service" is listed under "References" in your project, you should be able to do a right click and do a "view in object browser" to get detailed information about the your reference (including the namespace it has been placed in).
One final thought, have you tried a brand new project only specifying the reference to your web service.

Related

Context menu missing in Visual Studio 2022

The project that I'm working on uses the Visual Studio (2022) extension 'Unchase OpenAPI (Swagger) Connected Services' to generate a C# controller. My colleague and I have both followed a tutorial on Medium to setup this extension, and we have both installed version 1.7.1. However, in the solution explorer, I don't get the context menu item to update the connected service whereas my colleague does. The attached picture shows my environment (upper) and his (lower), and as can be readily seen, I'm missing an option.
So far I've tried to disable and enable the extension, restarting VS, and even restarting the PC.
Any idea why I cannot update the connected service?
It seems it is a bug in Visual Studio 17.2.x. Workaround is to use NSwagStudio, but the template folder has (if you use it) is now relative to a temporary folder, not the one .nswag definition resides into.
https://bytemeta.vip/repo/unchase/Unchase.OpenAPI.Connectedservice/issues/70

OPTICON API - unable to load example visual studio project

Im trying to make use of the Opticon API to write an app that will read the barcode data from the device. Opticon have a website for the API download.
http://wiki.opticonusa.com/techsupport/en/OPN-2001#Downloads
but when i open the example project in visual studio i get a reference missing,
the project folder has "csp2.dll" files in it. but i so far have not worked out how to add that reference to the project. I have tried to "Add Reference" and browse to the .dll file but this just causes Visual Studio to crash, is there something more I'm missing?
The Opticon OPN SDK does talk about "C-Library Kit", but from what i can read this seems to be for C++, rather than C#.
The documentation for the SDK seems to be rather old and for much older versions of Visual Studio.

How to correctly add a .resx file to an MVC 6 application.

Using Visual Studio 2015 I can add a Resource File (Resource.resx) to an MVC 6 Project. However the modifier of the resource defaults to: Internal.
If I right click on the resource and select properties I cannot see any of the Advanced properties that I used to be able to see i.e. Browse to URL, Build Action, Copy to Output Directory, Custom Tool and Custom Tool Namespace. The only two properties I can see are the Misc ones i.e. File Name and Full Path.
If I open the resource by double clicking on it, the Access Modifier in Visual Studio is disabled.
What am I missing?
Localization works a little differently in MVC6.
An example can be seen here: https://github.com/aspnet/Mvc/tree/dev/samples/LocalizationSample.Web
One important note is that you have to run the application using: dnx web as there is a bug when running the application from visual studio. See this issue for more information.

Connecting App for Office with ASP.NET MVC

We created an App for Office from the standard template in VS 2013. We need the app to connect to an MVC project instead of the default web project. So, we replaced the one with an MVC 5 Web API 2 project. If we run the MVC project by itself, it runs well in a browser.
The problem is when we start the App for Office and we expect to see it in a task panel in Word or Excel. VS gives us a popup: “There were deployment errors. Continue?” If we hit “Yes” things work fine but something must be wrong. Nothing specific in the Output window and the only log we get is 1 failed deployment.
I had the same issue. Make sure you select the MVC project in the “Web Project” property of the App for Office. You can access that by selecting your App project in Solution Explorer and hitting F4 to open its Properties window.
Also, make sure you select a valid web page for Source location in the manifest, which I assume you do, because you say “it works” if you click Continue on the error popup.

How can I run an MVC app as a class library?

I've just started working on an MVC 4 app, using Visual Studio 2010, got the app building, but alas am still waiting to get admin rights to my Windows XP box.
...and I don't seem to have any way to run the app in my browser. The startup project is a class library, so I can't run it directly by F5ing, and I lack (probably due to not having admin access) the normal options to set the server configuration in the Debug panel in the project's properties.
So what's the best option for me, anyone? Or is this intractable without admin rights?
EDIT: With MVC, make sure the startup project type is Web Application, not Class Library. I forgot this! If you need to change, see this question. And the problem had nothing to do with not having admin rights.
Right click on the MVC project, Debug->Start New Instance
I am also facing the same issue.
I just modified the csproj file of that project.
I added
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
to the project.csproj file and reload the application and found my solution working at next moment.
With an MVC 2.0 project in VS 2010, the default (and only) output type is ClassLibrary. For me it turned out to be something really stupid. I had accidentally set another class library project in the solution as the StartUp Project. Right click your MVC project in Solution Explorer, and choose "Set as StartUp Project". It should appear bold in the Solution Explorer if it is the designated StartUp Project.

Resources