CS1591 Warning occurring when making generated types `public`
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.5k
- Forks
- 123
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 9
Description
Actual behavior
When setting "public": true in the NativeMethods.json file the compiler outputs warnings for missing XML Comments after building the application.
Types I am aware of right now (in my project):
ITaskbarList2.HrInit()
ITaskbarList2.AddTab(HWND)
ITaskbarList2.DeleteTab(HWND)
ITaskbarList2.ActivateTab(HWND)
ITaskbarList2.SetActiveAlt(HWND)
ITaskbarList3.HrInit()
ITaskbarList3.AddTab(HWND)
ITaskbarList3.DeleteTab(HWND)
ITaskbarList3.ActivateTab(HWND)
ITaskbarList3.SetActiveAlt(HWND)
ITaskbarList3.MarkFullscreenWindow(HWND, BOOL)
Expected behavior
No warnings and docs are generated accordingly.
Repro steps
NativeMethods.txtcontent:
// Debug purpose only
AllocConsole
// Taskbar progress bar
ITaskbarList3
TaskbarList
TBPFLAG
// Hide window from screenshot tools
SetWindowDisplayAffinity
// Clipboard operations
OpenClipboard
EmptyClipboard
GlobalAlloc
GLOBAL_ALLOC_FLAGS
CLIPBOARD_FORMAT
GlobalLock
GlobalFree
GlobalUnlock
SetClipboardData
CloseClipboard
NativeMethods.jsoncontent (if present):
{
"$schema": "https://aka.ms/CsWin32.schema.json",
"comInterop": {
"useComSourceGenerators": true
},
"public": true
}
Context
- CsWin32 version: 0.3.265
- Win32Metadata version: 68.0.4-preview & 0.13.25-experimental
- Target Framework: net10.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the NativeMethods.json setting that makes generated types public and reproduce the CS1591 warnings using the NativeMethods.txt entries. Trace how the source generator emits the listed COM members, then verify that the build has no missing-XML-comment warnings and documentation is generated for the public types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100