I have a class library depending on https://github.com/SimonCropp/Polyfill
https://github.com/sharpliner/sharpliner/blob/main/src/Sharpliner/Sharpliner.csproj
<PackageReference Include="Polyfill">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers;</IncludeAssets>
</PackageReference>
The test project I’m using is targeting .NET 9.0 and has a reference to the above class library.
https://github.com/sharpliner/sharpliner/pull/397/files#diff-353d53838ab378475d4f8d082dad4d1198e3fd6d04c9d45795422f826600eb57
I’m not able to compile the test project and getting the compile error:
D:RepossharplinersharplinertestsSharpliner.TestsTestSetup.cs(7,6): error CS0433: The type ‘ModuleInitializerAttribute’ exists in both ‘Sharpliner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ and ‘System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
(see the file https://github.com/sharpliner/sharpliner/pull/397/files#diff-1bd053e7b448d4fe77e812534be42f113e82695a6b10c19e0a92abd305ff61b9)