【发布时间】:2015-06-26 20:11:50
【问题描述】:
我用dnvm upgrade -Unstable 升级了 DNVM。运行 dnvm list 表明它处于活动状态:1.0.0-beta6-12120。
我使用 ASP.NET 5 Preview Template for Web Site 创建了一个新项目,并验证它可以构建。
我将 project.json 更改为引用 beta6:
"dependencies": {
"EntityFramework.SqlServer": "7.0.0-beta6",
"EntityFramework.Commands": "7.0.0-beta6",
"Microsoft.AspNet.Mvc": "6.0.0-beta6",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta6",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta6",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta6",
"Microsoft.AspNet.Authentication.Google": "1.0.0-beta6",
"Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta6",
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta6",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta6",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta6",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta6",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta6",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta6",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta6",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta6",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta6",
"Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta6",
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta6",
"Microsoft.Framework.Logging": "1.0.0-beta6",
"Microsoft.Framework.Logging.Console": "1.0.0-beta6"
}
但是由于运行时库冲突构建失败:
1>MSBUILD : DNX 4.5.1 error CS0433: The type 'AssemblyFileVersionAttribute' exists in both 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1>MSBUILD : DNX 4.5.1 error CS0433: The type 'AssemblyVersionAttribute' exists in both 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1>MSBUILD : DNX 4.5.1 error CS0433: The type 'AssemblyInformationalVersionAttribute' exists in both 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1>MSBUILD : DNX 4.5.1 error CS0518: Predefined type 'System.String' is not defined or imported
1>MSBUILD : DNX 4.5.1 error CS0518: Predefined type 'System.String' is not defined or imported
1>MSBUILD : DNX 4.5.1 error CS0518: Predefined type 'System.String' is not defined or imported
1>MSBUILD : DNX 4.5.1 error CS0518: Predefined type 'System.Void' is not defined or imported
1>MSBUILD : DNX 4.5.1 error CS0518: Predefined type 'System.Void' is not defined or imported
1>MSBUILD : DNX 4.5.1 error CS0518: Predefined type 'System.Boolean' is not defined or imported
如何解决?
【问题讨论】:
标签: c# asp.net asp.net-core