は2.5.0にバージョン9.0.0とReactJS.NetパッケージにNewtonsoft.Jsonをアップグレードした後、TransformBabel.projは動作を停止:MSBuildの参照を見つけることができません - ReactJs.NET
次を返す<?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>
を:
TransformBabel.proj(6, 3): error MSB4018: The "TransformBabel" task failed unexpectedly.
[Exec] TransformBabel.proj(6, 3): error MSB4018: React.TinyIoC.TinyIoCResolutionException: Unable to resolve type: React.IReactSiteConfiguration ---> System.TypeInitializationException: The type initializer for 'React.ReactSiteConfiguration' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
Newtonsoft 6.0.0.0のバージョンを読み込めないようです。 web.configファイルは、アセンブリのリダイレクトがあります。
<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>
をしかし、私はそれが無視されている場合、それは、新しいMSBuildのプロセスを開始しているように、ということを確認していません。私はアセンブリの場所をmsbuildに伝えたいが、今までは成功していない。
Newtonsoft.Json.dllは '$(OutputPath)'に存在しますか? – KMoraz
@KMorazはい、バージョン6.0.0.0ではありません。 –
これはそのエラーを説明しています。 React.MSBuild.dllをプロジェクトの出力パスではなく、その起点から消してください。 [usage](https://github.com/babel/babel.github.io/blob/845d86b6c08dbc066859ad9611b554f606801d41/_includes/tools/msbuild/usage.md)を参照してください。 – KMoraz