yo aspnet not updating to Core 1.0

The Environment

On my Linux Mint 17.3 machine here’s what everything looks like:


I am able to update aspnet generator successfully thru yeoman wizard.

But when I try to yo aspnet, I always get the ASP.NET 5 welcome screen, instead of ASP.NET Core 1.0 like this one:


The solution

All of the solution I found in the web does not apply to my specific case. What we need to do is to search for and remove anyoutdatedgenerator that somehow remained in one or more global folder.

To start, search you computer for any instance of generator-aspnet

$ cd / $ sudo find -name generator-aspnet

Among the search results, we should focus only on global folders. In my case, the following were found

./usr/lib/node_modules/generator-aspnet ./usr/local/lib/node_modules/generator-aspnet ./home/jokab/dev/pochela/node_modules/generator-aspnet ./home/jokab/.npm/registry.npmjs.org/generator-aspnet ./home/jokab/.npm/generator-aspnet

The global folders we will focus on are those under /usr/ folder, two shown above.

I open up /generator-aspnet/app/index.js for both one of them shows

Welcome to the marvellous ASP.NET 5 generator!

This is the old generator – and for some reason, yeoman is picking this up instead of the updated one. I removed the folder by doing

rm -rf /usr/lib/node_modules/generator-aspnet

Now try yo aspnet again. Yeoman should now be able to pick up the latest generator.

Did you have a similar issue? Let me know how yours went.

comments powered by Disqus