We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Warning PInvoke006 occurs when using the latest compiler toolset (i.e. Microsoft.Net.Compilers.Toolset 4.6.0).
PInvoke006
No warning is produced.
MyProject.csproj
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net6.0</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.6.0" PrivateAssets="all" /> <PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.2-beta" PrivateAssets="all" /> </ItemGroup> </Project>
NativeMethods.txt
dotnet build produces the following warning:
dotnet build
CSC : warning PInvoke006: An error occurred while reading docs file: "%USERPROFILE%\.nuget\packages\microsoft.windows.sdk.win32docs\0.1.41-alpha\ buildTransitive..\apidocs.msgpack": Failed to deserialize System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib, Version=6 .0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Windows.SDK.Win32Docs.ApiDetails, Microsoft.Windows.SDK.Win32Docs, Version=0.1. 41.51634, Culture=neutral, PublicKeyToken=7c40c7c34b1fcfe1]] value. [C:\MyProject\MyProject.csproj]
LangVersion
The warning does not occur when using Microsoft.Net.Compilers.Toolset version 4.5.0.
The text was updated successfully, but these errors were encountered:
I can repro it as you say, when I use dotnet build. Thank you for this report.
Sorry, something went wrong.
@sharwell do you have any guesses as to what breaking change may have occurred in Roslyn between the 4.5.0 and 4.6.0 versions?
I've started running into this as well, in a .NET 8 RC 1 project. Oddly, it only appears in VS Code, not with dotnet build... 🤔
Successfully merging a pull request may close this issue.
Actual behavior
Warning
PInvoke006
occurs when using the latest compiler toolset (i.e. Microsoft.Net.Compilers.Toolset 4.6.0).Expected behavior
No warning is produced.
Repro steps
MyProject.csproj
content:NativeMethods.txt
content: (an empty file is enough to trigger the warning)dotnet build
produces the following warning:Context
LangVersion
: not set explicitlyAdditional info
The warning does not occur when using Microsoft.Net.Compilers.Toolset version 4.5.0.
The text was updated successfully, but these errors were encountered: