Could not load file or assembly 'DotNetOpenAuth.Core

前端 未结 19 804
太阳男子
太阳男子 2020-12-04 17:22

I get the following error when I start my asp net mvc 4 application:

Could not load file or assembly \'DotNetOpenAuth.Core, Version=4.0.0.0, 
Culture=neutral         


        
相关标签:
19条回答
  • 2020-12-04 17:56

    I had similar problem. It was really strange as the project was running OK a day before.

    Removing obj and bin folders from the project folder, cleaning the solution and rebuilding it worked.

    Hope that helps.

    0 讨论(0)
  • 2020-12-04 17:56

    Just select "Remove additional files at destination" on publish settings. This works for me

    0 讨论(0)
  • 2020-12-04 17:57

    Try doing a global solution search (ctrl+shift+f if you haven't changed it) for the value '2780ccd10d57b246'. I'm guessing you'll find it in your web.config.

    0 讨论(0)
  • 2020-12-04 17:59

    One more solution option is to have assembly dependency as follows:

    <dependentAssembly>
      <assemblyIdentity name="DotNetOpenAuth.AspNet"
                        publicKeyToken="2780ccd10d57b246"
                        culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="DotNetOpenAuth.Core"
                        publicKeyToken="2780ccd10d57b246"
                        culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
    </dependentAssembly>
    
    0 讨论(0)
  • 2020-12-04 17:59

    I do not have the reputation to comment but I can verify that I had this exact problem and Jack gave the correct solution for me. I had recently pressed Add Service Reference and it broke the program with the above error message.

    Deleting the _bin_deployableAssemblies folder, and your application's bin folder and then clean and rebuild your application made it work again.

    0 讨论(0)
  • 2020-12-04 17:59

    For me helped adding to csproj file the following section:

    <PropertyGroup>
       <PostSharpHostConfigurationFile>web.config</PostSharpHostConfigurationFile>            
    </PropertyGroup>
    
    0 讨论(0)
提交回复
热议问题