Copied to clipboard

Flag this post as spam?

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


  • Richard Terris 273 posts 714 karma points
    Oct 31, 2013 @ 16:22
    Richard Terris
    0

    Missing Assembly

    Hi guys,

    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.

  • Lee Kelleher 3884 posts 14615 karma points MVP 9x admin c-trib
    Oct 31, 2013 @ 16:24
    Lee Kelleher
    0

    Hi Richard,

    Just checking, is the error saying "web" in lowercase? As it might be looking for the namespace Umbraco.Web?

    Cheers,
    - Lee

  • Richard Terris 273 posts 714 karma points
    Oct 31, 2013 @ 16:32
    Richard Terris
    0

    Sorry Lee,

    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 :)

  • Sebastiaan Janssen 4847 posts 14391 karma points MVP admin hq
    Oct 31, 2013 @ 16:54
    Sebastiaan Janssen
    0

    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.

  • Richard Terris 273 posts 714 karma points
    Oct 31, 2013 @ 16:58
    Richard Terris
    0

    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

  • Richard Terris 273 posts 714 karma points
    Oct 31, 2013 @ 17:33
    Richard Terris
    102

    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

  • Sebastiaan Janssen 4847 posts 14391 karma points MVP admin hq
    Oct 31, 2013 @ 17:39
    Sebastiaan Janssen
    0

    Great! Yeah, forgot about the .NET version, that would indeed cause this error. Thanks for the update!

  • Pav 15 posts 45 karma points
    Jun 18, 2014 @ 17:32
    Pav
    0

    I would expect support for .NET 4.5

  • Sebastiaan Janssen 4847 posts 14391 karma points MVP admin hq
    Jun 19, 2014 @ 12:10
    Sebastiaan Janssen
    0

    @Pav Umbraco 7 support (even requires) .NET 4.5

Please Sign in or register to post replies

Write your reply to:

Draft