Copied to clipboard

Flag this post as spam?

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


  • Scott Reed 25 posts 69 karma points
    Apr 28, 2011 @ 13:57
    Scott Reed
    0

    Razor Saving Assembly Errors

    Hi guys,

    I have installed Umbraco without any problems but not I am coming to use Razor I have problems. Every time I try to save a Razor macro I get an error. Running on .NET 4 with all web platform required components installed. I did only isntall MVC 3 for the VS support after installing this Umbraco site.

    First I had an error complaining that System.Web.Helpers  assembly was missing, I added

    <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    Then the same again for System.Web.WebPages so I added

    <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    Now I am getting

    c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\9975b409\e18f1b53\App_Web_634395918175315498_helloworld.cshtml.70df5e80.yi37nm7d.0.cs(24): error CS0234: The type or namespace name 'Web' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

    Thanks guys

  • Rich Green 2246 posts 4008 karma points
    Apr 28, 2011 @ 14:20
    Rich Green
    0

    What version of Umbraco did you install?

    If you install 4.7 Razor works out of the box, no need for any further configuation.

    I'm not sure what the MVC 3 install does but maybe text Razor works on a clean install before you install anything extra?

    Rich 

  • Scott Reed 25 posts 69 karma points
    Apr 28, 2011 @ 15:06
    Scott Reed
    0

    Version 4.7.0.378. It works perfectly with everything else, all these references are related to MVC. All seems strnage, I'm gonna try a new download and install as well.

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Apr 28, 2011 @ 15:09
    Sebastiaan Janssen
    0

    Typically, you'd see these errors after upgrading from an older version of umbraco and not upgrading the web.config appropriately (check out the additions marked with: "<!-- Added in Umbraco 4.6.2 -->").

    You do not need these keys in your web.config though, the assemblies should be foudn in the GAC. I had to install MVC 2 to get it to work, only MVC 3 was not enough.

  • Scott Reed 25 posts 69 karma points
    Apr 28, 2011 @ 15:23
    Scott Reed
    0

    I have MVC2 and MVC3 installed already. This is also a recent install of umbraco from the Umbraco Binaries.

  • Scott Reed 25 posts 69 karma points
    Apr 28, 2011 @ 16:27
    Scott Reed
    0

    I did a brand new installation and it all works now. I don't know what happened to this version to screw it up so badly. Thanks anyhow guys

  • Sebastiaan Janssen 5044 posts 15475 karma points MVP admin hq
    Apr 28, 2011 @ 16:28
    Sebastiaan Janssen
    0

    Strange, maybe you really just needed a good app pool recycle or iisreset to reload the assemblies from the GAC. Glad it's working now!

  • Scott Reed 25 posts 69 karma points
    Apr 28, 2011 @ 16:48
    Scott Reed
    0

    Well I restarted my pc and I tried moving the code base to another production server but got the same message. Strange, but like you said it's working so all is good. Thanks Sebastiaan

  • Seth Niemuth 275 posts 397 karma points
    May 05, 2011 @ 18:17
    Seth Niemuth
    0

    I was having the same problem as I was running my version of umbraco as a web app instead of a website but I had forgotten to add references to the dll's: System.Web.Helpers.dll and Microsoft.Web.Helpers.dll which are included in the umbraco 4.7 release.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    May 14, 2011 @ 01:04
    Anthony Dang
    1

    I had a similar problem yesterday. It turned out that even though I referenced the all System.web.helpers in my project, they were not being output in the bin. I had to select all my references, go to properties and set them copy to local.

    I'm not sure if that helps.

Please Sign in or register to post replies

Write your reply to:

Draft