fiat
fiat

Reputation: 15981

How to upgrade ASP.NET 5 from Beta6 to Beta7

What is the cheatsheet for upgrading from Beta 6 to Beta 7 for ASP.NET 5 vNext?

Upvotes: 7

Views: 1546

Answers (2)

fiat
fiat

Reputation: 15981

Prerequisites

  • Start from Beta 6 (see prior notes)
  • Install Web Tools 2015 (Beta7)
  • Upgrade to beta7: dnvm upgrade
  • Install x64 if you wish: dnvm install 1.0.0-beta7 -arch x64 -r clr
  • Update the alias: dnvm alias default 1.0.0-beta7 x64
  • Set it as permanent default dnvm use default -p

Beta 7 Changes

Not all changes will be applicable to your project...

  • Update global.json from beta6 to beta7
  • Search project.json files for beta6" and replace with beta7"
  • In project.json, replace Microsoft.Framework.Runtime.Abstractions with Microsoft.Dnx.Runtime.Abstractions
  • In project.json, replace Kestrel with Microsoft.AspNet.Server.Kestrel
  • Replace using Microsoft.Framework.Runtime; with using Microsoft.Dnx.Runtime;
  • Replace configuration.GetConfigurationSection with configuration.GetSection
  • Replace configuration.Get("MyConfigKey") with configuration["MyConfigKey"]
  • In Startup.cs, replace services.AddMvc().Configure<MvcOptions>(options => with services.AddMvc(options =>

Multiple assemblies with equivalent identity error

My unit test projects had this error:

Multiple assemblies with equivalent identity have been imported: '<in-memory assembly>' and '<in-memory assembly>'

This blog suggested moving System.* references down to framework specific section, I found removing them entirely also worked.

TagBuilders

One can no longer use TagBuilder.ToString() to get HTML but instead must make use of the IHtmlContent that it implements. See TagBuilder InnerHtml in ASP.NET 5 MVC 6

Entity Framework

  • New syntax for migrations: dnx ef migrations add MyMigration and dnx ef database update

Other

Upvotes: 10

Christine Boersen
Christine Boersen

Reputation: 1

Doing the suggested "replace Microsoft.Framework.Runtime.Abstractions with Microsoft.Dnx.Runtime.Abstractions"

Resolved me having the error "Multiple assemblies with equivalent identity have been imported: '' and ''"

when I attempted to perform the upgrade.

Upvotes: 0

Related Questions