问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/58253760/intel-compiler-18-0-toolset-raises-exception-with-msbuild