NeVeSpl / NTypewriter

File/code generator using Scriban text templates populated with C# code metadata from Roslyn API.
https://nevespl.github.io/NTypewriter/
MIT License
126 stars 25 forks source link

The 'NTypewriterEditorForVisualStudioPackage' package did not load correctly. #30

Closed RudeySH closed 3 years ago

RudeySH commented 3 years ago

I'm getting the following error when starting Visual Studio:

The 'NTypewriterEditorForVisualStudioPackage' package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\RudeySH\AppData\Roaming\Microsoft\VisualStudio\16.0_9d235251\ActivityLog.xml'.

Restarting Visual Studio could help resolve this issue.

I have the latest version of the extension installed (0.0.11).

The ActivityLog.xml contains the following entries near the bottom:

  <entry>
    <record>2847</record>
    <time>2021/04/28 13:11:23.026</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [NTypewriterEditorForVisualStudioPackage]</description>
    <guid>{7CB32B43-C9AA-44F8-BCED-9BAA9A76B4FD}</guid>
  </entry>
  <entry>
    <record>2848</record>
    <time>2021/04/28 13:11:23.039</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [NTypewriterEditorForVisualStudioPackage]Source: &apos;NTypewriter.EditorForVisualStudio&apos; Description: Could not load file or assembly &apos;Microsoft.VisualStudio.Threading, Version=16.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;Microsoft.VisualStudio.Threading, Version=16.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;Microsoft.VisualStudio.Threading, Version=16.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos;&#x000D;&#x000A;   at NTypewriter.EditorForVisualStudio.NTypewriterEditorForVisualStudioPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass20_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.&lt;JoinAsync&gt;d__68.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.GetResult()&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>
    <guid>{7CB32B43-C9AA-44F8-BCED-9BAA9A76B4FD}</guid>
    <hr>80070002</hr>
    <errorinfo></errorinfo>
  </entry>
  <entry>
    <record>2849</record>
    <time>2021/04/28 13:11:23.047</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [NTypewriterEditorForVisualStudioPackage]</description>
    <guid>{7CB32B43-C9AA-44F8-BCED-9BAA9A76B4FD}</guid>
    <hr>80070002</hr>
    <errorinfo></errorinfo>
  </entry>
NeVeSpl commented 3 years ago

What version of VS do you have? Below 16.9.0 ?

RudeySH commented 3 years ago

I just updated from 16.8.4 to 1.9.4 and it solved the problem.