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

Changing target framework causes incorrect binding redirects to be added to app.config #283

Closed
KevinRansom opened this issue Mar 1, 2015 · 3 comments
Labels

Comments

@KevinRansom
Copy link
Member

When the target framework is modified in the Project Properties dialog it adds binding redirects for fsharp.core to 4.3.0.0. to the app.config file regardless of the Target Fsharp.core specified in the properties dialog.

We either need to eliminate the redirects, or specify the correct fsharp.core. The redirects are certainly not necessary for projects that have true set.

Repro:

  1. Create a new console application. It will target fsharp.core.4.4.0.0
  2. Open the app.config and observe no binding redirects
  3. Change the target framework from 4.5 to 4.6
  4. Open the app.config and observe the binding redirects

<dependentAssembly> <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="2.0.0.0" newVersion="4.3.0.0" /> <bindingRedirect oldVersion="2.3.5.0" newVersion="4.3.0.0" /> <bindingRedirect oldVersion="4.0.0.0" newVersion="4.3.0.0" /> </dependentAssembly>

Expected:
Either redirect to match the selected version of fsharp.core or no redirects if
true set in the project file.

bug2

@isaacabraham
Copy link
Contributor

I'm seeing some behaviour related to BRs. In my case it's a VS2013, F# 3.1 project that I've opened in VS2015. It's trying push a BR in to reference FSharp.Core 4.4.0.0. In the verbose build log, I see entries like: -

There was a conflict between "FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

and

Unified Dependency "FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
        Using this version instead of original version "4.3.0.0" in "..." because AutoUnify is 'true'.

This is despite my not having changed any files in the solution at all before / since opening in VS2015 CTP6 - it's immediately doing this. What is AutoUnify?

@latkin
Copy link
Contributor

latkin commented Mar 3, 2015

AutoUnify is a feature (not from us, from msbuild or .net I think?) that sniffs the versions of your references and their references, and automatically creates binding redirects up to the highest version.

@latkin latkin added the Bug label Mar 3, 2015
@KevinRansom
Copy link
Member Author

AutoUnify is

add: <AutogenerateBindingRedirects&Gttrue&lt/AutogenerateBindingRedirects> to the project file, F# console application templates have this for F#, will cause the references to be unified in the binding redirects. This was a feature add by the .net core team for VS 2013.

Kevin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants