我在VS2015中创建了一个新项目并选择了#34; Web Application"在" ASP.NET 5预览模板"
从NuGet添加React.AspNet
后,项目无法构建,失败并出现以下错误。
Severity Code Description Project File Line
Error CS0121 The call is ambiguous between the following methods or properties: 'Microsoft.AspNet.Builder.BuilderExtensions.UseMvc(Microsoft.AspNet.Builder.IApp licationBuilder, System.Action<Microsoft.AspNet.Routing.IRouteBuilder>)' and 'Microsoft.AspNet.Builder.MvcApplicationBuilderExtensions.UseMvc(Microsoft.AspNe t.Builder.IApplicationBuilder, System.Action<Microsoft.AspNet.Routing.IRouteBuilder>)' WebApplication3.DNX 4.5.1
C:\Users\UserName\Project\Startup.cs 127
Startup.cs - 这是模板默认的简化版本
using Microsoft.AspNet.Builder;
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
// Add MVC to the request pipeline.
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
}
我的 Startup.cs 是否有问题,或者这是React.AspNet中的错误?