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.
Related
Just installed VS 2019 Pro on a new system. When I open a solution with .net 4.0 project, I get this error: Project Target Framework Not Installed.
When I choose download it, it goes here but does not have option for .net framework 4.0.
In project settings there is no option for .Net Framework 4.0 in targeting framework:
https://dotnet.microsoft.com/en-us/download/visual-studio-sdks?cid=getdotnetsdk
I have tried installing 4.6.2, 4.5.2, etc.
How can I get this project to open? It opens on my other machine. It has these options for Target framework in project settings:
Please don't say change the framework version, we need this older version for very old computers running XP and Win 7 that cannot be upgraded.
thank you
You have to go directly to their download site. As shown in another correct answer that was downvoted, it's still available even though it's past end-of-life.
https://stackoverflow.com/a/72870727/9008140
You can package the install files with your app just in case, although most likely your installer will see that it's missing and download it anyway.
You can try downloading .Net 4.0 here: https://dotnet.microsoft.com/en-us/download/dotnet-framework/net40
Mandatory warning: Installing an old, unmaintained .Net framework comes with security risks. It's up to you to determine how much those Windows XP PCs are vulnerable and manage said risks.
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
Trying to run an old project in Visual Studio 2015. It was created in 2012 or 2013, I cannot remember which. I have uninstalled both programs as I was running out of space, and i think that is what caused this. I get the following options:
And I do not want to change the target, so clicking on the second option brings me to https://www.microsoft.com/net/targeting which I can't seem to find anything there that remedies the situation. Is there a way around this without reinstalling the old version of Visual Studio again? Will that even fix my problem? Thank you.
Just Reinstall Visual Studio. When you uninstalled previous version it caused this problem.
You could try doing a repair reinstall of Visual Studio 2015.
Another point to consider is that Windows 7 (the oldest version of Windows still supported by Microsoft) includes a Windows Update for the .NET Framework v4.6.1 categorized as an "Important" update. I have not confirmed with Windows 8, but I suspect it, too, includes a similar update. Windows 10 comes with .NET 4.6 to start with. That means that any up-to-date supported machine today will be able to run apps targeting any .NET version up to and including 4.6. I recognize that there may be other reasons to continue targeting an older .NET version, but I bring this up just in case the concern is support on client workstations.
I just installed visual studio 2010 but when i create a new project Framework 4 does not appear in the options for target framework. I know framework 4 installed correctly because the new app pools set to v4 were created in IIS. For some reason it's just not showing up in visual studio. I tried repairing dotnet 4 and reinstalling visual studio but still no luck. Anyone else have this problem or know how to fix it?
First of all you shoul use the .NET Framework Setup Verification Tool to check the .NET 4 have been properly installed.
I also recommend you to check the both products language, sometimes it could be the problem.
If everything is ok, i guess you have registry problem, so you would have to check the installation keys or use .NET uninstall tools.
More info:
Detection keys for .NET Framework 4.0 and Visual Studio 2010
Uninstall .NET Framework Tool
Visual Studio does not detect .NET Framework 4
Hope helps!
I had the same problem and it turned out to be that I needed the Microsoft .NET Framework 4 Multi-Targeting Pack. No other combination of actions would fix this.
I tried all the ways but no success,
According to this link,you can solve this problem by copy frameworklist.xml file from another computer and paste it in your system.
I had the same problem and I resolved it. I found out that there were no file FrameworkList.xml in folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\RedistList.
But I noticed this file in machine where .Net Framework 4 is accessible from VS
2010. Then I copied this file to my computer and restarted VS 2010. And .Net Framework 4
appeared from drop down list.
I attached frameworklist.xml file from my system :Download frameworklist.xml
Changes which lead to missing .Net4 problem:
1.
I changed some registry settings in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
CommonFilesDir
CommonFilesDir (x86)
CommonW6432Dir
ProgramFilesDir
ProgramFilesDir (x86)
ProgramW6432Dir
All those were moved from C: drive to another drive (E: in my case)
2.
I changed the location of some user folders:
C:\Users\<name>\AppData\LocalLow
C:\Users\<name>\AppData\Roaming
Those were moved (via Properties->Path->"Move" button) from C: drive to F: drive.
After reverting 1. back to drive C:
and creating symbolic links in C:\Users\<name>\AppData to the new locations,
it worked again (note: I uninstalled VS before reverting the changes, and installed again afterwards)
(Create link with: mklink /d C:\Users\<name>\AppData\LocalLow E:\Data\LocalLow)
I can not say if both changes are really needed, because I changed both at once.
But finally it works again ;)
Greetings,
Frostregen
I'm seeing the same problem. We were using my build box to test installs of a WinForms app on a machine without 4.0. We bundled 4.0 in the manifest and the app works, Framework 4 Client Profile and Framework 4 Extended show up in add/remove programs, but there is still no 4.0 Framework in the VS2010 options.
BTW, reloading SP1 was no help.
I finally got this working by running the VS2010 setup in repair mode. I now see Framework 4.0 options in VS2010.
That was a long and tedious process and now I have to patch to SP1 again. MSFT should fix this behavior in a SP soon.
Had the same problem. Numerous uninstalls and reinstalls of visual studio 2010 and the .NET 4.X frameworks didn't fix it.
Manually uninstalling the "Microsoft Visual Studio Macro Tools" item and then doing a repair install of VS2010 seems to have done the trick.
I had the same problem this week and it got resolved by installing Visual Studio 2012 RC.
Removing and reinstalling .NET Framework 4 didn't help and I couldn't reinstall Visual Studio 2010. After installing the 2012 RC the Framework 4
I had installed .NET 4.5, which ended up breaking something, so decided to uninstall. VS 2010 could not longer see .NET 4.0. I tried using the .NET cleanup tool and reinstalling, but no go.
Eventually what worked was what is posted at http://social.msdn.microsoft.com/Forums/eu/netfxsetup/thread/3dede142-82ce-430c-bbe6-d824f0fb94a4. I installed Windows Phone Developer Tools (http://www.microsoft.com/en-us/download/details.aspx?id=13890) up until the multi-targeting package, at which point I canceled installation.
You can reinstall the targeting pack using this command, this solved my issue:
Microsoft .NET Framework 4 Multi-Targeting PAck
WCU\MTPack
COMMAND--> NetFx_DTP.msi EXTUI=1 /log "%TEMP%\dd_netfx_dtp.txt"
I think it's because you installed higher version of .net framework, such as .net framework 4.6, Which caused the mistake of missing .net framework 4.0.
For me using Arash's fix worked "there were no file FrameworkList.xml in folder C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\RedistList".
I noticed I had other .NET versions and just copied the FrameworkList.xml from one of those to 4.0 RedistList folder and it worked.
Problem:
VS2010 ->Right Click on Project -> Property Pages - > Build->Target Framework
is showing up to .NET 3.5 only. I have installed up to .NET 4.5 framework.
Solution:
I tried many solutions and decided to take a drastic step to format. The following way I got the solution without formating o/s.
Removed all .NET installations
Installed one by one from 1.0 to 4.6 with sps available.
VS2010 setup with repair option selected.
Opened vs2010 project and .NET framework up to 4.0.3 found in the list.
Regards, S.SREENIVAS RAO
I'm having a problem on my TeamCity CI build server where during compilation I get the following error:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2342, 9): error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed
I've found similar reports from a year ago when people were upgrading to .NET 3.5, for example this one. In that case, installing the latest SDK solved the issue, however I have already installed the latest SDK (Microsoft Windows SDK for Windows 7 and .NET Framework 4) on my build server. The MSBuild tools are all there on the server, in a folder called
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319
and AL.exe exists in
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools
However the registry key mentioned in the error message does not exist. So, it seems like there is something wrong with the installation/configuration of MSBuild. This error only happens for projects that have embedded resources, which require AL.exe.
As you have install the latest SDK (I'm assuming that's v7.1)
Go to "Microsoft Windows SDK v7.1" from the Start menu
Select "Windows SDK 7.1 Command Prompt" and enter
cd Setup
WindowsSdkVer -version:v7.1
This will tell msbuild to use that version of the tools without needing to do any scary registry editing.
Even though the question is quite old but it still appears in the top of google search results so I decided to post my solution as well. I have trapped into same issue while during TeamCity setup on Windows Server 2016 and Windows 10 Pro.
I have installed Microsoft Build Tools 2015 and Windows 10 SDK (Only tools for .NET 4.6.2) and got the error from question.
The missing puzzle was to set environment variable: TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools.
After setting environment variable MSBuild was able to resolve all needed tools including AL.exe and build succeeded.
Please let me know if same can be achieved by setting values in registry, but otherwise environment variables also works very well in this case and no installation of VS is needed.
You also need to apply the following registry fix to update msbuild to point to the V7.1 sdk values.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0]
"MSBuildToolsPath"="C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\"
"MSBuildToolsRoot"="C:\\WINDOWS\\Microsoft.NET\\Framework\\"
"FrameworkSDKRoot"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1#InstallationFolder)"
"MSBuildRuntimeVersion"="4.0.30319"
"SDK40ToolsPath"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1\\WinSDK-NetFx40Tools-x86#InstallationFolder)"
"SDK35ToolsPath"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.1\\WinSDKNetFx35Tools#InstallationFolder)"
"MSBuildToolsPath32"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\4.0#MSBuildToolsPath)"
I had the same problem there, here's my simple answer to this.
After you have installed the Microsoft Windows SDK 7.1 on the TeamCity Server.
In Regedit Change this key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0\SDK40ToolsPath
to
$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools-x86#InstallationFolder)
Follow the below steps. This worked perfectly to me. Saved my time.
1- Right-click the My Computer icon and choose Properties, or in Windows Control Panel, choose System.
2- Choose Advanced system settings.
3- On the Advanced tab, click Environment Variables.
4- Click New to create a new environment variable under User variable section.
5- Variable name: TargetFrameworkSDKToolsDirectory
6- Variable value: TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools
Variable value depends on your SDK installation path.
7- Click OK and Save all windows.
8- Restart Visual Studio.
I have a simple, effective fix.
The problem seems to be that the tools version delivered with Visual Studio is version 7.0A, while the version delivered with the Windows SDK is version 7.1. That's all very well, but MSBuild.exe is still looking for the version 7.0A registry keys, which don't exist. This has to be a bug!
Looking in my registry, all the information for V6.0 and V7.1 is present and correct. So my solution is simple. I created a registry link that makes an alias of the 7.1 keys.
It's not possible to create registry links using the built-in tools, so I downloaded a little utility called 'regln' from here.
C:>regln-x86.exe "\Registry\Machine\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" "\Registry
\Machine\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1"
Job done. MSBuild now works perfectly on the TeamCity server.
Add a system env variable TargetFrameworkSDKToolsDirectory
like this:
TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools
restart VS
Ran into the same issue setting up a new build server on Windows 10.
Found and installed the latest (at the time) Microsoft Windows SDK for Windows 7 and .NET Framework 4 and that solved the problem.
We recently had this problem trying to get our .Net 4.0 builds working. We found that the location of al.exe had changed between where the original MSBuild that came with .Net 4.0 looks, and the Visual Studio SDK for .Net 4.0 (which was released later).
Since the only standalone installation of the SDK tools available is the one we had already installed without success (the one you mentioned), the only solution we could think of was to install Visual Studio on the build agents. We put Visual Studio 2010 Express (to keep the installation as lightweight as possible) on there and the problem went away. Not a pretty solution, but it did work - installing VS2010 also installs the SDK tools of the specific version that MSBuild appears to be looking for.
This is a problem that really shouldn't happen, but there didn't seem to be a way of making MSBuild look in the correct place for the tools, even hacking around in the registry.