So at the wonderful Umbraco conference that is "Code Garden" a few weeks back Umbraco released a very early Alpha release of the next version of Umbraco, aka V8.
I've been doing some work on trying to get AngularJS (the framework used for running the back office) upgraded in V7 and Mads has started an issue and wondered if I'd chip in and get it into V8 with him so time to download it and try to get it working. Trouble is I spent 2 nights trying to just get it to compile!
So to avoid anyone else having the same issues here is a quick crash course on what I found and did to get it compiling. Most of this is just a fleshing out of the instructions on the "quick start for v8" page but I wish I'd had this post 3 nights ago so here it is! I'll add to it if I find any more and of course update the offical docs too.
V8 is in flux so the first issue is getting the right version to down load, this one seems to be the most stable: https://github.com/umbraco/Umbraco-CMS/tree/temp8
You should then pull that via Github which is described beautiful by Seb (the master of Pull Requests) so I'll assume you got that far and have it locally.
First off, try to compile it in Visual Studio. It will take a while as it needs to pull down lots of Nuget dependancies the first time you run it.
Check your Nuget sources
Talking of Nuget, this was my first issue. I have our own internal Nuget repository set as my default one and for some reason the build was always looking their for numerous packages it needed rather than on the official Nuget site. So job number one for me was to go through each project, right click on it and select "Manage Nuget Dependancies" and ensure it was looking in the right place (check the drop down in the top right to make sure its got nuget.org selected or simliar) and then rebuilt. That seems to do "something" to put it right and reduced the error count down from 3100+ to just 13! Result.
Ensure Windows is up to date
Make sure your PC is all up to date. I'm running on Win10 and there has been a big upgrade rolled out in the last few weeks. I of course have been putting this upgrade off and clicking the "remind me later" button everytime it nagged me for a restart. Then I forgot it needed an update/restart and tried to fix my remaining issues with it in a unknown state which wasn't helping myself much. So, make sure you are all up to date.
The quick way to know if everything is ok is to click on your power button under the windows icon (bottom left of the screen for me) and see if it gives you an "Upgrade and restart" option, if so its got some work to do so best to let it do its thing.
Install the latest .net frameworks
If you aren't running on Win10 you might want to ensure you've got the latest .net framework installed. You can't "break" the install if you reinstall so its worth just downloading and trying again to be sure. At least then you will "know" that you have the right stuff installed.
Upgrade Visual Studio
The Umbraco developers are a clever bunch and are running on the latest and greatest, some of us though get a bit behind the curve. When I saw it needed Visual Studio 2017 as a minimum which I already had I moved onto just grabbing the code and trying to get started asap. I sadly missed the text that said which build version of VS2017 I needed, it HAS to be 15.7 or greater. A lesser version won't include some of the stuff the Umbraco source assumes you are going to have automatically. I was bitten with this error which eventually led us to a post that pointed out that different version of VS2017 include different things:
"Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=126.96.36.199, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'."
There was a fix in there to add a reference to 'netstandard' (which older versions of VS, like mine, didn't include by default) but the real issue is I was running an old version and I should fix that.
So I needed to upgrade VS! Again my heart sank a little at this, VS is a beast to install so there goes another session of coding up in smoke while I look at progress bars! But these days it is actually quite easy to upgrade and only took me about 5 minutes, I can cope with that.
EDIT: There is an offical doc on how to update Visual Studio 2017.
Here are the steps I used:
- Check which version you are on via Help > About Visual Studio, if you are on a version that is > 15.6 then you are all good and can skip the rest
- In VS click on Tools > Extensions and Updates
- In the pop up window look to the left tree for "Updates" and click on it, you should see an update for Visual Studio if there is one available. Give that a click and then follow along
With that done I could finally compile with no errors, Hurrah! I've updated the offical quick start guide with some of the pointers from here too so others should be able to avoid the frustrations I had with getting my environment setup to play around with V8 (none of this is V8's fault of course).
Now...3 sessions on I can actually start looking at this AngularJS upgrade :)