Fails with CsWin32 / C# Source Generators
- Dominant language
- No language data
- Stars
- 1.9k
- Forks
- 173
- Avg merge
- 10d 13h
- Merged PRs (30d)
- 1
Description
I'm using `CsWin32` to generate PInvoke calls. CsWin32 is based upon `C# Source Generators` and it doesn't seem that the code is being generated when running `dotnet format`. See the output below.
See https://github.com/microsoft/CsWin32
NOTE: I've tried using `--exclude` on `GrantWindowsPrivilegeCmdlet.cs` with no luck.
```
Formatting code files in workspace '/src/Solution.sln'.
Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings.
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(6,7): error CS0246: The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(7,7): error CS0246: The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(8,7): error CS0246: The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(9,7): error CS0246: The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(59,17): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(59,74): error CS0246: The type or namespace name 'PSID' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(62,31): error CS0246: The type or namespace name 'PSID' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(65,52): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(65,127): error CS0246: The type or namespace name 'PWSTR' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(69,51): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(70,25): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(76,44): error CS0246: The type or namespace name 'OBJECT_ATTRIBUTES' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(79,41): error CS0246: The type or namespace name 'HANDLE' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(88,43): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(88,69): error CS0246: The type or namespace name 'UNICODE_STRING' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(89,49): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(93,47): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(94,21): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(101,42): error CS0246: The type or namespace name 'UNICODE_STRING' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(102,41): error CS0246: The type or namespace name 'UNICODE_STRING' could not be found (are you missing a using directive or an assembly reference?) [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(110,53): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(111,59): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(115,51): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(116,25): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(117,25): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(122,17): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
/src/Automation/GrantWindowsPrivilegeCmdlet.cs(123,17): error CS0103: The name 'PInvoke' does not exist in the current context [/src/Automation/Automation.csproj]
Formatted code file '/src/Automation/GrantWindowsPrivilegeCmdlet.cs'.
Writing formatting report to: '/report/DotnetFormatReport.json'.
Format complete in 11521ms.
The command '/bin/sh -c dotnet format /src/Solution.sln --no-restore --check --fix-style --fix-analyzers --report /report/DotnetFormatReport.json' returned a non-zero code: 2
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.