Intel Compiler 18.0 Toolset raises exception with msbuild - visual-studio

I reinstalled my machine and installed Visual Studio 2017, Visual Studio 2019 (Preview) and the Intel Compiler 18. Due to unknown reasons, my projects do not work anymore, and I can't figure out what's causing it. Did anyone ever experience the following error message?
My project uses the Intel C++ Compiler 18.0 toolset.
Visual Studio 2017 error message:
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\xmemory0(178):
error : identifier "__STDCPP_DEFAULT_NEW_ALIGNMENT__" is undefined
1> enable_if_t<(!_HAS_ALIGNED_NEW || _Align <=
__STDCPP_DEFAULT_NEW_ALIGNMENT__), int> = 0> inline
Visual Studio 2019 (Preview) error message:
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Platforms\x64\PlatformToolsets\Intel C++ Compiler 18.0\Toolset.targets(150,5):
error MSB4062: The "ICMessage" task could not be loaded from the assembly C:\Program Files %28x86%29\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Intel.Build.ICLTasks.v150.dll.
Could not load file or assembly 'file:///C:\Program Files %28x86%29\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Intel.Build.ICLTasks.v150.dll' or one of its dependencies.
The system cannot find the file specified.
Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Before the reinstallation, my project worked fine. Does anyone have an idea what's going on here?

The system cannot find the file specified.
1.Check whether the Intel.Build.ICLTasks.v150.dll exists in the path C:\Program Files (x86)\Microsoft Visual Studio\2017\xxx\Common7\IDE\VC\VCTargets. According to the error message it's not there, so i guess the Intel Compiler 18 was not successfully installed.
Note that recommended order to do the installation is: Install VS successfully and then install Intel Compiler. If you install the Intel Compiler before installing the VS2017, it will cause issues.
e.g: After installing VS, when I install the Intel Parallel Studio, it will download several files and assemblies to folder C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets for future development. So if I install Intel compiler before installing VS, I can't find Intel.Build.ICLTasks.v150.dll there.
2.And for your original error message in VS2017, I suggest you update your Intel Compiler to 2019 Update3 and higher, see versions. When you reinstall VS, the installer will download latest 15.9.16 version(newer than your old version), so you also need to upgrade your Intel compiler version to resolve some conflicts.

Related

unable to build an executable out of CUDA Samples using Visual Studio

I am trying to make executables out of the Cuda Samples . My specs are CUDA 11.5 with Visual Studio 2019. When I check on the samples.sln file to build the executable of all the CUDA samples, I get the following message:
"C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v11.5\7_CUDALibraries\batchedLabelMarkersAndLabelCompressionNPP\batchedLabelMarkersAndLabelCompressionNPP_vs2019.vcxproj
: error : The imported project "C:\Program Files (x86)\Microsoft
Visual
Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA
11.5.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA
11.5.props" is correct, and that the file exists on disk. C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v11.5\7_CUDALibraries\batchedLabelMarkersAndLabelCompressionNPP\batchedLabelMarkersAndLabelCompressionNPP_vs2019.vcxproj"
Some background:
I understand that it is important to check compatibility of your CUDA version with Virtual Studio. To that end, when I had initially installed VS 2022 Community edition and then I attempted to install CUDA 11.5, I got the message that CUDA couldn't locate VS on my system. Then I tried installing VS 2019 first and then I tried to re-install CUDA 11.5. This time, I did not get the previous warning message and thought that all was good. But alas that was not the case!:(
Any advice or insight would be greatly appreciated on how to tackle this issue! Thank you in advance
Solved:
The following configuration ran fine:
Microsoft Visual Studio 2013 Community Edition, Nsight
Visual Studio Edition 4.7, and CUDA 7.5.

error: Microsoft Visual C++ 14.0 or greater is required

While installing python package I get the following error even though I have latest Microsoft Visual Studio BuildTools installed.
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
I have added all possible paths to Path variables as well
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\v16.0\Python Tools
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
C:\Program Files (x86)\MSBuild\14.0\Bin
C:\Program Files (x86)\MSBuild
Installing fulll vs_BuildTools solved it for me . For details follow
https://www.scivision.dev/python-windows-visual-c-14-required
Note MSVC vXXX - VS YYYY C++ x64/x86 build tools version and Windows 10 SDK versions must match
Quick solutions like instaling vc_redist.x64 or VC_redist.x86 didn't
solve it for me.
Nothing needs to be added to environment variables.
Answer
If your vscode is supported in 32 bit version, it raises when you start install some packages. I recommended you to install 64 bit vscode if you are using windows 10.

PVS Studio not working with MSVS not installed in default location

