How to upgrade ASP.NET 5 (vnext) from Beta5 to Beta6

Upgrading from ASP.NET v5 Beta4 to Beta5 was a bit painful, how difficult is it to upgrade Beta6?

A good version, such as beta4-beta5 , will be convenient ...

+4
asp.net-core
source share
2 answers

The update went perfectly. Here is a scammer

Background

  • Upgrade to beta6: dnvm upgrade
  • Install x64 if you want: dnvm install 1.0.0-beta6 -arch x64 -r clr
  • Update alias: dnvm alias default 1.0.0-beta6 x64
  • Set it as constant by default dnvm use default -p
  • Start with Beta 5. Upgrade from Beta 4 to Beta 5 if necessary

Beta Changes

(Not all changes will be applicable to your project)

  • Update global.json from beta5 to beta6
  • Find project.json files for beta5" and replace with beta6"
  • Add link to Microsoft.AspNet.Mvc.Core
  • Change app.UseErrorPage(ErrorPageOptions.ShowAll); on app.UseErrorPage();
  • Change Context.Authentication.SignIn(...) to SignInAsync(...)
  • Change app.UseSession(c=> c.IdleTimeOut = 30) to app.UseSession()
  • Autofac dependency update from "Autofac.Framework.DependencyInjection": "4.0.0-beta5-90" to "Autofac.Framework.DependencyInjection": "4.0.0-beta6-150"

Deployment

  • Update all dnu publish scripts - see this question

Done

Other fixes can be found on ASP.NET Announcements

+7
source share

Update answer above answer

You use EF and get the following error,

the type or name of the Migration namespace does not exist in the Microsoft.Data.Entity.Relational namespace

then remove the following namespace

using Microsoft.Data.Entity.Relational.Migrations.Infrastructure

and add the following namespace

using Microsoft.Data.Entity.Migrations.Infrastructure

You also need to rewrite several properties, for example, from the following property. Remove the .GenerateValueOnAdd () function.
In some property, the .StoreGeneratedPattern (StoreGeneratedPattern.Identity) function replaces the .UseSqlServerIdentityColumn () function.

  b.Property<string>("Id") .GenerateValueOnAdd() .Annotation("OriginalValueIndex", 0); 

You have to do something in several files.

0
source share

All Articles