WiX Burn causes a "mixed mode" error when trying to use SMO to run SQL #4685

Closed
wixbot opened this Issue Feb 26, 2015 · 6 comments

Projects

None yet

2 participants

@wixbot
Collaborator
wixbot commented Feb 26, 2015

Our custom BA runs some SQL scripts, and it uses the Shared Management Objects (SMO), so the DLLs are referenced by our custom WPF BA project, and included in bundle.wxs in the wix BA project.

We have been doing this successfully with WiX 3.8. However since upgrading to WiX 3.9 R2 the BA throws an exception:

Mixed mode assembly is built against the 2.0.50727 and cannot be loaded in the 4.0 runtime without additional configuration information

We made sure to go back to an older version of the code, and built it using both 3.8 and 3.9 R2. The 3.8 one succeeds, the 3.9 R2 one fails.

If it matters we are using version 10 (2008) of SMO.

Originally opened by abes

@wixbot
Collaborator
wixbot commented Feb 26, 2015

What version of .NET does your BA target? Please provide your BootstrapperCore.config file. Also, can you confirm that you ran the bundles on the same machine? What is the OS on that machine, and which versions of .NET are installed on the machine?

Originally posted by rseanhall

@wixbot
Collaborator
wixbot commented Feb 26, 2015

Our BA targets .net 4.5.
Here is the BootstrapperCore.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore">
            <section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" />
        </sectionGroup>
    </configSections>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
    <wix.bootstrapper>
        <host assemblyName="WDIWizard_WPF">
            <supportedFramework version="v4\Full" />
            <supportedFramework version="v4\Client" />
        </host>
    </wix.bootstrapper>
</configuration>

We ran the bundle executable on multiple machines, the OS was Windows 7 and Windows server 2012, and in both cases we had .net 2.0, 3.5, 4.0, and 4.5 installed.

Originally posted by abes

@wixbot
Collaborator
wixbot commented Feb 26, 2015

To remove any ambiguity from the last sentence in the previous comment: We ran both 3.8 and 3.9R2 bundles on the same machines, and we ran them on multiple machines as specified.

Originally posted by abes

@wixbot
Collaborator
wixbot commented Feb 27, 2015

Thanks, that should be enough information for me to try to reproduce it this weekend.

Originally posted by rseanhall

@wixbot
Collaborator
wixbot commented Mar 1, 2015

Thanks for your help. Another case of stellar documentation from Microsoft.

v3.10 Pull Request: 214

v4.0 Pull Request: 97

Originally posted by rseanhall

@wixbot
Collaborator
wixbot commented Mar 3, 2015

AssignedTo set to shall
Release changed from v3.9 to v3.10
Resolution set to fixed
Status changed from Untriaged to Resolved

@wixbot wixbot added bug burn labels Dec 20, 2015
@rseanhall rseanhall was assigned by wixbot Dec 20, 2015
@wixbot wixbot added this to the v3.10 milestone Dec 20, 2015
@wixbot wixbot closed this Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment