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

Only clear binding redirects in first group #1286

Merged
merged 2 commits into from
Dec 3, 2015
Merged

Only clear binding redirects in first group #1286

merged 2 commits into from
Dec 3, 2015

Conversation

forki
Copy link
Member

@forki forki commented Dec 3, 2015

Proposed fix for #1284

@mrinaldi
Copy link
Contributor

mrinaldi commented Dec 3, 2015

How about use the <Paket> node to specify what group it's from and remove according to the group you're installing?

For example:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <Paket>Test</Paket>
    <assemblyIdentity name="Ploeh.AutoFixture" publicKeyToken="b24654c590009d4f" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="3.36.9.0" />
  </dependentAssembly>
  <dependentAssembly>
    <Paket>Main</Paket>
    <assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="3.0.0.0" />
  </dependentAssembly>
  <dependentAssembly>
    <Paket>Main,Test</Paket>
    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="7.0.0.0" />
  </dependentAssembly>
  <dependentAssembly>
    <Paket>Test</Paket>
    <assemblyIdentity name="xunit.extensions" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="1.9.2.1705" />
  </dependentAssembly>
</assemblyBinding></runtime></configuration>

Removing Castle.Core and Newtonsoft.Json dependencies from Main group and issuing a paket install would generate the following config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <Paket>Test</Paket>
    <assemblyIdentity name="Ploeh.AutoFixture" publicKeyToken="b24654c590009d4f" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="3.36.9.0" />
  </dependentAssembly>
  <dependentAssembly>
    <Paket>Test</Paket>
    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="7.0.0.0" />
  </dependentAssembly>
  <dependentAssembly>
    <Paket>Test</Paket>
    <assemblyIdentity name="xunit.extensions" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-999.999.999.999" newVersion="1.9.2.1705" />
  </dependentAssembly>
</assemblyBinding></runtime></configuration>

I believe this will make it fully support groups.

@forki
Copy link
Member Author

forki commented Dec 3, 2015

that would be a cool addition

@matthid matthid deleted the fixbindings branch May 6, 2017 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants