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

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
Closed

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

wixbot opened this issue Feb 26, 2015 · 6 comments
Assignees
Milestone

Comments

@wixbot
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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 this to the v3.10 milestone Dec 20, 2015
@wixbot wixbot closed this as completed Dec 20, 2015
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