|
29 | 29 | <NoWarn>$(NoWarn);CA1416</NoWarn> |
30 | 30 |
|
31 | 31 | <!-- |
32 | | - The CsWin32 source generator emits a 'CoRegisterClassObject' P/Invoke (in 'Ole32') that uses COM |
33 | | - marshalling, which trips 'IL2050' (COM interop correctness under trimming) and 'CA1420' (requires |
34 | | - runtime marshalling, which is disabled repo-wide). This is generated code we don't control, so |
35 | | - suppress both here. |
| 32 | + The CsWin32-generated 'CoRegisterClassObject' P/Invoke (in 'Ole32') takes a COM 'object' parameter |
| 33 | + whose marshalling requires runtime marshalling, which is disabled repo-wide, so it trips 'CA1420'. |
| 34 | + This is generated code we don't control, so suppress it here. (With 'CsWin32RunAsBuildTask=true' the |
| 35 | + generator now emits trim-safe/AOT-safe code, so the previous 'IL2050' suppression is no longer needed.) |
36 | 36 | --> |
37 | | - <NoWarn>$(NoWarn);IL2050;CA1420</NoWarn> |
| 37 | + <NoWarn>$(NoWarn);CA1420</NoWarn> |
38 | 38 | <SelfContained>true</SelfContained> |
39 | 39 | <CsWinRTEnabled>false</CsWinRTEnabled> |
40 | 40 | <OutputType>exe</OutputType> |
|
72 | 72 | <!--<ProjectReference Include="..\OOPExe\OOPExe.csproj" />--> |
73 | 73 |
|
74 | 74 | <PackageReference Include="Microsoft.VCRTForwarders.140" /> |
75 | | - <PackageReference Include="Microsoft.Windows.CsWin32"> |
76 | | - <PrivateAssets>all</PrivateAssets> |
77 | | - <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
78 | | - </PackageReference> |
| 75 | + <PackageReference Include="Microsoft.Windows.CsWin32" PrivateAssets="all" /> |
79 | 76 | <PackageReference Include="Newtonsoft.Json" /> |
80 | 77 | <ProjectReference Include="..\..\Authoring\WinRT.SourceGenerator2\WinRT.SourceGenerator2.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" SetPlatform="Platform=AnyCPU" /> |
81 | 78 | </ItemGroup> |
|
0 commit comments