Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning when building two bundles in one setup #610

Closed
mgkeeley opened this issue Mar 15, 2019 · 1 comment
Closed

Warning when building two bundles in one setup #610

mgkeeley opened this issue Mar 15, 2019 · 1 comment

Comments

@mgkeeley
Copy link

If during a setup project, a bundle is built and then some other project is built afterwards (eg. another bundle) the following warning is emitted:

Wix# compiler detected that some IDs has been auto-generated before the build started. This can lead to the WiX ID duplications. (...)

This is because the bootstrapper compiler does not reset the WixEntity AutoId generation at the end of each build in BuildWxs() (like the MSI Compiler does):
project.ResetAutoIdGeneration(supressWarning: true);
Example setup:

var project = new Project("MyProduct",
    new Dir(@"%ProgramFilesFolder%\My Company\My Product", new File(@"readme.txt"))
);
project.InstallScope = InstallScope.perMachine;
var msi = project.BuildMsi();

var bundle1 = new Bundle("MyBundle", new MsiPackage(msi)) {
    OutFileName = "MyBundle1",
    Version = new Version("1.0")
};
bundle1.Build();

var bundle2 = new Bundle("MyBundle", new MsiPackage(msi)) {
    OutFileName = "MyBundle2",
    Version = new Version("2.0")
};
bundle2.Build();
@mgkeeley mgkeeley changed the title Warning when building a project after building a bundles in one setup Warning when building two bundles in one setup Mar 15, 2019
@oleg-shilo oleg-shilo added the bug label Mar 15, 2019
@oleg-shilo
Copy link
Owner

Very accurate problem description and cause analysis. :)
Thanks.
Fixed. Will be available in the next release.

oleg-shilo pushed a commit that referenced this issue Mar 19, 2019
* Added new XML injection extensions `WixProject.AddXml` and `WixProject.AddXmlElement`
* Issue #608: Create Shortcut on Desktop to dotnet.exe
* Issue #551: Cannot include extra .wxs as part of a bundle
* Issue #610: Warning when building two bundles in one setup
* Issue #604: Is it possible to suppress the "UAC prompt" text if UAC is not enabled?
* Issue #606:  Platform.x64 not marking some folders win64="yes"
* Issue #599: Files creating empty folders on Destination (2)
* Issue #599: Files creating empty folders on Destination
* Added `WixEntity.ComponentCondition` to assist with cases when WiX element does not have condition (e.g. `RegistryKey`). Triggered by issue #593
* Added support for attribute namespaces during XML auto serialization with `WixObject.ToXElement()`
* Issue #586: How to add bal:overridable for Variable with wix#
* Issue #591: Code signing timestamping fails if old Windows SDK is installed
* Issue #585: Question: Warning about auto-generated IDs
* Issue #580: Wrong path to the AdminToolsFolder
* Add MsuPackage Element
* Fix Condition Net462_Installed, Net47_Installed, Net471_Installed, Net472_Installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants