ZedZip
ZedZip

Reputation: 6470

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\

?

Upvotes: 5

Views: 1921

Answers (2)

Nikita Nemkin
Nikita Nemkin

Reputation: 2820

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

Upvotes: 7

Marlos
Marlos

Reputation: 1965

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)"

Upvotes: 4

Related Questions