Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jon2029
Beginner
233 Views

Using MSBuild with IPC 2011

Jump to solution
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
233 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

8 Replies
JenniferJ
Moderator
233 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-co...

Jennifer
jon2029
Beginner
233 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
JenniferJ
Moderator
233 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
jon2029
Beginner
233 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?
JenniferJ
Moderator
233 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

233 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
234 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

JenniferJ
Moderator
233 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
Reply