I am trying to minimize my .JSX files using ASP.NET optimization and optimization using System.Web.Optimization.React. I installed the MVC4 response package as well as the optimization package, but whenever I try to include the package, I get the following:
React.TinyIoC.TinyIoCResolutionException: Unable to resolve type: React.IReactEnvironment
InnerException is always null
My packages are installed as follows:
bundles.Add(new ScriptBundle("~/Bundle/Scripts/ReactJS").Include(
"~/Scripts/React/react-0.12.2.js",
"~/Scripts/React/react-with-addons-0.12.2.js",
"~/Scripts/React/JSXTransformer-0.12.2.js"
));
bundles.Add(new JsxBundle("~/Bundle/Scripts/ReactCalendar").Include(
"~/Scripts/React/Calendar/Main.react.jsx",
"~/Scripts/React/Calendar/Components/Calendar.react.jsx",
"~/Scripts/React/Calendar/Components/CalendarEvent.react.jsx",
"~/Scripts/React/Calendar/Components/CalendarControls.react.jsx",
"~/Scripts/React/Calendar/Components/CalendarTimeSlots.react.jsx"
));
And included in the presentation as:
@section scripts{
@Scripts.Render("~/Bundle/Scripts/ReactJS");
@Scripts.Render("~/Bundle/Scripts/ReactCalendar");
}
The error is always displayed on the line:
@Scripts.Render("~/Bundle/Scripts/ReactCalendar");
Anyone have any ideas on how to solve / debug this one? Let me know if additional information is needed.
source
share