Visual Studio 2019 - Unable to debug Azure functions - (Desktop CLR (.NETFramework) versus Managed (CoreCLR)' debugger - debugging

I have installed the Visual Studio 2019 community version 16.4.4 on a brand new laptop
OS:- Windows 10 Home Single Language
The following are the .NET Core SDKS installed in my laptop
The command dotnet --info gave me the following details
I created a Azure function with V3 template
The project settings are given below
When I try to debug , i get the following error
A fatal error has occurred and debugging needs to be terminated. The debugger was configured to use the Desktop CLR (.NETFramework) Managed debugger, but the target process loaded the CoreCLR (.Net Core) runtime. To debug this project, configure it to use the 'Managed (CoreCLR)' debugger."
Tried several options like the one mentioned in the link below
https://social.msdn.microsoft.com/Forums/en-US/59f880f7-ed60-4842-bc55-a9400971c58b/problem-debugging-net-core?forum=vsdebug

EDIT: This has been fixed in the latest release of Visual Studio v16.4.5
The problem seems to be a mismatch in the version of the Azure Functions CLI. As a workaround, you can do this:
Install the latest Azure Functions CLI, from the command line run:
npm i -g azure-functions-core-tools#3 --unsafe-perm true
or if you are using Chocolatey:
choco install azure-functions-core-tools
Restart Visual Studio.

I still have this issue after reinstalling my VS2019, downloading the latest sdk and downloading the core tools multiple times. Seems like the only way for now is to run without using the debugger (Ctrl + F5). Sometimes I downgrade the function to v2.1 for this only happens on v3 functions.
Edit: I got this fixed when I updated my VS to 16.5.1

It looks like one similar issue which has been reported to DC forum. However it works well in my side with same 16.4.4 version. Since I didn't reproduce same issue, I can't provide a direct answer.
Here're some possible workarounds which may help:
Repair VS and go Tools=>Import and Export Settings=>Reset all settings=>No,just reset, overwrite... (Since my same version works well)
Hint from this one, you may backup the launchsettings.json in project and then delete it, rebuild and debug(F5) it again.
And if the issue persists, you can try installing .net core 3.0 sdk and recreate a new project to check if it helps.(I have both .net core 3.0 and 3.1 installed, but by default it picks .net core 3.0 when I create the project, not sure if it makes any difference.)
Hope it helps :)

Update:
Sorry for not noticing that the solution will not work for you. Since the solution doesn't work, you can choose another way. As the error says, you need to
configure it to use the 'Managed (CoreCLR)' debugger."
So, try to configure on hand, Select 'Debug' above the VS 2019 tab, then
Original Answer:
I faced exactly the same error before and solved it with below solution, it works well.
Solution:
Just enable the native code debuging.
Right click your project > properties > Debug. Tick ​​'enable the native code debugging' like this:

I have the same issue, I have upgraded visual studio 2019 to 16.4.4 and it resolved my issue. that was the bug by visual studio 2019 in 16.3 versions. please upgrade visual studio. it will definitely resolve your issue.

Issue was resolved with the next upgrade of Visual Studio 2019

Trying Install the v3.x Core Tools package from the command line run npm install -g azure-functions-core-tools#3.
Reference: Use npm to install Core Tools on Windows

Related

OmniSharp Error: Found dotnet version 5.0.201. Minimum required version is 6.0.100

I use VS Code as my IDE. Today I saw in my C# files that I could no longer use things like "Go To Definition/Implementations" or hover over anything to get the path/type etc.
I found my Omnisharp console and saw they updated last night and there is an error:
Error: Found dotnet version 5.0.201. Minimum required version is 6.0.100.
I can't upgrade my dotnet because 6.0 is not compatible with the runtime in my project and on Mac M1, there are a lot of issues running multiple dotnet instances..
I guess its a bit of a rock and a hard place, anyone know how I can get around this issue?
This is a recent update to Omnisharp, which is used by the VS Code C# extension. Add this to your settings and restart the editor.
"omnisharp.useModernNet": false,
"omnisharp.path": "",
Also if you don't have Visual Studio installed you will likely need to install the Build Tools to get MSBuild:
My understanding of the rationale behind this change is an optimization for modern vanilla c# projects over those using older versions (ie Unity). More info in this issue.
Revert your Omnisharp to previous version
Update 1.25.0 introduces newer OmniSharp build for .NET 6 which does not support non SDK style .NET projects but results in performance improvements.
Fortunately you can disable this in the settings:
C# Extension Settings
Also, the C# extension no longer ships with an included Mono & MSBuild Tools. Download them here: Build Tools
Worst case, you can revert to an older extension version.
Go to extensions in VS Code and search for C# Extension
VS Code Extensions
Go to C# Extension settings
C# Extension Settings
Disable "Use Modern Net" option.
Modern Net Option
Restart VS Code
I haved similar problem and i fixed like this:
Im using win7 and i have VS 2019 IDE which not supporting dotnet 6 cuz of that vs_installer not installing dotnet6 sdk, in result i cant use c# extension v1.25.0 in vs code, because omnisharp needs net6. I installed net 6 sdk to my win7 and problem is solved, now i can use c# extension v1.25.0 in vs code.

Remote machine option missing in Visual studio

I'm using Visual Studio 2019 and just created a new .NET Core 3.1 web api project.
I noticed, that an option "use remote machine" is missing from the debug tab of project's properties.
However, when I open my old project, created in older versions of VS using .NET Core 2 (and then migrated to 3.1) - the option is present.
I've only recently started needing it and this inconsistency is strange to me.
This ticket on Microsoft website https://developercommunity.visualstudio.com/t/use-remote-machine-option-in-debug-settings-is-not/757921 suggests that it should be fixed in the latest version of VS, but I use the latest version and the problem still remains.
I figured it out, was my mistake. I needed to explicitly set launch option to executable. Then it becomes available. I should close the question.

