Is the LLVM-vs2014 toolset removed from clang 7 and 8? [duplicate] - visual-studio

This question already has an answer here:
LLVM 7.0 does not provide specific Platform Toolset on Visual Studio 2015
(1 answer)
Closed 3 years ago.
Using clang 6.0.1 I can create MSVC projects with LLVM-vs2014 toolchain to build them with clang.
Clang 7.x and 8.x seem not to include such a toolchain. Is the feature deprecated, unsupported, or is there just another way to use it?

I does seem that the VS specific toolchains are not included in the later releases of Clang. You can always check what build tools are available by right clicking your project in VisualStudio selecting Properties and then look under Platform Toolset:
Another option is to use this visual studio extension which should allow you to use an existing installation of clang you have on your machine.
Finally, starting with Visual Studio 2017, there is an experimental version of Clang that you can use as a platform toolset called Clang/C2. You'll need to run the Visual Studio Installer to ensure that you have installed it, but otherwise it should show up in the platform toolset as v141_clang_c2 as shown in the image above.
Edit: As per the comment below, it seems that Clang/C2 has been abandoned and is no longer a good, long term option.
I've spent a lot of time in the past trying to get newer versions of clang to play nice with Visual Studio and it hasn't been fun (or fruitful). Hopeful this type of support gets better in the future. As a side note, if you're not generating solution files with CMake and instead use Visual Studio "Open Project" feature for CMake based projects, you may be able to manually set CMAKE_CXX_COMPILER and CMAKE_C_COMPILER to force the use of Clang.

Related

Is Microsoft C++ Build Tools available as portable (without installation)

We are currently using CUDA on windows which requires MS C++ Build tools installed. With every new version of the CUDA toolkit it happens that newer versions of Visual Studio are not supported. That's why we are using the MS build tools seperately so that the VS version doesn't matter.
Since its hard to guide our developers to install the right CUDA and MSVC version we have packaged it into NUGET packages so that the toolkit (especially NVCC) is in a defined version and location. Additionally we wanted to do this with MSVC but we couldn't find a good solution since the installer obviously does modifications on several places that we don't know.
Is there any good way to get the MSVC tools portable so that we can simply drop it into a folder and put the right pathes?
NVCC doesn't support GCC, otherwise I would have gone with this.

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.

How do I set a different API contract to be used in Visual Studio for a Universal App?

I've retargeted my C++/CX UWP project to the latest Windows version (10.0.10586) available to me. However, under references, the Windows.Foundation.UniversalApiContract version shows 2.0.0.0, the latest is 3.0.0.0 introduced in 10.0.14393.0. I need to use the features in 3.0.0.0, but I can't figure out for the life of me how to use it. I've looked through the .vcxproj, and the appxmanifest and I can't find anything relevant. There's nothing I can find in the GUI either. How do I change the version?
You can set the target version in the project properties.
In the Project Properties editor it's in the config tab's Target Platform Version:
In the vcproj it's the WindowsTargetPlatformVersion:
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.10586.0</WindowsTargetPlatformMinVersion>
You'll need to have the 14393 SDK installed from https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk . If Visual Studio thinks 10586 is the latest then you probably don't have the updated SDK. You should also make sure you have the latest update to Visual Studio (2015 Update 3 or 2017 RC)

MSVC2012 - does it have 10 toolset?

I need to compile some CUDA code with MSVC2010 but I might consider buying MSVC2012 instead of MSVC2010 if I can switch toolset to 10 from MSVC2012 options.
Is that possible or MSVC2012 just ships with the 11 toolset?
As noted in the comments, you can only get the v100 toolset in VS2012 if VS2010 was already installed on the machine. So high odds that you'll need to choose VS2010 if the Cuda tool-chain you use doesn't support VS2012 yet.
A quick google turned up this blog post, showing you how to setup VS2012 to run the NVidia Cuda 5.0 tool-chain. It isn't clear from your question whether this applies. Do take a look at this, VS2012 is an excellent VS2010 service pack ;)

using Qt 5.0 with Qt Creator and vs2010 compiler

I recently decided to upgrade from Qt 4.X to 5, though now it has only vs2010 supported. Whenever I start Qt Creator I get that there isn't any compiler (and there are no options in the settings to set one).
Question:
How do I download the vs2010 compiler? Do I have to download vs2010 itself? Will I get a debugger as well?
I have tried this suggestion, but Qt didn't pick up the compiler: Using Visual Studio as a Compiler for QT Creator
Sorry if this question have been asked before, but I have been unable to find a source that explains what I should do.
Seems like you didn't install MSVC yet. Get it from Microsoft website.
Than download sources from Nokia. Unpack them to a new folder e.g C:\QtSources and compile them with MSVC. This instructions are working just fine.
Finally add them to Qt Creator in
Tools -> Options -> Building -> Qt Versions
by poiting to your new qmake executable in
C:\QtSources\bin\qmake.exe
Hope Qt 5 will work with free Express Edition of MSVC.
You shouldn't need to re-compile Qt, as the SDK version is built with msvc2010 32-bit. For debugging, you may need to download the Windows SDK 8. Qt Creator may auto-detect your compiler and debugger, but if not, proceed as follows:
Under Options/Build & Run/Qt Versions, point to qmake.exe
Under Options/Build & Run/Kits, set "Qt Version" to the one you just created, and set your compiler and debugger
The compiler should be auto-detected if it's on your system.
The debugger is something like C:\Program Files\Windows Kits\8.0\Debuggers\x86\cdb.exe.
Good luck!

Resources