MSBuild cannot find a reference - ReactJs.NET -
after upgrading newtonsoft.json version 9.0.0 , reactjs.net packages 2.5.0, transformbabel.proj stopped working:
<?xml version="1.0" encoding="utf-8" ?> <project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" defaulttargets="transformbabel"> <!-- reactjs.net - transpile javascript via babel --> <usingtask assemblyfile="$(outputpath)\react.msbuild.dll" taskname="transformbabel" /> <target name="transformbabel"> <transformbabel sourcedir="$(msbuildprojectdirectory)" /> </target> </project>
returning following:
transformbabel.proj(6, 3): error msb4018: "transformbabel" task failed unexpectedly. [exec] transformbabel.proj(6, 3): error msb4018: react.tinyioc.tinyiocresolutionexception: unable resolve type: react.ireactsiteconfiguration ---> system.typeinitializationexception: type initializer 'react.reactsiteconfiguration' threw exception. ---> system.io.filenotfoundexception: not load file or assembly 'newtonsoft.json, version=6.0.0.0, culture=neutral, publickeytoken=30ad4fe6b2a6aeed' or 1 of dependencies. system cannot find file specified.
it seems cannot load newtonsoft 6.0.0.0 version. web.config has assembly redirection:
<dependentassembly> <assemblyidentity name="newtonsoft.json" publickeytoken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingredirect oldversion="0.0.0.0-9.0.0.0" newversion="9.0.0.0" /> </dependentassembly>
but not sure that, starting new msbuild process, if being ignored. hint msbuild location of assembly, no success until now.
a bit late party here, experience else having same problem.
i have experienced same issue react.msbuild 3.1.0.
seems has hardcoded specific version have updated newtonsoft.json
latest (10.0.3) using nuget , set redirection correctly, build kept failing on same error have mentioned.
what did uninstall react packages (msbuild , core) , newtonsoft.json
(using -force there other dependencies) , let nuget install react.msbuild
again. has installed dependencies resulted in obtaining newtonsoft.json 9.0.1.
not sure why restrict newtonsoft.json
library specific version, more question react developers. unless need latest (or other specific version of it), should fix problem.
Comments
Post a Comment