D
Doctor-Who
Guest
I created a new C# console app. Nothing fancy. I hadn't even added anything to it yet, such a NuGet package. Then I compiled it, but it failed with lots of errors. e.g.: Unexpected system error mode before loading a package.
VS 2017 gave me a link to the ActivityLog.xml file. Once I passed all of those errors I finally got to what I think might be the real problem. Here's the error it gave:
Exception occurred while loading assembly CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a: System.IO.FileNotFoundException: Could not load file or assembly 'CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
 at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
 at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.<>c__DisplayClass17_0.<LoadAssembly>b__0(AssemblyName assemblyNameParam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
.;vs.platform.extensibilityhosting.assemblyloadexception.AssemblyFullName=CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;vs.platform.extensibilityhosting.assemblyloadexception.AssemblyPath=file:///C:/USERS/ROD/APPDATA/LOCAL/MICROSOFT/VISUALSTUDIO/15.0_60BC64B3/EXTENSIONS/GFN5HNKZ.3ER/CopyAsHtml.dll;vs.platform.extensibilityhosting.assemblyloadexception.FusionLogEntry=WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
;vs.platform.extensibilityhosting.assemblyloadexception.ExceptionType=System.IO.FileNotFoundException;vs.platform.extensibilityhosting.assemblyloadexception.ExceptionMessage=Could not load file or assembly 'CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.;vs.platform.extensibilityhosting.assemblyloadexception.ExceptionStackTrace= at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
 at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.<>c__DisplayClass17_0.<LoadAssembly>b__0(AssemblyName assemblyNameParam)

Why would VS 2017 have such a huge hiccup on a brand new C# console app?
Rod
Continue reading...
VS 2017 gave me a link to the ActivityLog.xml file. Once I passed all of those errors I finally got to what I think might be the real problem. Here's the error it gave:
Exception occurred while loading assembly CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a: System.IO.FileNotFoundException: Could not load file or assembly 'CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
 at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
 at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.<>c__DisplayClass17_0.<LoadAssembly>b__0(AssemblyName assemblyNameParam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
.;vs.platform.extensibilityhosting.assemblyloadexception.AssemblyFullName=CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;vs.platform.extensibilityhosting.assemblyloadexception.AssemblyPath=file:///C:/USERS/ROD/APPDATA/LOCAL/MICROSOFT/VISUALSTUDIO/15.0_60BC64B3/EXTENSIONS/GFN5HNKZ.3ER/CopyAsHtml.dll;vs.platform.extensibilityhosting.assemblyloadexception.FusionLogEntry=WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
;vs.platform.extensibilityhosting.assemblyloadexception.ExceptionType=System.IO.FileNotFoundException;vs.platform.extensibilityhosting.assemblyloadexception.ExceptionMessage=Could not load file or assembly 'CopyAsHtml, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.;vs.platform.extensibilityhosting.assemblyloadexception.ExceptionStackTrace= at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
 at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
 at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.<>c__DisplayClass17_0.<LoadAssembly>b__0(AssemblyName assemblyNameParam)

Why would VS 2017 have such a huge hiccup on a brand new C# console app?
Rod
Continue reading...