Hi. I have a problem using MSBuild and InstallShield on Win 2008 Server x64. I tried to build InstallShield project using MSBuild task which InstallShield team provided and they works well if I run msbuild from C:\Windows\Microsoft.NET\Framework\3.5\ but when I try to run it from C:\Windows\Microsoft.NET\Framework**64** \3.5\ I`ve got an error:
The "InstallShield.Tasks.InstallShield" task could not be loaded from the assembly c:\Program Files (x86)\MSBUILD\InstallShield\2009\InstallShield.Tasks.dll. Could not load file or assembly 'file:///c:\Program Files (x86)\MSBUILD\InstallShield\2009\InstallShield.Tasks.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the declaration is correct, and that the assembly and all its dependencies are available.
And it will be ok to use 'usual' Framework path instaed of x64 path but unfortunatly I need to use MSBUILD programmatically using its engine, and it returns only 2 toolsets, one for 2.0 version Of Framework and one for 3.5. But both located under Framework64 path...I tried to Add My own Toolset with the path to the 'usual' Framework directory. I tried to do it via registry and programmaticaly but it did not work - DefaultToolsVersion was set to my own value, Path looks to the Framework, Toolset with my version was added to the toolsets collection.But for some reason I still get the same message. The code which is build project:
Project project = new Project(engine);
//Toolset customToolset = new Toolset("4.0", @"c:\windows\Microsoft.Net\Framework\v3.5\");
//engine.Toolsets.Add(customToolset);
//engine.DefaultToolsVersion = "4.0";
project.Load(args[0]);
MSBuildLogger logger = new MSBuildLogger();
engine.RegisterLogger(logger);
bool res = engine.BuildProjectFile(args[0]);
Anyone has ideas what should I do to make it work?