Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • TheOgre 12 posts 32 karma points
    Jan 10, 2014 @ 04:55
    TheOgre
    0

    Issue Creating Umbraco 7 project in VS 2013

    Hi All,

    I am trying to use Umbraco 7.0.1 for the first time, after having used 4,5 and 6 previously...

    I've just rebuilt my PC with windows 8 and VS2013, and this is the first project I have tried :-)

    In VS 2013, I created a new ASP.NET project, the used nuGet to add UmbracoCms, which says it sucessfully added 7.0.1, and overwrote web.config.

    When I press F5 to debug, I get the attached error:

     

    Is there something else I need to do?

     

    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#" %>
  • Sebastiaan Janssen 4993 posts 15138 karma points MVP admin hq
    Jan 10, 2014 @ 08:55
    Sebastiaan Janssen
    0

    This unfortunately seems to happen in vs13 every time and I can't figure out why. Closer the solution, open it again and it's all good.

  • TheOgre 12 posts 32 karma points
    Jan 10, 2014 @ 23:01
    TheOgre
    0

    Doesn't work for me :-(

    I've tried, closing and re-opening the solution.

    closing and re-opening vs2013

    deleting and recreating the project

    and many variations...

    same thing every time.

    Anything else I can try?

  • TheOgre 12 posts 32 karma points
    Jan 11, 2014 @ 05:52
    TheOgre
    0

    I just did a fresh install of windows 8.1, inside vmware player.

    I tried installing VS2012 this time, but still get the exact same error.

    Clearly I am doing something wrong.

    Is there a detailed step by step guide that I can work through to make sure I am setting up correctly?

  • Sebastiaan Janssen 4993 posts 15138 karma points MVP admin hq
    Jan 11, 2014 @ 15:48
    Sebastiaan Janssen
    0

    Try and follow one of the install manuals in the documentation, maybe you are indeed missing something.

  • TheOgre 12 posts 32 karma points
    Jan 14, 2014 @ 05:45
    TheOgre
    0

    the guides in the documentation are for v6.

    I followed a guide for v7 I found at http://www.systenics.com/blog/setting-up-umbraco-7-in-visual-studio-2013-for-mvc-4-development/ - but I get the same error.

    I downloaded the sample project from the systenics guide, which worked. I was then able to upgrade to 7.0.1 via nuget.

    I'm not sure why I am unable to create a project from scratch with nuget though...

  • Sebastiaan Janssen 4993 posts 15138 karma points MVP admin hq
    Jan 14, 2014 @ 12:18
    Sebastiaan Janssen
    0

    If something is not specifically marked for a version in the documentation then it will work for both v6 and v7 (and most of the time even still for v4).

    So the question is: what exact steps did you follow, from any guide and where does your environment seem to differ from those steps?

    The actual error that you get in your first post would indicated that the Umbraco dlls are missing, maybe you forgot to build the project or maybe the build failed.

    I'd be happy to have a look at a project you've created and see what is wrong with it, follow the steps you think are correct and when it fails, zip everything up and put it in Dropbox or somewhere else that it can be downloaded.

  • TheOgre 12 posts 32 karma points
    Jan 16, 2014 @ 00:23
    TheOgre
    0

    I've worked out what the issue is...

    The visual studio project has to be something other than 'umbraco'...

    Stupid mistake... lol.

     

  • Shawn Lyman 4 posts 24 karma points
    Jan 31, 2014 @ 20:44
    Shawn Lyman
    0

    I have this exact same issue. Using Windows 7 x64 virtual machine and VS Express 2013 or web. I saw the final solution was that the project name can't be 'umbraco', turns out it also can't include 'umbraco' in the name at all. So fine.

    So I start over and created a completely unrelated name. Now when I press F5, I get a huge page of errors. So I tried the first suggestion here of closing the solution and VS 2013, reopen everything and press F5 again. Same huge page of errors.

     

    Server Error in '/' Application.

     

    Could not load types from assembly umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null, errors:

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.Editors.ContentPostValidateAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Could not load type 'System.Web.Http.Controllers.IControllerConfiguration' from assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.EnsureUserPermissionForContentAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.EnsureUserPermissionForMediaAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.FilterAllowedOutgoingMediaAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.FilterAllowedOutgoingMediaAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

     

      Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

     

     Exception Details: System.Reflection.ReflectionTypeLoadException: Could not load types from assembly umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null, errors:

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.Editors.ContentPostValidateAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Could not load type 'System.Web.Http.Controllers.IControllerConfiguration' from assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.EnsureUserPermissionForContentAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.EnsureUserPermissionForMediaAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.FilterAllowedOutgoingMediaAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

    Exception: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Umbraco.Web.WebApi.Filters.FilterAllowedOutgoingMediaAttribute'.  Assembly: 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null'.

     

  • Shawn Lyman 4 posts 24 karma points
    Jan 31, 2014 @ 21:51
    Shawn Lyman
    0

    Interesting. So I changed it to a 4.0 framework, even though it was on 4.5 to start with and 4.5 when it had the original message using the project name of 'umbraco', and now with it having a new name, and switched to framework 4.0, I get the original message again of:

    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.18408 

  • Shawn Lyman 4 posts 24 karma points
    Jan 31, 2014 @ 23:11
    Shawn Lyman
    0

    hmm, but I just noticed that when the solution is set to 4.0, that the output window says the errors are because it was built using a later framework. So I set it back to 4.5, and have the huge list of errors again. Any ideas why I can't get this to work? I need to edit my first post. I just remembered that while I am using Windows 8.1, the development environment is a Virtual Machine with Windows 7 x64 using VS Express 2013 for Web.

  • Shawn Lyman 4 posts 24 karma points
    Feb 01, 2014 @ 01:37
    Shawn Lyman
    0

    http://www.systenics.com/blog/setting-up-umbraco-7-in-visual-studio-2013-for-mvc-4-development/

    This is the Umbraco 7.0.2 install guide for VS 2013 that I have also tried. Looks so simple. I don't know why I can't get it to work.

  • Marcel van Helmont 68 posts 259 karma points c-trib
    Feb 04, 2014 @ 08:15
    Marcel van Helmont
    0

    I have the same error message have you find a solution already?

  • Marcel van Helmont 68 posts 259 karma points c-trib
    Feb 04, 2014 @ 14:05
    Marcel van Helmont
    0

    i have found a solution for the problem with the message:

    Could not load types from assembly umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null, errors:

    The problem is caused by a wrong version of Asp.Net WebApi is installed.. Install the last compatible version with umbraco by nuget.

    Update-Package Microsoft.AspNet.WebApi -Version 4.0.30506

    Tested with fresh install of umbraco 7.0.3 with Visual Studio 2013 on a Windows 7 x64

  • Ismail Mayat 4511 posts 10062 karma points MVP 2x admin c-trib
    Feb 07, 2014 @ 13:13
    Ismail Mayat
    0

    Marcel,

    I had same issue did the update but then got system.net.http version error so had to update my web.config namely the assembly binding bit

          <dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>
    

    changed from v2 to v4 and that sorted it.

  • Alexander 31 posts 81 karma points
    Feb 07, 2014 @ 14:10
    Alexander
    0

    Looks like you haven't global.asax file in your project. Create new MVC4 project(not empty) then install UmbracoCms package. It should work.

  • Matt Trujillo 1 post 22 karma points
    Feb 13, 2014 @ 22:40
    Matt Trujillo
    1

    Marcels fix worked!

    Run in package manager console, rebuild:

     

    Update-Package Microsoft.AspNet.WebApi -Version 4.0.30506

  • Bogdan Stojanovic 1 post 21 karma points
    Mar 01, 2014 @ 18:05
    Bogdan Stojanovic
    0

    AS Matt Trujillo suggest run Update-Package Microsoft.AspNet.WebApi -Version 4.0.30506 in pm console resolved my issue. I have VS2013 on windows 7 virtual image. 

  • Sebastiaan Janssen 4993 posts 15138 karma points MVP admin hq
    Mar 17, 2014 @ 15:34
    Sebastiaan Janssen
    0

    Alright guys, 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!

  • Aaron Powell 1708 posts 3045 karma points c-trib
    Mar 18, 2014 @ 11:42
    Aaron Powell
    0

    Alright Seb, here's my answers:

    • Windows 8.1 Pro
    • VS 2013 Ultimate Update 1
    • Non-admin
    • Framework v4.5 (not v4.5.1)
    • Runtime v4.0.30319 (for both)
    • ASP.Net Web Application, used the empty template (remember it's a new selector box)
    • Updating my Microsoft.AspNet.WebApi made the error go away
  • Sebastiaan Janssen 4993 posts 15138 karma points MVP admin hq
    Mar 18, 2014 @ 18:52
    Sebastiaan Janssen
    0

    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 UmbracoCms.7.1.0-QA.nupkg and 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!
  • David Tunnell 1 post 21 karma points
    Mar 19, 2014 @ 19:35
    David Tunnell
    0

    Sebastiaan, I followed your instructions and was able to get the umbraco to work using Visual Studio 2012 Professional. Thanks!

  • Jon Dunfee 199 posts 468 karma points
    Mar 20, 2014 @ 19:15
    Jon Dunfee
    0

    Anyway to get those package again. The links are bad now.  Or, they in Nuget now?

  • Sebastiaan Janssen 4993 posts 15138 karma points MVP admin hq
    Mar 20, 2014 @ 20:43
    Sebastiaan Janssen
    0

    @john we just released the RC, even more improved. See our blog!

Please Sign in or register to post replies

Write your reply to:

Draft