Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WiX: VS2013 How to change output directory

I have a WiX project in VS2013.

The output directory in wixproj is:

bin\$(Platform)\$(Configuration)\

by fact it is

\bin\x64\Release\en-us

How and where I can change the real output to

\bin\x64\Release\

?

like image 992
ZedZip Avatar asked May 27 '15 10:05

ZedZip


Video Answer


2 Answers

Pass ; (single semicolon) as a list of cultures to build. WiX interprets it as a single, empty culture code meaning "neutral culture".

like image 51
Nikita Nemkin Avatar answered Sep 28 '22 14:09

Nikita Nemkin


First, the reason why this is happening. When you specify multiple cultures to build (for example, en-US and ja-JP), Visual Studio needs a way to differentiate between the installation packages generated. This is the reason why you get the output path with the culture string appended to it.

If you have a single culture, you can specify it in Project Properties→Build→General→Cultures to build.

Cultures to build

So one of the solutions is to use a single culture. In cases where this is not possible, you can modify the wix2010.targets and edit the target Link. The original target has this code at line 2497, under Light task:

OutputFile="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetName)$(TargetExt)"

You then need to remove the %(CultureGroup.OutputFolder). Don't forget to differentiate between different cultures. One solution for this differentiation would be this (not tested):

OutputFile="$(TargetDir)$(TargetName)%(Culture)$(TargetExt)"
like image 27
Marlos Avatar answered Sep 28 '22 13:09

Marlos