Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

Last post 05-29-2008 7:24 AM by dba123. 9 replies.

Sort Posts:

  • Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-28-2008, 10:56 PM
    • Contributor
      2,724 point Contributor
    • dba123
    • Member since 12-12-2003, 7:04 PM
    • Posts 1,336

     I can't get rid of this error during runtime

     

    Server Error in '/' Application.

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS1705: Assembly 'MvcValidatorToolkit, Version=1.0.0.30828, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

    Source Error:


    [No relevant source lines]

    Source File:    Line: 0


    Warning: CS1684: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll', but it could not be found
    Source Error:


    [No relevant source lines]

    Warning: CS1684: Reference to type 'System.Web.Mvc.ViewPage' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll', but it could not be found
    Source Error:


    [No relevant source lines]





    Microsoft (R) Visual C# 2008 Compiler version 3.5.21022.8
    for Microsoft (R) .NET Framework version 3.5
    Copyright (C) Microsoft Corporation. All rights reserved.

    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5b76b49d\973a2fa7\assembly\dl3\4171d944\f4328ec6_34c1c801\MvcValidatorToolkit.DLL: error CS1705: Assembly 'MvcValidatorToolkit, Version=1.0.0.30828, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll: (Location of symbol related to previous error)
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5b76b49d\973a2fa7\assembly\dl3\4171d944\f4328ec6_34c1c801\MvcValidatorToolkit.DLL: warning CS1684: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll', but it could not be found
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5b76b49d\973a2fa7\assembly\dl3\4171d944\f4328ec6_34c1c801\MvcValidatorToolkit.DLL: warning CS1684: Reference to type 'System.Web.Mvc.ViewPage' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll', but it could not be found
    function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == 'none') { elemLevel2.style.display = ''; } else { elemLevel2.style.display = 'none'; } }

     

    When is Microsoft going to get rid of VB.NET!
  • Re: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-28-2008, 11:33 PM
    • Contributor
      5,076 point Contributor
    • Paul Linton
    • Member since 04-30-2008, 3:16 AM
    • Posts 883

    The first error message is about System.Web.Extensions Version=3.6.0.0 which was part of the MVC Preview 1 code.  Do you have an old version of MvcValidatorToolkit hanging around.

    It looks like there is an updated version of MvcValidatorToolkit at www.codeplex.com/MvcValidatorToolkit which has been built to work with the Preview 2 bits.

    Got a c# problem? Try .NET Book Zero from Charles Petzold, it's a free pdf.
  • Re: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-28-2008, 11:41 PM
    • Contributor
      2,724 point Contributor
    • dba123
    • Member since 12-12-2003, 7:04 PM
    • Posts 1,336

     I can't find where v3.6 is being referenced.  In our web.config it's just referring to v3.5.

     So looks lke we're using the new validation toolkit assembly but our references are looking for the first version instead?

    When is Microsoft going to get rid of VB.NET!
  • Re: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-28-2008, 11:51 PM
    • Contributor
      5,076 point Contributor
    • Paul Linton
    • Member since 04-30-2008, 3:16 AM
    • Posts 883

    Try removing the reference in the project to the Validator Toolkit and then readding it, just to be sure that you are referencing the version that you think you are.  (Not in web.config but in the project references area)

    Got a c# problem? Try .NET Book Zero from Charles Petzold, it's a free pdf.
  • Re: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-29-2008, 12:05 AM
    • Contributor
      5,076 point Contributor
    • Paul Linton
    • Member since 04-30-2008, 3:16 AM
    • Posts 883

    I just downloaded the MvcValidatorToolkit but it would not build because of old references to the Mvc bits.  I removed the references from within the MvcValidatorToolkit project and then added the correct references to System.Web.Abstractions, System.Web.Mvcand System.Web.Routing and everything then built OK.  So, it might be a good idea to double chekc the references within your copy of the Toolkit and force it to rebuild.

    Good luck

    Got a c# problem? Try .NET Book Zero from Charles Petzold, it's a free pdf.
  • Re: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-29-2008, 12:09 AM
    • Contributor
      2,724 point Contributor
    • dba123
    • Member since 12-12-2003, 7:04 PM
    • Posts 1,336

     >>Try removing the reference in the project to the Validator Toolkit and then readding it

     did that.   In fact we aren't using it anymore so completely removing it also does not get rid of this error message.

    When is Microsoft going to get rid of VB.NET!
  • Re: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-29-2008, 12:10 AM
    • Contributor
      2,724 point Contributor
    • dba123
    • Member since 12-12-2003, 7:04 PM
    • Posts 1,336

     >>>I just downloaded the MvcValidatorToolkit but it would not build because of old references to the Mvc bits.  I removed the references from within the MvcValidatorToolkit project and then added the correct references to System.Web.Abstractions, System.Web.Mvcand System.Web.Routing and everything then built OK.  So, it might be a good idea to double chekc the references within your copy of the Toolkit and force it to rebuild.

    We aren't using the toolkit...and there was only one reference which I removed from one of our projects in the solution.  So not sure what else to try here.  Cleaned my temp asp.net files also.

    When is Microsoft going to get rid of VB.NET!
  • Re: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-29-2008, 12:47 AM
    Answer
    • Contributor
      5,076 point Contributor
    • Paul Linton
    • Member since 04-30-2008, 3:16 AM
    • Posts 883

    Hmmm,  an error in an assembly that is not present???  Have you tried deleting the entire contents of the bin folder?

    If that fails, look around the room to see if anyone is smiling, maybe someone is plaing tricks on you !

    As a wise man once said "Just because you are paranoid does not mean they are not out to get you"

     

    Got a c# problem? Try .NET Book Zero from Charles Petzold, it's a free pdf.
  • Re: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-29-2008, 7:20 AM
    • Contributor
      2,724 point Contributor
    • dba123
    • Member since 12-12-2003, 7:04 PM
    • Posts 1,336

     it's funny you say that because it relates to things that have happened lately with this team and their attitude towards me professionally.

    When is Microsoft going to get rid of VB.NET!
  • Re: Reference to type 'System.Web.Mvc.Controller' claims it is defined in 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions

    05-29-2008, 7:24 AM
    • Contributor
      2,724 point Contributor
    • dba123
    • Member since 12-12-2003, 7:04 PM
    • Posts 1,336

     Hey thanks.  Yea, deleting all the references in my web app's bin folder did the trick!

    When is Microsoft going to get rid of VB.NET!
Page 1 of 1 (10 items)