Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VS2022] The 'CSharpierPackage' package did not load correctly #946

Closed
BenjaBobs opened this issue Aug 30, 2023 · 3 comments
Closed

[VS2022] The 'CSharpierPackage' package did not load correctly #946

BenjaBobs opened this issue Aug 30, 2023 · 3 comments

Comments

@BenjaBobs
Copy link

After the latest preview update of Visual Studio I've been getting a message on startup that CSharpier did not load correctly.
It says to look in the log file, and it contained this information:

<entry>
  <record>466</record>
  <time>2023/08/30 06:55:26.685</time>
  <type>Information</type>
  <source>VisualStudio</source>
  <description>Begin package load [CSharpierPackage]</description>
  <guid>{D348BA73-11DC-46BE-8660-6D9819FC2C52}</guid>
</entry>
<entry>
  <record>467</record>
  <time>2023/08/30 06:55:26.826</time>
  <type>Error</type>
  <source>VisualStudio</source>
  <description>SetSite failed for package [CSharpierPackage]Source: &apos;&apos; Description: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))&#x000D;&#x000A;System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))&#x000D;&#x000A;   at EnvDTE.DTE.get_ActiveDocument()&#x000D;&#x000A;   at CSharpier.VisualStudio.CSharpierPackage.&lt;InitializeAsync&gt;d__1.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 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass21_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.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)</description>
  <guid>{D348BA73-11DC-46BE-8660-6D9819FC2C52}</guid>
  <hr>0x80070057 - E_INVALIDARG</hr>
  <errorinfo></errorinfo>
</entry>

Visual Studio version:
image

@zhangboyanzhangboyan
Copy link

metoo

@belav belav closed this as completed in e737c60 Sep 1, 2023
@belav
Copy link
Owner

belav commented Sep 1, 2023

I couldn't reproduce this, but the code that is failing is trying to warm up csharpier using the active document. Adding a try catch around it seemed like an easy fix.

@belav
Copy link
Owner

belav commented Sep 1, 2023

1.4.5 should be available shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants