If the error happens with error column "File" as SGEN, then the fix needs to be in a file sgen.exe.config
, next to sgen.exe
. For example, for VS 2015, create C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\sgen.exe.config
. Minimum file contents: <configuration><startup useLegacyV2RuntimeActivationPolicy="true"/></configuration>
Source: SGEN Mixed mode assembly