0

I have a visual studio 2010 solution with multiple C# projects and WiX projects. I'm specifying my build order through project reference, because I am using MSBuild to build my project. Using build order references won't work, because they only work in the solution file.

I have the following problem: I'm trying to add a C# project that I want to build AFTER my WiX project. So I try to add a project reference from my csproj to my bundle wixproj. However, I get the following errors:

When I try to add a reference to a wix project with an .MSI output: "A reference to 'installerproj' could not be added. An assembly must have a 'dll' or 'exe' extension in order to be referenced." -> I cannot add these references.

When I try to add a reference to a wix project with an exe output (bundle): "There was a problem reading metadata from 'installeroutput.exe' ('An attempt was made to load a program with an incorrect format.') Intellisense may not work properly until the solution is reloaded." -> Reloading doesn't help, and building gives a similar error ("fatal error CS0009: Metadata file 'installeroutput.exe' could not be opened -- 'An attempt was made to load a program with an incorrect format. '").

So I can live with not being able to add a reference to my .msi output wixproj, but I want to be able to add one to my bundle. Is this possible?

Note that referencing between .wixproj works fine, and also .wixproj TO .csproj. Just not the other way around.

If there is another way to make sure that my C# project will be built after my wix bundle project, I can work with that too, but it has to work from both MSBuild command line AND the .sln.

Mahogany
  • 73
  • 1
  • 8
  • Would [this answer](http://stackoverflow.com/a/11952677/15498) be applicable? – Damien_The_Unbeliever Dec 09 '16 at 11:51
  • @Damien_The_Unbeliever Yes that seems to work! However, now I still get a silly warning stating "The project 'installer.proj' cannot be referenced." Any idea how to get rid of that? – Mahogany Dec 09 '16 at 12:06

0 Answers0