我正在将 ReactJS 添加到我一直在处理的新 ASP.NET MVC 站点中。从 NuGet,我安装了“ReactJS.Net(MVC 4 和 5)”包。
当我尝试运行代码时,我收到指向元素“TransformJsx”上的 TransformJsx.proj 的错误。
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="TransformJsx">
<!-- ReactJS.NET - Transforms JSX to JavaScript -->
<UsingTask AssemblyFile="$(OutputPath)\React.MSBuild.dll" TaskName="TransformJsx" />
<Target Name="TransformJsx">
<TransformJsx SourceDir="$(MSBuildProjectDirectory)" />
</Target>
</Project>
错误是
- “TransformJsx”任务意外失败。C:\Users\310171329\Documents\Visual Studio 2013\Projects\TeamManagement\TeamManagement\TransformJsx.proj 6 3 TeamManagement
- React.Exceptions.JsxException: Parse Error: Line 9: Unexpected token > (at line 9 column 25) ---> JavaScriptEngineSwitcher.Core.JsRuntimeException: Parse Error: Line 9: Unexpected token > (at line 9 column 25) -- -> MsieJavaScriptEngine.JsRuntimeException:解析错误:第 9 行:意外令牌 >(在第 9 行第 25 列)C:\Users\310171329\Documents\Visual Studio 2013\Projects\TeamManagement\TeamManagement\TransformJsx.proj 6 3 TeamManagement
任何帮助将不胜感激