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
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?)
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.
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.
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
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.
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.
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
Then the same again for System.Web.WebPages so I added
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
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
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.
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.
I have MVC2 and MVC3 installed already. This is also a recent install of umbraco from the Umbraco Binaries.
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
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!
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
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.
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.
is working on a reply...