Error Upgrading from ASP.NET 5 Beta 4 to Beta 5

前端 未结 6 1912
一生所求
一生所求 2020-12-14 23:03

I have followed the steps here to upgrade from ASP.NET 5 Beta 4 to Beta 5 but am getting an error at runtime when calling application.UseBrowserLink();:

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-14 23:53

    To complete, if you want to update from beta 4 to beta 6, see the Stephen Lautier's answer and to this after :

    To update from beta 5 to beta 6 :

    I did :

    • Open global.json and update sdk to "1.0.0-beta6" and save this file
    • Visual Studio 2015 proposes to download beta6, click on Yes

    In project.json :

    • change dnx451 (or dnx452) to dnx46 (To use Framework 4.6)
    • replace all "-beta5" with "-beta6" in this file
    • remove Microsoft.Framework.ConfigurationModel.UserSecrets

    In Startup.cs, if you use Session :

    • replace app.UseInMemorySession(...) with app.UseSession()
    • In ConfigureServices, add this :

       services.AddCaching();
       services.AddSession();
       services.ConfigureSession(o => {    o.IdleTimeout = TimeSpan.FromSeconds(10); });
      
    • Right click on your Project > Properties > Debug > Add a new Environment Variable :

    Name : DNX_IIS_RUNTIME_FRAMEWORK

    Value : dnx46

    See that for more information : http://jameschambers.com/2015/07/launching-an-asp-net-5-application-from-visual-studio-2015/

    • In Package Manager Console, write this "dnu restore" and this "dnu build"
    • Restart Visual Studio

    My project work in beta6 after that, maybe there are other things to do.

提交回复
热议问题