0

I am adding Exceptionless to my WebForms application via nuget. The application compiles but I get a runtime error when visiting a page:

Could not load file or assembly 'Exceptionless.Portable, Version=3.1.1416.0, Culture=neutral, PublicKeyToken=fc181f0a46f65747' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

The issue is 3.1.1416.0. It shouldn't be trying to load this version as I am currently using version 3.2.1424.0. I've checked web.config and no runtime reassignment exists.

My web.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
        <section name="exceptionless" type="Exceptionless.ExceptionlessSection, Exceptionless.Extras" />
        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
    </configSections>
    ....
    <exceptionless apiKey="***********" enabled="true" />
    ....
    <system.webServer>
        <modules>
            <add name="ExceptionlessModule" type="Exceptionless.Web.ExceptionlessModule, Exceptionless.Web" />
        </modules>
    </system.webServer>
</configuration>

Where is my application picking up 3.1.1416.0 from?

  1. Checked web.config (see above)
  2. Checked versions of all Exceptionless References Assemblies: Exceptionless.Extras, Exceptionless.Portable, Exceptionless.Web. All are at version 3.2.1424.0.
  3. Checked IISExpress configuration files applicationhost.config, redirection.config, aspnet.config
  4. Done a "Search in Files" (*.*) for version number - nothing!

Assembly Load Trace is as follows (which as you can see refers only to the incorrect assembly version:

=== Pre-bind state information ===
LOG: DisplayName = Exceptionless.Portable, Version=3.1.1416.0, Culture=neutral, PublicKeyToken=fc181f0a46f65747
 (Fully-specified)
LOG: Appbase = file:///C:/TFS/DALS/Main/Source/Core/StaffPages/
LOG: Initial PrivatePath = C:\TFS\DALS\Main\Source\Core\StaffPages\bin
Calling assembly : DerbyLib, Version=2.2.5855.29039, Culture=neutral, PublicKeyToken=cfdbfaae31cae294.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\TFS\DALS\Main\Source\Core\StaffPages\web.config
LOG: Using host configuration file: C:\Users\Chris\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Exceptionless.Portable, Version=3.1.1416.0, Culture=neutral, PublicKeyToken=fc181f0a46f65747
LOG: Attempting download of new URL file:///C:/Users/Chris/AppData/Local/Temp/Temporary ASP.NET Files/vs/ec9388cd/d1727d5c/Exceptionless.Portable.DLL.
LOG: Attempting download of new URL file:///C:/Users/Chris/AppData/Local/Temp/Temporary ASP.NET Files/vs/ec9388cd/d1727d5c/Exceptionless.Portable/Exceptionless.Portable.DLL.
LOG: Attempting download of new URL file:///C:/TFS/DALS/Main/Source/Core/StaffPages/bin/Exceptionless.Portable.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Any thoughts? Thanks.

Chris Walsh
  • 3,423
  • 2
  • 42
  • 62

1 Answers1

0

Is this your first time with it or were you using 3.1.1416.0 at one point and have upgraded to 3.2.1424.0? If so, you may need to clean or manually wipe your bin folder. If not, try setting up a new solution, install Exceptionless, do a minimum viable test to make sure it's working, and use those assemblies in your existing project.

Bigsby
  • 952
  • 6
  • 20
  • I presume I was using `3.1.1416.0` in the recent past. Yes I did try clearing `bin` and `obj` folders, did a clean solution and cleared out `Temp` folders but these didn't work. I've not tried creating a new solution because it will take days to migrate all code into new Projects etc. as well as the hell it will bring to Source Control. Sorry but thanks. – Chris Walsh Jan 12 '16 at 18:31
  • @ChrisWalsh You misunderstand. I'm not advising you to move all your code to a new project. I'm advising you to set up a test bed to get the 1424 version working and then to move working test bed assemblies to your main project. – Bigsby Jan 12 '16 at 18:34
  • Thanks @Bigsby. So, I can set up a test project/solution for Exceptionless `3.2.1424.0` and test that they work correctly. After that however, in order to "move working test bed assemblies to your main project" - are you suggesting doing away with pulling Exceptionless from NuGet? Thanks. – Chris Walsh Jan 12 '16 at 18:45
  • @ChrisWalsh As an immediate next step, yes. If that works, try going back to NuGet. – Bigsby Jan 12 '16 at 18:48
  • Will do. I'll let you know how I get on. Cheers – Chris Walsh Jan 12 '16 at 18:50
  • Were you able to get this working? I know I'm a bit late... I work on the Exceptionless project and would be more than happy to help out as well. – Blake Niemyjski Jul 07 '17 at 02:06