codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.92k stars 362 forks source link

v12.0 is not work in vs2019 enterprise #865

Closed shelllee closed 2 years ago

shelllee commented 2 years ago

Environment

Description

Load Error

  <entry>
    <record>3474</record>
    <time>2021/11/10 03:10:01.638</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [CodeMaidPackage]Source: &aposSteveCadwallader.CodeMaid&apos Description: 未能加载文件或程序集“Microsoft.VisualStudio.Threading, Version=16.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件。
System.IO.FileNotFoundException: 未能加载文件或程序集“Microsoft.VisualStudio.Threading, Version=16.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件。
文件名:“Microsoft.VisualStudio.Threading, Version=16.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
   在 SteveCadwallader.CodeMaid.CodeMaidPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress)
   在 Microsoft.VisualStudio.Shell.AsyncPackage.&lt&gtc__DisplayClass20_0.&lt&ltMicrosoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gtb__1&gtd.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
   在 Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
   在 Microsoft.VisualStudio.Services.VsTask.GetResult()

警告: 程序集绑定日志记录被关闭。
要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。
注意: 会有一些与程序集绑定失败日志记录关联的性能损失。
要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。
</description>
...
  </entry>

Steps to recreate

  1. once on opened vs

Current behavior

emmm

Expected behavior

emmm

vikong commented 2 years ago

In Visual Studio Community 2019 too.

eduinovace commented 2 years ago

Same here with visual studio community 2019 version 16.9.4 This is the activity log:

`

2585
<time>2021/11/10 08:33:16.302</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [CodeMaidPackage]</description>
<guid>{4C82E17D-927E-42D2-8460-B473AC7DF316}</guid>

2586 Error VisualStudio SetSite failed for package [CodeMaidPackage]Source: 'SteveCadwallader.CodeMaid' Description: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=16.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. El sistema no puede encontrar el archivo especificado. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=16.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. El sistema no puede encontrar el archivo especificado. File name: 'Microsoft.VisualStudio.Threading, Version=16.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at SteveCadwallader.CodeMaid.CodeMaidPackage.InitializeAsync(CancellationToken cancellationToken, IProgress1 progress) at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass20_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Services.VsTask.GetResult() AVS: El registro del enlace de ensamblado está desactivado. Para habilitar el registro de errores del enlace de ensamblado, establezca el valor de Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1. Nota: existe una disminución del rendimiento asociada registro de errores del enlace de ensamblado. Para desactivar esta característica, elimine el valor de Registro [HKLM\Software\Microsoft\Fusion!EnableLog]. {4C82E17D-927E-42D2-8460-B473AC7DF316}
80070002
2587 Error VisualStudio End package load [CodeMaidPackage] {4C82E17D-927E-42D2-8460-B473AC7DF316}
80070002
` And the error in visual studio: ![image](https://user-images.githubusercontent.com/93317224/141078315-850707ca-1cc6-42ea-9320-103185bc78f2.png)
codecadwallader commented 2 years ago

Thanks for reporting the issue. I saw someone mention in another issue that upgrading VS2019 to the latest (v16.11) helped them. Can you give that a try?

rickblack commented 2 years ago

Thanks for reporting the issue. I saw someone mention in another issue that upgrading VS2019 to the latest (v16.11) helped them. Can you give that a try?

Confirming that this worked for me. Went from 16.8.3 to 16.11.6 and I no longer receive this error.

vikong commented 2 years ago

The update VS2019 to 16.11 helped me too.

shelllee commented 2 years ago

My problem resolved too.

shelllee commented 2 years ago

Update VS2019 version to latest should be help.