Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
In following the excellent blog post by Matt Brailsford (http://www.theoutfield.net/blog/2013/10/handling-external-urls-in-umbraco-6), I have stumbled across a strange problem and I'm hoping someone can help.
When I try to compile my project, I receive the error "The type or namespace 'web' does not exist in the namespace 'Umbraco'(are you missing an assembly reference?)"
I definitely have a reference to umbraco.dll and I can navigate to the methods in Umbraco.Web.Routing in the object explorer in VS.
The application was created in VS2012 for web but I receive the same error when I try to compile this in VS2010 pro.
I'm using Umbraco 6.1.6
I can't see or think of any conflicts with other dll's.
Hopefully this is something silly I'm doing or not doing but any help will be much appreciated.
Just checking, is the error saying "web" in lowercase? As it might be looking for the namespace Umbraco.Web?
The actual error (copied and pasted) is "The type or namespace name 'Web' does not exist in the namespace 'Umbraco' (are you missing an assembly reference?)"
It's the Umbraco.Web.Routing namespace I'm trying to reference and it is in there.
Unless I'm doing something really dumb - which is always possible :)
What version of umbraco.dll are you referencing?
I would recommend you install the Nuget UmbracoCms.Core package, which will reference the 6.1.6 version and all of the other references you'll ever need. No need to do this manually.
I started out with a the Nuget package on VS2010 and set this up as a base project.
When I started developing this particular app, I did so in VS2012 and when I triedto compile in VS2010 (in case that was the problem) Nuget updated all the package references again so all should be well.
If this means something then the version is 1.0.5021.24870 and the runtime version is v4.0.30319
Ok the answer to this issue, in case anyone else gets the same problem was that I had compiled the project initially against the .NET framework version 4.5
At an earlier stage I discovered this because the dev server I was deploying to didn't have 4.5.
So rather than upgrade the server (shared environment) I changed the target framework in VS to 4.0 and recompiled.
Just now when I expanded the warnings as well as the errors, I noticed that umbraco.dll had a dependency on htmlagilitypack which had been compiled against .NET 4.5
So I simply downloaded htmlagilitypack and copied the 4.0 dll's into the bin folder of my project and Robert's your fathers brother!
Thanks for the assistance Sebastiaan and Lee
Great! Yeah, forgot about the .NET version, that would indeed cause this error. Thanks for the update!
I would expect support for .NET 4.5
@Pav Umbraco 7 support (even requires) .NET 4.5
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted