我在Visual Studio 2015 Update 1中遇到错误:
错误CS1704:具有相同简单名称的程序集' Kendo.Mvc'已经进口了。尝试删除其中一个引用(例如 ' Kendo.Mvc.dll')或签名并排启用。
我清理了缓存,临时文件asp net,我尝试了另一个版本的Kendo,我更新并重新安装了dnx并使用x86和x64进行了测试。我不知道还能做什么。
我的project.json是:
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"EPPlus": "4.0.5",
"eVC": "1.0.0-*",
"eVDTO": "1.0.0-*",
"eVR": "1.0.0-*",
"Kendo.Mvc": "2016.1.112",
"Microsoft.ApplicationInsights.AspNet": "1.0.0-rc1-*",
"Microsoft.AspNet.Diagnostics": "1.0.0-rc1-*",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-*",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-*",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-*",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta7-*",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-*",
"Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-*",
"Microsoft.AspNet.Session": "1.0.0-rc1-*",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-*",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-*",
"Microsoft.Extensions.Configuration": "1.0.0-rc1-*",
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-*",
"Microsoft.Extensions.Logging": "1.0.0-rc1-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-*",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-*",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-*",
"NPOI": "2.1.3.1"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel",
"deployment": "Microsoft.AspNet.Hosting --ASPNET_ENV production --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost/eV",
"web2": "Microsoft.AspNet.Server.Kestrel --server.urls=http://localhost:5000",
"gen": "Microsoft.Framework.CodeGeneration"
},
"frameworks": {
"dnx451": {
}
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
],
"scripts": {
"postrestore": [ "npm install", "bower install" ],
"prepare": [ "gulp copy" ]
}
}
在Startup.cs中:
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
//services.AddApplicationInsightsTelemetry(Configuration);
services.AddMvc();
services.AddCaching(); // Adds a default in-memory implementation of IDistributedCache
services.AddSession();
services.AddKendo();
}