Click here to Skip to main content
15,894,249 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am getting a weird error while i build a WIX project in Visual Studio 2012. It is working fine with Visual Studio 2010.

So does anybody has any idea why it is throwing such type of error?

Error 2 The system cannot find the file 'obj\Debug\pthFD364CC1E494D57F7AE3ED9DEF2DCD60\..\..\..\..\..\..\src\services\c#\ReportProcessorWCFHost\bin\Debug\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.Configuration.Design.dll' with type ''. light.exe 0 1 Proc


Any suggestion will be helpful.
Posted

1 solution

The naming of the path you show suggests that you are trying to use the file from the temporary directory created by MSBuild during the build of your project for Debug configuration. What you show is the default naming schema for such directory.

You should never do such things, you should never use those temporary obj directories at all. This is the abuse to the whole build system, not just to WiX specifically. You should use only the project artifacts created in the project's output directory. Note that this directory also should not be hard-coded in the WiX project. This directory is prescribed in a corresponding property of the project (which you want to include in the setup) and should always be taken automatically. It will preserve the integrity of your solution even if you change the location of the output directories when the WiX project is already created.

Besides, you should not use Debug configuration in your setup project. I cannot see any use for it. You need to use Release.

Note that WiX is well integrated with MSBuild and uses the standard MSBuild project format. Also, with Visual Studio, you can automatically reference the projects you need to participate in installation. Go to the WiX project tree in Solution explorer, and add references. The references should be project references, in the tab "Projects" of the "Add Reference" window.

When this is done, you can reference the files in the referenced projects through the special properties such as TargetPath. For example:
HTML
<Component Id="Assemblies" Guid="... some guid ...">
    <File Source="$(var.Product.TargetPath)" Id="entryPointAssembly"/>
<File Source="$(var.Library.TargetPath)" Id="someLibraryAssembly"/>
</Component>


In this example, "Product" and "Library" are then names of the projects, say, C# project which produce .NET assemblies to be installed, like "Project.EXE" and "Library.DLL". This is just for example, they can be any projects producing something to be installed.

Are you getting the picture?

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900