Search code examples
nbug

Why NBug HostApplicationVersion shows an incorrect version of the application?


I get a Crash Report, but HostApplicationVersion does not show the version of my application. It seems that the version of NBug itself is shown, while the version of my application 2.12.4.0.

<Report xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <GeneralInfo>
    <CLRVersion>4.0.30319.42000</CLRVersion>
    <DateTime>10/14/2020 6:17:46 PM</DateTime>
    <ExceptionMessage>Object reference not set to an instance of an object.</ExceptionMessage>
    <ExceptionType>System.NullReferenceException</ExceptionType>
    <HostApplication>HotBotVPN.exe</HostApplication>
    <HostApplicationVersion>1.2.*</HostApplicationVersion>
    <NBugVersion>1.2.1.0</NBugVersion>
    <TargetSite>...</TargetSite>
  </GeneralInfo>
</Report>

Solution

  • You probably need to set this: https://github.com/soygul/NBug/blob/master/NBug/Settings.cs#L391

    I'm guessing you are dynamically loading NBug assembly which can cause this.