Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Using MSBuild with IPC 2011

jon2029
Beginner
1,540 Views
I have been using Intel Parallel Composer 2011 to compile C++ projects from within Visual Studio 2010 for some time now, but I would like to now build using MSBuild. When I do, however, I get the following error:

C:\\Program Files (x86)\\MSBuild\\Microsoft.Cpp\\v4.0\\Platforms\\Win32\\PlatformToolsets\\Intel Parallel Composer 2011\\Microsoft.Cpp.Win32.Intel Parallel Composer 2011.targets(38,5): error MSB4062: The "ICMessage" task could not be loaded from the assembly Intel.Build.ICLTasks.ICMsgTask, Version=12.0.0.0, Culture=neutral, PublicKeyToken=3c0c138f5bbab72f. Could not load file or assembly 'Intel.Build.ICLTasks.ICMsgTask, Version=12.0.0.0, Culture=neutral, PublicKeyToken=3c0c138f5bbab72f' or one of its dependencies. The system cannot find the file specified. Confirm that the 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.
This error occurs on any project. I have attached a test solution.
Thanks
0 Kudos
1 Solution
Weslien__Kaj-Robin
1,540 Views
I finally found a workaround to the problem. It seams like there was a dll version problem. The compiler tried to find version 12.0.0.0, but the dll on my machine was 12.0.1.0.

I added the Intel.build.ICLTasks.ICMsgTask.dll into the GAC (gacutil.exe /i Intel....dll) and it worked!
I have no clue why this happened in the first place.

View solution in original post

0 Kudos
8 Replies
JenniferJ
Moderator
1,540 Views
what is your msbuild cmd?
I tried with 12.1 update 9 (XE version though), it works.

My cmd is:
>>msbuild.exe TestIntelProject.sln /t:Rebuild /p:Configuration=Release;Platform=win32 /p:PlatformToolset="Intel C++ Compiler XE 12.1"

Also see this article - http://software.intel.com/en-us/articles/build-the-visual-c-2010-project-with-msbuild-and-intel-c-compiler-from-command-line/

Jennifer
0 Kudos
jon2029
Beginner
1,540 Views
Thanks for getting back to me.
my cmd ismsbuild.exe TestIntelProject.sln /t:Rebuild /p:Configuration=Release;Platform=win32 /p:PlatformToolset="Intel Parallel Composer 2011"
I am running through VS x64 Win64 Command Prompt (2010)
I do not have any other version available
0 Kudos
JenniferJ
Moderator
1,540 Views
You need to get the command prompt from Intel C++ Composer menu similarily like below:

all programs > Intel Parallel Composer > Command Prompt > IA-32 Visual Studio 2010 mode

This will set up the environment like "path", "include", "lib" correctly for both IntelC and VS2010. Then run your cmd from this command prompt.

Jennifer
0 Kudos
jon2029
Beginner
1,540 Views
My goal is continuous integration using TeamCity build server. I would like to use the built-in support for VS 2010 sln's. What is the best way of going about doing this?
0 Kudos
JenniferJ
Moderator
1,540 Views

I'm not familar with TeamCity build server. if it's from command window, you just need to call the Intel Parallel Composer 2011's env script to set up the env before calling "msbuild".

So in your scriopt that sets up the build env, add the following line to set the env for Intel C (it will also set the env for VS2010). This is for building IA32 program.
"C:\Program Files\Intel\Parallel Studio 2011\Composer SP1\compilervars.bat" ia32 vs2010

For build x64 program, use
"C:\Program Files\Intel\Parallel Studio 2011\Composer SP1\compilervars.bat" intel64 vs2010

Jennifer

0 Kudos
Weslien__Kaj-Robin
1,540 Views
Hi,

I have exactly the same problem building a project with Intel c++ compiler using TFS automatic build (MsBuild).
Here is the complete error message:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\PlatformToolsets\Intel C++ Compiler 12.1\Microsoft.Cpp.x64.Intel C++ Compiler 12.1.targets (38): The "ICMessage" task could not be loaded from the assembly Intel.Build.ICLTasks.ICMsgTask, Version=12.0.0.0, Culture=neutral, PublicKeyToken=3c0c138f5bbab72f. Could not load file or assembly 'Intel.Build.ICLTasks.ICMsgTask, Version=12.0.0.0, Culture=neutral, PublicKeyToken=3c0c138f5bbab72f' or one of its dependencies. The system cannot find the file specified. Confirm that the 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.

I tried your suggestion to set compilevars.bat as a pre-build event, but no luck.

Did you resolve this issue? If so, could you please share the solution.

Regards Kaj
0 Kudos
Weslien__Kaj-Robin
1,541 Views
I finally found a workaround to the problem. It seams like there was a dll version problem. The compiler tried to find version 12.0.0.0, but the dll on my machine was 12.0.1.0.

I added the Intel.build.ICLTasks.ICMsgTask.dll into the GAC (gacutil.exe /i Intel....dll) and it worked!
I have no clue why this happened in the first place.
0 Kudos
JenniferJ
Moderator
1,540 Views
Thanks for posting the answer.

Looks like in this situation the installation didn't clean the old gac registry data. Let me try to find the steps to duplicate this issue and get it fixed.

Jennifer
0 Kudos
Reply