genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
388 stars 154 forks source link

System.TypeInitializationException on Windows due to referencing old nlog in app.config #340

Closed nickpbd closed 5 years ago

nickpbd commented 5 years ago

Expected behavior

The service starts

Actual behavior

Service fails in the static initialization of nlog when calling HomeGenieService constructor: FileLoadException: Could not load file or assembly 'NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Steps to reproduce the problem starting from a fresh install

  1. Install Windows version
  2. Run

Specifications

Additional configuration notes

Caused by the dependentAssembly entry in app.config referencing 0.0.0.0-4.0.0.0 or 4.1.0.0 when the version in use is 4.5.10. Removing the config below resolves the issue:

alternatively newVersion="4.5.10"

genemars commented 5 years ago

thanks for reporting =)