Open paulomorgado opened 5 years ago
Where is this Newtonsoft.Json v11 package coming from?
It's not the package. The Newtonsoft.Json.dll in nswag.msbuild\12.0.4\tools\Win is:
Version Kind | Version |
---|---|
Assembly Version | 11.0.0.0 |
Assembly Informational Version | 11.2 |
Assembly File Version | 11.0.2.21924 |
The package also contains NJsonSchema.dll 9.12.7.0 which requires Newtosoft.Json.dll 9.0.0.0.
As far as I know, there's no way to configure assembly bindings for T4 template processing.
Ah man...
Aren't assembly bindings fun? 😄
What can we do about this? I dont want to downgrade the nswag newtonsoft version and dont want to break njs users :-)
Maybe a specific package for T4 could be created with all correct versions and only the libraries need for that.
It would be a smaller package, even!
I have the same problems with the tooling I have built on top of NSwag.MSBuild for T4 templating. I need to keep all dependency versions aligned with the versions of NSwag.MSBuild's dependencies because there is no assembly binding redirection.
I use NSwag.MSBuild in T4 templates and I have to load the specific assemblies into the template:
The version of Newtonsoft.Json on the package is 11.0.0.0 while all the NJsonSchema and NSwag tooling has a dependency on 9.0.0.0.