Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

asp.net-core

Upgrading from ASP.NET v5 Beta4 to Beta5 was a little bit painful, how hard is the upgrade to Beta6?

A cheatsheet like the beta4-beta5 answers would be handy...

like image 810
fiat Avatar asked Mar 16 '23 05:03

fiat


1 Answers

The upgrade went fine. Here is the cheatsheet

Prerequisites

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

Beta 6 Changes

(Not all changes will be applicable to your project)

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

Deployment

  • Update any dnu publish scripts - see this question

Done

Other fixes might be found on the ASP.NET announcements repo

like image 75
fiat Avatar answered Mar 23 '23 20:03

fiat