The visual studio extension requires API v2 to be enabled - visual-studio

I installed elmah and I have got it fully working, however they also provide a visual studio extension - However when I try use it visual studio gives me an error saying:
"The Visual Studio Extension requires API V2 to be enabled"
Any ideas what that actually means, and what I need to do to "enable API V2" for visual studio?

API v2 can be enabled through the log settings view. The easiest approach is to navigate to the settings screen of the log you want to browse from the Visual Studio extension as described here: https://docs.elmah.io/where-is-my-log-id/. When on the log settings screen, click the Actions tab. On this tab, you can enable API v2.
We are planning a major overhaul of the VS extension which will allow for the extension to communicate with API v3 (the default containing improved security).

Related

Stop visual studio from reloading swagger UI

I have updated my visual studio to version 16.10.2 (enterprise).
Now when I run my Asp.net Core 5 Web API, every time I modify something in my code, visual studio runs a task in the background, and with that, chrome refresh my swagger UI, and all my data get lost.
How can I stop this behavior?
I have always used swagger UI to test my APIs, but this behavior of visual studio is really annoying!
See the video for better understanding: video
There is an option in visual studio which will refresh chrome every time you save something.
you can disable this behavior by selecting none.
Go to: Tools > Options > Projects & Solutions > ASP.NET Core > Auto build and refresh options = and put it to none

How to update OData WCF in Visual Studio 2017?

Trying to update Service Reference in an existing project, I got an error that says,
The specified OData API cannot be updated because OData APIs are now only supported with Connected Services.
The aka link (http://aka.ms/odatavsclientguidance) leads to http://odata.github.io/odata.net/#OData-Client-Code-Generation-Tool.
There is no instruction for VS 2017.
The instruction below leads me to the OData Connected Serve VS extension.
(https://marketplace.visualstudio.com/items?itemName=laylaliu.ODataConnectedService)
And it appears that extension cannot be installed in VS 2017.
Scroll to the bottom of the extension description page, we will see all the questions about its VS 2017 version.
So the question: is that OData extension the only to update OData Service in VS 2017? What walk around do we have?
The official Visual Studio Marketplace code generation tool, which you refer to in your post, now supports Visual Studio 2017.
One notable difference from how one would normally go about setting up OData references is that where one would previously use Visual Studio's "Add Service Reference" directly to generate the relevant code, installing the tool adds a "Add Connected Service" instead.
See also the discussion in this GitHub issue.
In your Solution Explorer, right click on References, Add Connected Service then select Microsoft WCF Web Service Reference Provider, you'll get a Wizard-like window to add a Service Reference just like in VS2015.
Refer to https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide
Images at https://imgur.com/a/6kYhexK

Windows Service Template for Visual Studio 2017

The Windows Service Template no longer displays by-default for new projects in Visual Studio 2017....and the installer has no 'search' capability.
All this AZURE stuff is great, but I still gotta do normal 'on-prem' work too...and I hate maintaining 2 versions of Visual Studio.
Any thoughts here?
Just checked here. I see project "Windows Service (.NET Framework)" under the Windows Classic Desktop folder under Visual C#.
(Visual Basic has a similar entry.)
Only some templates are shown in parent folders, for more specialist templates you need to be more specific.
But also the search finds both.
NB I selected ".NET Desktop" workload on install, which I see you have not.
Check the .NET desktop development option in the installer, then click Modify.
VS2017 --> New project --> Visual Basic or Visual C# --> Windows Classic Desktop --> Windows Service
Also check out this recent post (currently dated 2017-3-30) from MS to do it without the project template:
How to: Write Services Programmatically
The key points are as follows:
Create a new project
Add "System.dll" and "System.ServiceProcess.dll" as References
Create a class inheriting from ServiceBase and create a Program.cs with Main exactly like the template project does
If you are talking Windows Template Studio Universal then You have to install the extension in Visual Studio.
Go to Tools menu >> Extensions & Updates >> Online >>then search for Windows Template Studio
OR go to https://marketplace.visualstudio.com/items?itemName=WASTeamAccount.WindowsTemplateStudio#overview

Enable extensions when debugging website in Chrome from Visual Studio 2017

Switching from Visual Studio 2015 to 2017 I find that launching a Web API project now starts a clean, separate Chrome window. For the most part I like that, and I certainly like the idea, however: this also means extensions are missing in Chrome.
Is there a way to start a Web API project from Visual Studio 2017 and have Chrome launch with extensions enabled?
Or, failing that, could I revert back to the old behavior where my project is opened as a fresh tab in my existing Chrome window?
I've tried Googling but found nothing. I checked the dropdown in Visual Studio with browsers (and checked the "Browse With..." dialog) but found no solution there either.
All you need to do is to sign-in to the instance of Chrome that VS2017 launches as the user you have all your usual extensions installed under (i.e. sign-in as the same user you usually sign-in as).
This sign-in "sticks", so extensions will load in the current - and all subsequent - debugging sessions.
You can revert back to the old behavior by
Debug > Options > Debugging > General > (uncheck) Enable JavaScript debugging for ASP.Net (Chrome and IE).
Is there a way to start a Web API project from Visual Studio 2017 and have Chrome launch with extensions enabled?
Yes, but it works for one project only, mean you need to re-install extensions when you launch a brand new project. I tried Sync in Chrome (not work).
In my opinion, there are something to do with Chrome remote debugging protocol profile. I hope someone knows about Chrome can give a final solution for this.
you can study more here: remote debugging protocol
There is a way that you no need to change anything. But it annoying.
Because Visual Studio 2017 use an instance of Chrome for debug mode when you hit F5, so you can leave that debug mode instance with remote debugging protocol open, and use your default Chrome instance with full extensions. Just copy and paste the link into your favorite Chrome instance.
Cheer! hope it help.

Visual Studio 2013 Web Settings

I have a Project, that I need to run on local IIS. When I set web server's type and url in web section of Project properties, those settings are automatically written in Project file. How do I prevent this kind of behaviour and save those settings only for my local environment? There is no "Save settings for all users" checkbox or anything simmilar like in VS 2012.
This option was removed from Visual Studio 2013. From this Microsoft Connect page:
Thank you for bringing up this issue. Unfortunately, this functionality was lost when the web project properties page was refactored. We are working to get this feature back into the product.
For now, if you have a project with this setting unchecked in VS 2012, and open it in VS 2013 it will respect your individual user settings until the first time that the servers section is modified on the web project properties page.

Resources