2
GhostDoc stopped working after upgrading to VS2022 17.1.0
Problem reported by Neil S. - 2/21/2022 at 9:43 AM
Resolved
Everything has been working fine for weeks, but now whenever I try to document anything (via shortcut, ///, or 'document this'), GhostDoc does nothing.

The only thing I can think that has changed is VS2022 has just been upgraded to 17.1.0


17 Replies

Reply to Thread
0
Misha Zhutov Replied
Employee Post
Hi Neil,

Do you have GhostDoc entry in the Extensions->Manage Extensions->Installed? If so, please provide us (to support@submain.com) with the log file from c:\Users\<user>\Documents\SubMain\GhostDoc for VS2022\GhostDoc.log?
0
Neil S. Replied
The extension does appear in the list.

I've sent the logs via a support ticket 1E7-29A76E46-0301 

0
Jay B. Replied
Any updates on a fix or a patch? I don't want to open a duplicate ticket.

Thank you,
1
Misha Zhutov Replied
Employee Post Marked As Resolution
We addressed the issue in our latest build v2022.1.22055. Please download it from https://submain.com/download/ghostdoc/pro/
1
Jay B. Replied
Misha- I'm getting a CRC error when trying to unzip the full download.
1
Neil S. Replied
I get a similar problem.  Downloaded full pro version from here: https://submain.com/download/ghostdoc/pro/  Can't extract the zip: Error: 80004005: Unspecified error.

0
Kevin Replied
I'm having the same issue as well. I can't extract from the zip file, same as Neil.
0
Neil S. Replied
Looks like the installer has been fixed.  I have installed it now, and I can now document again.   

Thanks Guys

0
Cyril St. Michael Replied
I've still got this prob w\ GhostDoc 2022.2.22190 and VS2022 v17.4.5.  Tried to doc w\ the keyboard shortcut of triple slash, the ctrl+shift+d shortcut, and the r-click.  Nothing.

Snippet from logs:


Exception Source: SubMain.GhostDoc.Package.clr4.6
Exception Type: System.NullReferenceException
Exception Message: Realtime preivew: Object reference not set to an instance of an object.
Exception Target Site: 

---- Stack Trace ----
 A.cd8830c6d6c655eabb639c2a32e64b014.c0012a3cfd6f80130a0508007ae497b4b( As Object)
 SubMain.GhostDoc.Core.DLL: N 00029
 A.c711a1be5b6388d8112aa565d06d29528.cb568d2a2e221daf176db62c8c20bb23d( As XmlDocument,  As String)
 SubMain.GhostDoc.Core.DLL: N 00077
 A.cba7a0ea294e9e174dfc17c379f5f490e.cbd9be4288aa6c4bc190ab23d9ae14956( As _DTE,  As Object,  As ICompilationUnit,  As Boolean,  As Boolean,  As Boolean,  As Boolean,  As String,  As caaa39122dda9ddb32ba7951e201874d5)
 SubMain.GhostDoc.Core.DLL: N 04364
0
Misha Zhutov Replied
Employee Post
Hello, 
It is an unexpected error, you can disable the Real-time Preview by unchecking the button on the Preview toolwindow.  

0
Cyril St. Michael Replied
Thx for the reply, but I don't see the preview option in my window:

What's more, the preview seems to work fine for comments already written.



It's only breaking when I try to start from scratch, do a keyboard/menu shortcut, and try to create a comment skeleton.
0
Misha Zhutov Replied
Employee Post
Sorry, it was my fault. I did not notice that you are using non-Pro version of GhostDoc. 

Could you please provide us with more details about what member/type you tried to document? Maybe, you can provide us with a code snippet or screenshot? You can send it to support@submain.com if you cannot attach it to this thread.

If you'd like just to add XML comments (without using the Comment Editor) you can open GhostDoc->Options->Comment Editor and uncheck the "Use Comment Editor to Document This". In that case, the Comment Editor won't be used along with the exception. 


0
Cyril St. Michael Replied
"If you'd like just to add XML comments (without using the Comment Editor) you can open GhostDoc->Options->Comment Editor and uncheck the "Use Comment Editor to Document This". In that case, the Comment Editor won't be used along with the exception."

That is already unchecked in my options, seemingly by default.



I can put the entire file in here, it's rather tiny.  This is a .net 6 console app which just figures out which values a config file template actually uses from its corresponding lookup.  I'm trying to comment the method GetLookupReport.  Code follows:


using Aspose.Cells;

const string rootFolderPath = @"C:\configFiles";
var templateFilePath = Path.Combine(rootFolderPath, "template.web.config");
var lookupFilePath = Path.Combine(rootFolderPath, "settings.web.config.csv");

var outputPath = Path.Combine(rootFolderPath, "lookupToConfigUsage.tsv");
File.WriteAllText(outputPath, GetLookupReport(lookupFilePath, templateFilePath));

static string GetLookupReport(string lookupFilePath, string templateFilePath)
{
    // setup
    var templateContent = File.ReadAllText(templateFilePath); // get template from file

    return string.Join(
        Environment.NewLine,
        new Workbook(lookupFilePath)
            .Worksheets[0]
            .Cells
            .Rows
            .Cast<Row>()
            .First() // grab first row
            .Cast<Cell>()
            .Select(cell => new { cell.StringValue, Bookmark = $"[%%{cell.StringValue}%%]" })
            .Select(nameAndBookmark => 
                $"{nameAndBookmark.StringValue}\t{templateContent.Contains(nameAndBookmark.Bookmark)}"
            )
    );
}
0
Misha Zhutov Replied
Employee Post
Thank you for the code snippet provided. 
GhostDoc does not support documenting local methods outside of a class but we are working on it. 

0
Cyril St. Michael Replied
It's a side effect of .Net 6 bolting all that on automatically, then?  Meaning if I go the old school route of making a Program.cs file w\ a namespace, class, and all that, it'll work?
0
Misha Zhutov Replied
Employee Post
Yes, it will work with the old-school route of making a Program.cs file with a namespace and class.
0
Cyril St. Michael Replied
Thx.  Will keep that in mind as I write future code.  Looking fwd to the next version of the software.

Reply to Thread