Visual Studio 2019 won't compile any C# project after Visual Studio 2017 uninstall - visual-studio

I uninstalled Visual Studio 2017, then installed Visual Studio 2019.
Visual Studio 2019 doesn't compile any C# project, even if I make a completely new one, with this error:
The specified task executable location "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe" is invalid.
I can't find where this path is stored. How can I fix it?

Related

Visual Studio 2015 Installer doesn't install cl.exe

I had installed Visual Studio 2017 on my machine with VC2015.3 C++ compiler toolset. The VC14 compiler is now located in C:\Program Files (x86)\Microsoft Visual Studio\Shared\14.0\VC\bin\cl.exe
Now, when I install Visual Studio 2015 and select to install "Common Tools for Visual C++ 2015" there is no cl.exe in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin as expected and as it always have been.
It's just like the installer "know" that I have already VC14 compiler installed (through VS2017) and skips it completely.
What is the issue here?

How to Enable WiX Projects in Visual Studio 2017

In Visual Studio 2017's New Project dialog, there is no entry for Windows Installer XML (WiX).
Is it possible to enable WiX projects in Visual Studio 2017?
You can manually enable Visual Studio 2017 compatibility with WiX 3.10 or earlier:
Close all instances of Visual Studio.
Copy
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\WiX to
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\WiX
(In the destination path, replace "Enterprise" with "Professional" or "Community" depending on your edition.)
You may need to provide Administrator permission:
The result will look like this:
Copy C:\Program Files (x86)\MSBuild\Microsoft\WiX to C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WiX
Then execute the following command as Administrator:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv" /setup
(Again, replace "Enterprise" with "Professional" or "Community" depending on your edition.)
When you open Visual Studio 2017, WiX 3.10 and earlier projects will be compatible.
WiX v3.11.0.1507 provides full support for the VS 2017 Extension For WiX.
The Release Notes provide insight into why it has taken so long to provide the extension and compatibility with the extension and older versions of WiX
Note: You can use the "WiX Toolset Visual Studio 2017 Extension" with previous versions of the WiX Toolset but there is a forwards compatibility issue when building managed custom actions that is only fixed in the WiX v3.11 RC release. In other words, if you have managed custom actions and you want to use VS 2017 then you must upgrade to WiX v3.11 RC.
Edit:
The VS 2019 Extension is now available.
Edit:
The VS 2022 Extension is now available.
The Wix Releases Page has links to the other extensions.
I found that I also had to copy the WiX folder from "C:\Program Files (x86)\MSBuild\Microsoft" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft". Without this, I got an error trying to load my WiX project that one of the MSBuild targets files couldn't be found.
WiX now offers support for Visual Studio 2017.
All you have to do is:
Close Visual Studio 2017
Install the WiX Toolset Build Tools
Install the WiX Toolset Visual Studio 2017 Extension
The answer by Chris works, but on my machine, for some reason, the Wix folder in "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\WiX" had only one template named "CustomActionCPP.zip". I had to search for a complete Wix folder in other older versions of Visual Studio. It worked for me by copying Wix from "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\WiX\ProjectTemplates".
Also, had to apply the answer by Basim, by copying Wix from "C:\Program Files (x86)\MSBuild\Microsoft" to "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft".
I have installed ONLY VS2017 and had to copy from another machine where VS2015 was installed the mentionen folder of #Chris Schiffhauer. The same for the folder of #Basim mentioned.
Addiontally I had to copy the "C:\Program Files (x86)\Wix Toolset 3.10\" because when I have installed WiX on my machine in this folder were still some assemblies missing.
Install the Wix Toolset Visual Studio 2019 Extension and reload the project
right-click the project folder in the path and uncheck the read-only
after install the Extension reload the Wix
use the below URL download
https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2019Extension

Does Visual Studio 2015 have float.h?

I may be going crazy here.
Visual Studio 2013 has float.h located at
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\float.h
There are references to float.h in the MSDN docs for Visual Studio 2015.
Yet in the directory Visual Studio 2015 is located at, there's no float.h:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\float.h (doesn't exist)
Has it been removed?

Visual Studio 12.0: missing library "msvcmrt"

I'm trying to use Visual Studio 2015 to compile a VC++ project that, however, targets the Visual Studio 2013 build tools.
I noticed that the Visual Studio 2013 (12.0) tools and libs seem to have been installed alongside VS2015, as I see the C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib directory, with all the libs. Seems fine.
But... it's not. Two lib files are be missing: msvcmrt.lib and msvcmrtd.lib, and without these I cannot compile the project.
My question is: how do I acquire these? Do I have to install VS 2013 from scratch? Or is there a more convenient package available to install? Or is my VS2015 installation damaged, and the files should have been there?
I had a similar issue and I solved it by simply copying msvcmrt*.lib from a machine with vs2013 installed.
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib
There'll be 6 files to copy (x86/arm/x64) * (debug/release)

How to debug x64 with Visual Studio?

I'm trying to create my first Silverlight application. It seems that it can't be debugged because Visual Studio 2010 uses the x86 'Remote Debugger'. It that I also have the x64 bit version installed in:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x64
But I can't find how I'm supposed to make VS 2010 use
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x64
instead of
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x86
Thank you.

Resources