U4-4174 - Umbraco Nuget Install by Visual Studio 2013 failed

Created by Marcel van Helmont 04 Feb 2014, 13:45:53 Updated by Sebastiaan Janssen 05 Jun 2015, 16:28:23

Is duplicated by: U4-4412

Relates to: U4-4440

I don't know if it's a problem with Visual Studio or with the Umbraco nuget package but when you fresh install Umbraco 7.0.3 by nuget inside visual studio 2013 then you get a ysod when the installer must load.

I have found the problem Visual Studio 2013 installed a older version of the Asp.Net WebApi version 4.0.20505 this is a incompatible version and will give a ysod message.

If you update the package it works fine.

Update-Package Microsoft.AspNet.WebApi -Version 4.0.30506

3 Attachments

Comments

Sebastiaan Janssen 17 Mar 2014, 15:16:08

I've been investigating all this today, only to come to the conclusion that I can't immediately reproduce the errors.

So I'll need some information from you, the more replies the better and the more details the better, so I can spin up VMs to test with and fix some of these problems:

  • What is the exact version of Windows that you are using (also include if it's pro or not)
  • What is the exact version of Visual Studio that you are using (express, pro, etc. also include if you're running update 2 or update 3 etc.)
  • Are you running VS in Administrator mode?
  • In your references you should have System.Web.Http - What Runtime version does it have, what Version does it have and is it coming from your NuGet packages directory or from somewhere else? So I'm interested in the version BEFORE you update to 4.0.30506
  • Same question for System.Net.Http
  • What type of project did you start with (for example File > New Project > Web > ASP.NET Empty Web Application)
  • What is the .NET version number that you chose when doing File > New Project
  • What is the error you get that gets resolved when upgrading to 4.0.30506?

I do know and understand where the error comes from with regards to the Overflow starter kit, I have enough information on it and am able to fix that easily, so I'm only interested in the scenarios where there's no starter kit or the Txt starter kit.

Thanks in advance!


Shane Marsden 18 Mar 2014, 15:45:15

Windows 8.1 Visual Studio Ultimate 2013 (running as Administrator), version 12.0.30110.00 Update 1

#File > New Project... > .NET Framework 4 > ASP.NET MVC 4 Web Application > Empty (razor) #References, right-click System.Web.Http, Path is project bin folder, runtime version v4.0.30319, Version 4.0.0.0 #References, right-click System.Net.Http, Path is "C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Net.Http.dll", runtime version v4.0.30319, Version 2.0.0.0 #Right-click project in Solution Explorer, select Manage NuGet Packages... #In left pane, Online > nuget.org #Search for Umbraco #Select Umbraco CMS, version shows as 7.0.4, click Install #After installing all the various bits, I get a message: "File 'Web.config' already exists in project ''. Do you want to overwrite it?" - I select Yes #In the NuGet window, it shows that both Umbraco Cms and Umbraco Cms Core Binaries ticked. I close the window. #I hit F5 - I get a message saying "Debugging Not Enabled", so I allow VS to update the web.config with this setting

Server Error in '/' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'Umbraco.Web.UmbracoApplication'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %> Source File: /global.asax Line: 1 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009

If I then run "Update-Package Microsoft.AspNet.WebApi -Version 4.0.30506", it says: No updates available for 'Microsoft.AspNet.WebApi' in project 'MvcApplication9'.


Sebastiaan Janssen 18 Mar 2014, 16:15:37

Thanks Shane but different issue. Tip: v7 is .NET 4.5 only so you can't use .NET 4. This behavior with the global.asax is some insane thing VS started doing starting with 2012 and is still doing in 2013. Usually it helps to just close Visual Studio and then open the solution again. I can't for the life of me figure out what changes but suddenly hitting F5 works when you do that.


Sebastiaan Janssen 18 Mar 2014, 17:54:32

Alright, I've been updating the NuGet packages and hopefully they should start working now. If anybody could be so kind and test the following:

  1. Download https://dl.dropboxusercontent.com/u/3006713/UmbracoNuGet/UmbracoCms.7.1.0-QA.nupkg and https://dl.dropboxusercontent.com/u/3006713/UmbracoNuGet/UmbracoCms.Core.7.1.0-QA.nupkg
  2. Put them in a known location, like C:\Temp
  3. Create a new project in Visual Studio: File > New Project > Blank Project (don't choose MVC or Webforms or anything, just blank) - Make sure it's a .NET Framework 4.5/4.5.1 project(!)
  4. Go to your package manager console and install the test package using this command (replace C:\Temp with your own path):
    Install-Package UmbracoCms -Version 7.1.0-QA -Pre -Source C:\temp
  5. Hit F5, install with either Txt or the Overflow package (preferably Overflow, that one should be fixed now as well)
  6. Let me know if that works!


Sebastiaan Janssen 18 Mar 2014, 17:56:49

@shane.marsden This might also fix your issue, I've had no problems with the global.asax testing these could you check it out?


Marcel van Helmont 18 Mar 2014, 18:30:07

Thanks Sebastiaan,

Sorry for the late massage back.. I'm running: Windows 7 Pro SP1 Visual Studio Ultimate 2013 and i make the project as you describe above with 4.5.1 selected

I have tested your nuget package and it works for this problem great.. The only thing i get is when i enable debug is the following message "Unable to save changes to file. Object reference not set to an instance of an object" when de installer started then a get a message "LoaderLock occurred"

But this can also be a problem with my system, but i get it only with this nuget package.


Sebastiaan Janssen 18 Mar 2014, 18:35:22

@mvanhelmont Thanks very much for testing! Yes, I see those errors as well and they're nothing to be alarmed about. I attribute the first one to Visual Studio and the second one to PetaPoco. Both are completely harmless, just continue and everything will work as expected.


Marcel van Helmont 18 Mar 2014, 18:38:27

Yeh when i tested it without debug it works great.


Anders Bjerner 18 Mar 2014, 20:31:25

This also solves my NuGet issues (http://issues.umbraco.org/issue/U4-4440). However the 7.1-pre has problems with the dependency loader, so no CSS at all. Not sure whether there already is an issue for that.


Sebastiaan Janssen 18 Mar 2014, 20:40:34

@abjerner I've not seen that at all. Please create a new issue with details, where do you see this problem, errors? (javascript/logs) so we can investigate.


Chris Gaskell 19 Mar 2014, 08:54:41

Tested and it works for me Seb.


Anders Bjerner 31 Mar 2014, 16:59:43

@sebastiaan I just had another go at the issue with the dependency loader - this time from another machine.

The packages from Dropbox will still cause an issue with the dependency loader right after install (screenshot of the YSOD attached). However, I can't replicate this with the most recent packages from NuGet.org (Umbraco 7.1 RC).

This issue with the dependency loader was just something that I noticed earlier, but isn't really a problem for me. But if you're still looking into it, feel free to write me back if your need any further details ;)


Sebastiaan Janssen 01 Apr 2014, 15:24:05

@abjerner I really don't understand at all where this could be coming from, but set up a solution that exhibits this problem, zip it up and upload it somewhere like Dropbox so I can check out what the difference is please!


Anders Bjerner 01 Apr 2014, 17:22:32

@sebastiaan You can grab the ZIP here: https://dl.dropboxusercontent.com/u/925982/WebApplication8.zip

I'm using Visual Studio 2012 Update 4 if that means anything. Username is "abjerner[at]skybrud[dot]dk" (my email address) and the password is "umbraco".


Sebastiaan Janssen 01 Apr 2014, 17:51:48

@abjerner Unzipped, opened in VS12 Update 4. Hit F5, and I get the homepage as normal. But I do see your log messages for this error, will have a look at the piece of code that's failing for you.

If you have time, can you repro this with the RC3 version here? http://issues.umbraco.org/issue/U4-4510#comment=67-13390 (my comment on 14:40).


Anders Bjerner 01 Apr 2014, 18:02:26

I have no ideas for what could cause the issue then, but I can reproduce it on two separate computers (roughly same setup) with the 7.1.0-QA files.

But is works splendid with the RC3 files :D


Sebastiaan Janssen 01 Apr 2014, 18:23:42

Ha! Wonderful, I'll stop investigating this then, it's probably that virus on your computers.. ;-)


Lucas Wolkowski 14 Jan 2015, 20:54:46

Just a tip to anyone facing the same problem in the future:

I was just installing 7.2.1 and also got this error Parser Error Message: Could not load type 'Umbraco.Web.UmbracoApplication'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %> on my machine it was (hopefully!) not caused by virus ;-)

I was installing it just to have a look at the new grid layout and simply called my web project '''Umbraco'''.

After you build the project umbraco.dll (that contains Umbraco.Web namespace) is being ''replaced'' with empty dll - result of compilation of your '''Umbraco''' web project ... then all sorts of stuff cannot be loaded.

Recommended fix: Go to project properties and change Assembly Name to something else or ...(even better) delete the project, create a new one with meaningful name and install umbraco again :)


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category: Installation

Backwards Compatible: True

Fix Submitted: Inline code

Affected versions: 7.0.3

Due in version: 7.1.0

Sprint:

Story Points:

Cycle: