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

RequireJsNet.ResxToJs: Error when use Newtonsoft 10+ #101

Open
luizantoniojr opened this issue Jan 3, 2018 · 1 comment
Open

RequireJsNet.ResxToJs: Error when use Newtonsoft 10+ #101

luizantoniojr opened this issue Jan 3, 2018 · 1 comment

Comments

@luizantoniojr
Copy link

Hi Guys!

I have an application ASP.NET MVC .NET Framework 4.5.1 with the following reference:

..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll

When I use RequireJsNet.ResxToJs in my application I get the following error:
Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies

If I use Newtonsoft.Json version 9.0.1 it works, but I have other dependencies that require version 10+.

Can you help me, please?

@slgal
Copy link

slgal commented Nov 29, 2019

I have the same issue. I am thinking it's not an issue of RequireJsNet.ResxToJs rather than MSBuild.

If you follow the instruction you have to add ResxtoJS.targets
<UsingTask TaskName="ResxToJsTask" AssemblyFile="..\bin\RequireJsNet.ResxToJs.dll" />

Looks like MSBuild try to load Newtonsoft.Json version 9.0.1 while your solution has a different one.

To resolve it you can clone that repository, update RequireJsNet.ResxToJs to use the same version of Newtonsoft.Json as your solution has, and use your custom DLL.

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