-
Notifications
You must be signed in to change notification settings - Fork 114
Description
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.csprojcontent:
<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.txtcontent: (an empty file is enough to trigger the warning)
dotnet build produces the following warning:
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]
Context
- CsWin32 version: 0.3.2-beta
- Win32Metadata version: not set explicitly
- Target Framework: net6.0
LangVersion: not set explicitly
Additional info
The warning does not occur when using Microsoft.Net.Compilers.Toolset version 4.5.0.