Visual Studio: Android SDK Setup (API Level 19 and 21,22,23)

I have this problem with the setup of Android SDK in Virtual Studio Community 2015. Whenever I try to install or repair VS, I always get problems with the setup of API Level 19 and 21,21 and 23. It always says that the packages were not downloaded and I should check my internet connection. However, my internet connection is working perfectly. I have seen many other users having similar problems, but none of the proposed fixes work for me. I have reinstalled VS twice and repaired it like 3 or 4 times. I checked my Java version and my proxy settings or tried installing them via the Android SDK Manager/alongside Android Studio. So far without any luck. I hope I have not overseen any fixes.
Unfortunately, the log is very long, so I can´t post it here (if you have any suggestions where I can post it, please tell me!). In the links you will find two screenshots of the error message I get.
Can you help me?
All I did was install Java SE Development Kit 8u151 from Oracle (Apparently VS 2015 uses Java 7 instead of 8) and then run VS 2015 as administrator and modify. The third party SDK's (19, 21, 23 & 22) were available and all installed correctly. Wish I had of known this before multiple installs and eventually a reinstall of my OS ...suppose I could have done with a clean slate though.
I was able to solved the problem above using the suggestion and comment of #Richard_Norton and #bugzapper from, https://social.msdn.microsoft.com/Forums/sqlserver/en-US/780c0b11-41da-4935-9ae5-dadf38292b51/android-sdk-setup-api-not-installed?forum=vssetup .
I uninstall the older version of Java SE Development Kit which is not Version 8.
I download and install the Java SE Development Kit Version 8 which you can get in here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html .
Then after that i modify Visual Studio 2015 to Install Android SDK Setup (API Level 19 and 21), and 23.
I Hope, this answer can help future someone who is encountering this kind of problem.
Refer to the error message, you can have a try with the following methods:
Open Android SDK Manager and click Tools-Options… and check the option “Force https://... Sources to be fetched using https://...” and try to download those android SDK packages again. If you already tried this before, you can ignore it.
Check this blog: Visual Studio 2015 install failures (Android SDK Setup) behind a Proxy and follow the steps as below to fix it:
• BEFORE installing Visual Studio, create a file at this location: %USERPROFILE%.android\androidtool.cfg
• In the androidtool.cfg file that you just created, place those contents that you can find from the blog. Make sure to update “http.proxyPort” and “http.proxyHost” in the file!
• Install Visual Studio normally
Have a look at this similar issue: Visual Studio 2015 setup issue with Android SDK – hack it!, if you found the same root cause: all google repositories don’t have this package anymore on your side, you can try to create your own repository contains this missing package and let Visual Studio setup “think” he download the package and unzip it successfully.
BTW, the installation log file can upload to https://onedrive.live.com/ and share the link here.
Just start the SDK Manager from Visual Studio's menu (Tools/Android/Android SDK Manager...) and select the desired API level you do want and download them!
Anyhow, check with the SDK Manager, this is THE tool to get the Android SDK and at times you will need to update stuff through it!

"Setup has detected that Visual Studio 2015 Update 3 may not be completely installed...."

"...Please repair Visual Studio 2015 Update 3, then install this
product again."
I'm getting this when I try and update the ASP.NET Web Tools Extension in my version of VS 2015 which I installed only today. After I got this error I checked and my version was Update 3. I tried to install it regardless and got a message saying that I already had it.
Any ideas on how I can get around this issue?
Ok after some digging I got to the bottom of this. It seems that I need to have .Net Core Installed. However when I go to install that I get the same error. The workaround is to run the downloaded .exe from the command line with the added parameter:
DotNetCore.1.0.0-VS2015Tools.Preview2.exe SKIP_VSU_CHECK=1
This will install the latest version of Web Tools as well.
Instead of downloading it from VisualStudio tools update tab, just go to http://www.asp.net/core and download the latest dev tools DotNetCore.1.0.0-VS2015Tools.Preview2.0.1.exe.
Installed perfectly for me.

Visual Studio Cordova App, can't run debugger - Could not locate the appxrecipe file

If I create a brand new Cordova project (JavaScript or TypeScript) and try to debug on Ripple or on the local machine I get an error during build that says "Could not locate the appxrecipe file."
I googled it and nothing comes up. What is this file and how does it get generated? Shouldn't it be generated when I create the project?
I've already lost an entire day to this, running repairs on visual studio and trying things that had no effect. Frustrating!
This took a while to figure out but it seems that the version of node.js that would get installed with Visual Studio was too old (0.10.x). When I installed the x64 version of node.js from the node website, it installed a 64 bit version which also wouldn't work with Cordova in Visual Studio.
The answer was to install the 32bit version of node.js (node-v5.1.0-x86.msi) available from their website. Now everything compiles correctly!
I was also stucked with the issue but my problem was little bit different. I wanted to build a project for Windows 10 Mobile platform.
It was really weird because everytime when I tried to build a project from CLI with ionic build windows, the build was successul. But it had been throwing the error about appxrecipe file while building with Visual Studio again and again.
Then I noticed that everytime I open a project in Visual Studio (2015, Community Edition) there is one change when you open your confix.xml file in Visual Studio editor - the change was that Windows Target Version was set to 8.1 again. I tried to change it to Windows 10 again, save it and build but the error was still there.
I have solved it with installation of Microsoft Emulator for Windows 10 Mobile and it works like a charm now. Maybe this information could be helpful for somebody...

Resources