-
Notifications
You must be signed in to change notification settings - Fork 41
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
License Header Manager Execution of Asynchronous Task Failed #162
Comments
@MrMontana1889 Thanks for reporting this. Yes, we had to adapt to the async-requirements of recent Visual Studio updates. Could you please elaborate on
Are you saying that the error happens while you're debugging your code and somehow triggering the insertion of a license header? |
From what I can ascertain, the message only occurs when I am debugging. It happens seemingly randomly (not "every time" I debug but more than 75% of the time). It seems like it wants to insert the header into the source file that I am stepping into, whether it is part of the currently solution or another component. It's really hard to say, one way or the other though. |
@MrMontana1889 Do you have the checkbox "automatically insert license header into new files" checked or unchecked? |
@MichaelKetting Hey I get this message too and i have the "automatically insert license header into new files" checked , is there any new insight? |
For me it happens when I unload/reload a project in visual studio 2015 |
@orSolocate Thank you for confirming this. I haven't set this flag and am using ReSharper + Silent-Code-Cleanup instead. I can't verify/falsify this scenario right now. |
This is the licenseHeaderManager output window, maybe will help you understand the issue:
|
@orSolocate Thank you for the trace! |
@MichaelKetting any update about it mate? I know VS15 is an oldie but this is what my team use.. we really want to use your add-on. |
@orSolocate sorry, no updates on this. Either way, VS2015 isn't getting any new builds anymore for License Header Manager because of constraints in the compatibility matrix of VS Extensions => it would mean doing a lot of extra stuff to produce dedicated builds for older versions of Visual Studio. |
:( I see, thank you mate! |
@MichaelKetting the same problem happens for me on VS 2022. "Automatically insert license header in new files" is enabled. It happens on unloading/releoading of projects and when I added a new file and try to undo the folder containing it in the "Git Changes" window. Here is the content of the output window:
|
scenario: Add / Existing Project ... |
See a screen cap attached.
Here is the output from the output window:
System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at EnvDTE.ProjectItem.get_FileNames(Int16 index)
at LicenseHeaderManager.Utils.Extensions.IsOpen(ProjectItem item) in C:\Build\1776828f99d31c99\LicenseHeaderManager\Utils\Extensions.cs:line 216
at LicenseHeaderManager.Utils.Extensions.GetContent(ProjectItem item, Boolean& wasAlreadyOpen, ILicenseHeaderExtension extension) in C:\Build\1776828f99d31c99\LicenseHeaderManager\Utils\Extensions.cs:line 170
at LicenseHeaderManager.LicenseHeadersPackage.d__63.MoveNext() in C:\Build\1776828f99d31c99\LicenseHeaderManager\LicenseHeadersPackage.cs:line 406
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at LicenseHeaderManager.Utils.Extensions.<g__ForgetAwaited|9_0>d.MoveNext() in C:\Build\1776828f99d31c99\LicenseHeaderManager\Utils\Extensions.cs:line 272
I cannot reproduce it on purpose. It just happens randomly. It only started relatively recently (I "think" around the release of 4.0). This was one of the most stable extensions at one point but now it is not.
![ErrorMsg](https://user-images.githubusercontent.com/17349904/140506298-e0d9af57-6593-486f-bd32-b68516330f4a.png)
It would seem that license headers should not be inserted when debugging code. That doesn't make a lot of sense.
HTH.
The text was updated successfully, but these errors were encountered: