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

Unable to use Nuget Package due to bindingRedirect in Newtonsoft.Json Dependancy #79

Closed
stephenwelsh opened this issue Jun 4, 2014 · 1 comment

Comments

@stephenwelsh
Copy link

I'm attempting to create a MSBuild Task that publishes release notes to a new Zendesk Topic. However I discovered that the 'bindingRedirect' added to the 'App.Config' by the latest version of Newtonsoft.Json (6.0.3) does not apply with MSBuild.

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>

The normal work-arounds are not ideal i.e. update the machine.config, however I've managed to fix the issue by specifying version='4.5.11' in my projects 'packages.config' instead of the default latest version (6.0.3).
I noticed that the Zendesk_v2_net35 package file also specifies '4.5.11', so I'm requesting that the .nuspec file(s) are updated with the matching 4.5.11 version dependancy. So anyone in the future that has a restriction on 'bindingRedirect' does not have the same problem.

https://github.com/eneifert/ZendeskApi_v2/blob/master/ZendeskApi_v2.2.5.6.nuspec#L15

i.e. make the following change:

<group targetFramework=".NETFramework3.5">
  <dependency id="Newtonsoft.Json" version="4.5.11" />
</group>
@eneifert
Copy link
Contributor

Hi Stephen,

Thanks for letting me know about the issue and how you worked around it. Unfortunately I don't want to force people to use an old version of Newtonsoft.Json in order to use this project. I think the ideal solution would be to post this in the Newtonsoft.Json project here.

Best of luck,
Eric

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

No branches or pull requests

2 participants