Compatibility issues with ASP.NET5,MVC 6,beta 7 vs. RTM

Source: Internet
Author: User

Warm hint: This article miscellaneous and disorderly, finally unintelligible.

Visual Studio RTM was officially released on July 20, 2015, and I downloaded the first time to install it.

Although the RC version was started in May, it is expected that the official version will bring some new features and stability.

Like the early adopters I inevitably want to toss a asp.net5, learning about MVC6, then the stable version is Beta5.

Build a MVC6 project feel a bit, like this new project structure, the only thing that feel uncomfortable is the release of the time without the FTP this one, do not know later will not improve.

Later try to upgrade the framework to the time is still not stable Beta6, because beta5→beta6 some "significant change", so need to modify a few code, several toss finally victory upgrade, the process of dnvn,dnx,dnu and so have a more intuitive understanding, also count no blind toss.

Well, it's been a long, long day.

Say this later days busy upgrade WINDOWS10, to dust settles, look at the newly installed good win10+vs2015 mood, ready to study again ASP.NET5.

At this point, the Beta6 stable version is released as scheduled, which is the ASP.NET5 roadmap:

The use of stable version is obviously not my style, so it is like the previous promotion beta6 the same as the DNX and the various dependent modules to upgrade to the latest BETA7.

This time, however, there are some strange problems:

1. First of all, the list of reference modules in the project content is not directly ...

2. In the project properties, the contents of "debugging" are all blank ... (+﹏+) ~

3. A variety of wrong, reopen the solution, restart vs are useless, trying to compile the project with the following error:

Please ignore the strange character-_-inside.

The specific error is: System.IO.FileNotFoundException:Microsoft.DNX.PackageManager what.

How can not find the file, runtimes well lay down where it should stay.

Really can not touch the mind, had to go to GitHub to find out if anyone mentioned this problem. Sure enough to see such a issues, that is the problem.

It probably means that some of the DNX's assemblies have been renamed, but Vs2015rtm did not make the corresponding changes, leading to the inability to find the correct path or anything.

Need to wait for Web Tools update to resolve, and then give a temporary solution, is to add a system environment variable: webproj_enablebeta7renames, the value is set to 0, you can.

I tried it and it worked.

Not a few days later, GitHub posted a notice: Breaking DNX renames, this time specifically said DNX some of the renaming of the situation,

Personally feel that the new name really looks much better \ (^o^)/.

At the same time, the announcement also said how to adapt to the change, the first is to install the Web Tools update, they put on the Asp.net5 home page:

This is the ASP. NET 5 Preview (BETA6).

This need to say, click into the download will see a lot of content, most of the language pack, according to official instructions are to download and sequentially installed:

The first is Dotnetversionmanager-x64.msi (or x68), in fact, is DNVM, your machine version may be newer than this, so this does not install also line.

Then installed the largest, webtoolsextensionsvs14.msi,209m body, loaded up Chi Chi is quite slow.

Finally, download a language package as needed, but I don't feel any eggs.

Pre-and post-installation comparison:

I can see that the version number of ASP. NET and Web tools has changed and the name has become plain in English, so I suspect that the "language pack" I just installed had any eggs.

* If the environment variable was previously set, it should be deleted.

Finally need to update DNX to the latest version, in fact, I often go to myget.org to see the new version number (may be sick), you can also go to see: ASPNET vnext (Beware of infection).

Unlike the ASPNET master page, which provides only a stable version, Vnext provides the latest development version of each assembly, currently the latest development is v1.0.0-beta7-12290.

At the same time, the NuGet feed url:https://www.myget.org/f/aspnetvnext/available on this page is what we need to use.

Open the VS2015, from the tools →nuget Package Manager → Package Manager console, open the NuGet console,

You can see the package source: nuget.org, the default is only this one source, the point to the right of the gear can be set more sources.

Very simple, in this setting page, press the green plus sign above, add the feed URL mentioned above, name casually.

This will ensure that DNU will be able to find the latest version of the assemblies we need when restoring the package, or only the stable version of BETA6 will be found.

Back to the NuGet console, you can use the DNVM command to upgrade the DNX, but in this console is not very useful, a lot of information will not come out, do not know why, and also not if the color of power shell cool.

So let's just go outside and open the power shell and remember to do it as an administrator:

The first time you perform DNVM in PS, you should encounter the error "xxxxxxxxx, because the script is forbidden in this system, xxxxxxxx" What, this problem is well solved,

Execute: Set-executionpolicy remotesigned, select a [all], you can, see:

About the use of DNVM, just a few instructions, here no longer repeat, we hastened to update the DNX to the end of it, and now the more write run off.

DNVM Upgrade instructions can update the latest "stable version", such as the current BETA6, we want the latest development version, we need to execute DNVM upgrade-unstable, so we start to download the latest DNX beta7.

At the same time we also need 64-bit DNX, then add a parameter: DNVM upgrade-unstable-arch x64, so download is unstable the latest version of the 64-bit DNX:

Just wait a moment, and execute DNVM list to see all the DNX versions of the machine now:

Back to the VS our project, change several places:

1, in the project properties, select the correct DNX version:

The changes here are directly reflected in the Global.json configuration file.

In addition Properties\launchsettings.json should also correspond to modify:

Finally, I remember to change the version of Project.json in the latest, I use the * number directly, because I always upgrade dnx.

At this point, the BETA7 can be used normally in VS, to see this delightful (being restored ...). ) and the newest assemblies O (∩_∩) o haha:

The End

Compatibility issues with ASP.NET5,MVC 6,beta 7 vs. RTM

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.