Due to disk size constraints, I installed MSVS 2017 to D:\Program Files\Visual Studio.
I then installed PVS-Studio v6.14. When I tried to run it, I get the following error messages:
Error was encountered while opening project 'MIDI2LR.vcxproj'. 0
Exception message: 0
Could not find a part of the path 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC'. 0
It also appears that PVS-Studio did install its extensions into the D:\Program Files\Visual Studio\Common7\IDE\Extensions\3ci0fu2p.p0x directory, so it appears that the installer found the executable.
How do I point PVS-Studio to the correct directories?
If I have understood correctly, we are talking about /Builds/VisualStudio2017/MIDI2LR.vcxproj from your repository (develop branch). If you're talking about another project, please specify it. The information is based on the analysis of the project I mentioned before.
Does this project compile on your machine? If a project does not compile, PVS-Studio does not guarantee the analysis. Otherwise, the analysis should be performed correctly. I also note that for the compilation you have to have the components Visual C++ Build Tools 2015 installed (in this context we use the contents of the directory C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC).
In this case, such behavior occurs because of your project's file structure – the PlatformToolset property is set with a value v140 before the import of Microsoft.Cpp.Default.props, thus this import is performed based on this toolset. This causes MSBuild to use the compiler from Visual C++ 2015, and not from Visual C++ 2017.
To compile using the compiler from VS2017 (V141 toolset), you need to modify the project file (see example of a console application project file that is created in Visual Studio 2017). Then the compilation should be done with a correct compiler and the analysis with PVS-Studio performed correctly.

Build with sdk 7.1 on VS2015

I have Visual Studio 2015 installed, and I need to compile a specific project with Visual C++ 2010 compiler, which is included in SDK 7.1.
I want to use 2010 compiler within VS2015, without install VS2010.
So, I installed it (the SDK), and "Visual Studio 2010 (v100)", "Windows7.1SDK" options appear under "Platform Toolset" property in the project properties.
But, when I try to build the project, I get those errors:
With "Windows7.1SDK" -
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(146,5): error : Required file "" is missing.
and with "Visual Studio 2010 (v100)" -
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(146,5): error : Required file "" is missing.
Can't figure out what the problem is..
I had the same issue for 2 weeks and just found a workaround that might help :
Without modifying anything to my VS2010 projects (not changing the toolset in the vcxproj), I use the command line build tools MSBuild tools with the toolset specified as a switch as found here Building C++ project on a PC with Windows SDK 7.1 but without VS2010
msbuild /p:PateformToolset=Windows7.1SDK project.vcxproj
(In my case, the corresponding msbuild is in the folder C:\Windows\Microsoft.NET\Framework\v4.0.30319)
If Msbuild throws an error telling its missing mspdb100.dll, you may need to add %PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\Common7\IDE\ to your %PATH% env var.
Finally, you may have some files missing like ammintrin.h (especially if like me you try to compile old InDesign plugins) even after installing the visual c++ updates.
The only (and ugly) workaround I found in my case that does not involve installing VS2010 (the common answer of MS) is to copy the missing includes from the %PROGRAMFILES(X86)%\Microsoft Visual Studio 14.0\VC\include folder to the %PROGRAMFILES(X86)%\Microsoft Visual Studio 10.0\VC\include one.
Voila ! Hope this helps

QtQreator 5.2 won't compile any project and gives C1083: Cannot open include file: 'stddef.h': No such file or directory

I installed Qt5.2 msvc2012 version on my system, and after couple of failed tries to compile my projects - which were coded in the mingw version on windows (actually the Android package one) - I tried to create a new gui project and see if that works.
No surprise it didn't work and gave me the error:
F:\ms\Qt5.2.0\5.2.0\msvc2012\include\QtCore\qglobal.h:46: error:
C1083: Cannot open include file: 'stddef.h': No such file or directory
I searched a lot of places but couldn't figure out what was causing this problem. I even uninstalled the mingw version completely (5.2.0-android-x86-win32-offline.exe) still no luck.
I had Visual Studio 2010 and Visual Studio 2013 installed on my system when I went for installing qt5.2, the mingw version worked fine till when I had to switch to msvc for my project. I tried installing 5.2.0-msvc2012-x86-offline.exe and noticed it needs Visual Studio 2012 in order to compile, so I went and installed Visual Studio 2012.
After that I am getting such error plus several ones mentioned here. I even tried installing WDK and WSDK but it's not working. The path I believe is configured correctly and files do exist. This is my include path in environmental variable on windows 7sp1 x86
J:\Program Files\Microsoft Visual Studio 11.0\VC\INCLUDE;J:\Program Files\Microsoft Visual Studio 11.0\VC\ATLMFC\INCLUDE;C:\Program Files\Windows Kits\8.0\include\shared;C:\Program Files\Windows Kits\8.0\include\um;C:\Program Files\Windows Kits\8.0\include\winrt;
What is wrong and how can I solve this problem?

Resources