Copied to clipboard

Flag this post as spam?

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


  • Mohammad Javed 64 posts 373 karma points
    Nov 05, 2015 @ 09:39
    Mohammad Javed
    0

    Could not load file or assembly 'System.Web.Http, Version=5.2.3.0

    Hello,

    I've cloned a repo from BitBucket and tried running the Umbraco website through Visual Studio Community 2015 but keep getting this error;

    Server Error in '/' Application.
    
    Configuration Error 
      Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
    
     Parser Error Message: Could not load file or assembly 'System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    
    Source Error: 
    
    
    
    Line 122:        <remove assembly="System.Net.Http" />    
    Line 123:        <add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    Line 124:        <add assembly="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    Line 125:      </assemblies>
    Line 126:      <buildProviders>
    
    
     Source File:  C:\Projects\BitBucket\Liquid_Thinker\web.config    Line:  124 
    
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
    
    
    
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    
    
    
    
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.106.0 
    

    I believe it is something to do with "reinstalling" Nuget Package Manager in VS?

    Running the commands in VS just brings back;

    PM> nuget install packages.config
    nuget : The term 'nuget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try 
    again.
    At line:1 char:1
    + nuget install packages.config
    + ~~~~~
        + CategoryInfo          : ObjectNotFound: (nuget:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    

    Anyone know how to fix this properly? There are solutions where you do assembly redirects in the web.config file, not sure that is the right way to go?

    Thanks in advance Javed

  • Mohammad Javed 64 posts 373 karma points
    Nov 07, 2015 @ 22:23
    Mohammad Javed
    0

    Right, kind of got it to work, copied the entire site over to the other PC, Zipped the site and transferred it.

    For some reason it was refusing to build on the work PC and opening it in VS just corrupted the entire site. So i was stuck in using Web Matrix.

    Now on the HOME PC i've installed VS Community 2015 - same as the work laptop and work PC. Umbraco site opens up in VS, but when i build the site i now get the following warnings;

    ------ Build started: Project: LiquidThinker20151, Configuration: Debug Any CPU ------
    Warning: Unable to update auto-refresh reference 'system.web.helpers.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll'.
    Warning: Unable to update auto-refresh reference 'system.web.webpages.razor.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll'.
    Warning: Unable to update auto-refresh reference 'system.web.webpages.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll'.
    Warning: Unable to update auto-refresh reference 'system.net.http.formatting.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll'.
    Warning: Unable to update auto-refresh reference 'newtonsoft.json.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll'.
    Warning: Unable to update auto-refresh reference 'system.web.http.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll'.
    Warning: Unable to update auto-refresh reference 'microsoft.web.infrastructure.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll'.
    Warning: Unable to update auto-refresh reference 'system.web.razor.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll'.
    Warning: Unable to update auto-refresh reference 'system.web.http.webhost.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll'.
    Warning: Unable to update auto-refresh reference 'system.web.webpages.deployment.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll'.
    Warning: Unable to update auto-refresh reference 'system.web.mvc.dll'. Cannot find assembly 'C:\Users\Users\user\Documents\Visual Studio 2015\Projects\LiquidThinker2015\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll'.
    Validating Web Site
    
    Validation Complete
    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
    

    While there are no errors, why have the warnings appeared? Anyway of fixing the warnings? Last thing i want is for it to cause me problems further down the line when developing the site even more.

    Thanks

    Javed

Please Sign in or register to post replies

Write your reply to:

Draft