Skip to content

Issue with config and .NET 4.0 assemblies #258

Closed
tommarien opened this Issue Apr 24, 2012 · 6 comments

2 participants

@tommarien
Collaborator

I know we fixed this by adding an extra config file but if you would be getting your fluentmigrator with nuget package restore how can you change the config then ???

It seems to be possible to have two supported runtimes like this

   <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" />
        <supportedRuntime version="v2.0.50727" />
  </startup>

In this case it means if 4.0 is present run it with that otherwise take 2.0.50727

@tommarien
Collaborator

Ok the tools package will fix this, but i tried this on a .NET 4 assembly and it works both for a 3.5 migration assembly and 4.0

  <startup>
    <supportedRuntime version="v4.0" />
    <supportedRuntime version="v2.0.50727" />
  </startup>

Maybe someone that does not have ..net 4 can verify it

If this works we can ditch the tools package or partly

@tommarien
Collaborator

I think this is possible i've backchecked with the Nunit.console config

  <startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<supportedRuntime version="v2.0.50727" />
<supportedRuntime version="v4.0.30319" />

@tommarien
Collaborator

Can someone with a 3.5 installed only .NET please verify that this console config works to run migrations

  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" />
    <supportedRuntime version="v2.0.50727" />
  </startup>
@Andorbal
Andorbal commented May 3, 2012

I just ran a super simple migration on a Windows XP instance with only .NET 3.5 installed (no 4 or 4.5). When using the most recent config section from listed in this thread, the migration ran successfully. I then removed the line that said v2 is supported and correctly got an error saying that I needed to have .NET v4 installed to run the application.

So I think that we should probably be fine using the configuration as the standard config.

@tommarien
Collaborator

So it is behaving like i thought and is documented on the microsoft site, yay mickiesoft for having up to date documentation for once :P

@tommarien
Collaborator

I'll try to whip up a pull request in the next couple of days, any of you have an idea on how to tackle it, do the change in the config as one step and then in next release remove the splitted versions for .NET 3.5 and .NET 4.0 or do both in one blow ?

@tommarien tommarien closed this in f265fea Dec 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.