ReferenceAssemblyAnnotator icon indicating copy to clipboard operation
ReferenceAssemblyAnnotator copied to clipboard

NETSDK1022 error for default compile items when using WPF with .NET 6 SDK caused by our workaround for earlier SDKs

Open jnm2 opened this issue 4 years ago • 2 comments

I'm reproing:

Error NETSDK1022: Duplicate 'Compile' items were included. The .NET SDK includes 'Compile' items from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultCompileItems' property to 'false' if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'C:\Users\Joseph.nuget\packages\tunnelvisionlabs.referenceassemblyannotator\1.0.0-alpha.160\build\NullableAttributes.cs'

And I think this could be https://github.com/tunnelvisionlabs/ReferenceAssemblyAnnotator/pull/82 causing problems now that the .NET 6 SDK fixed the problem we were working around. <IncludePackageReferencesDuringMarkupCompilation> is on by default starting with SDK 6, and we should have a CI test with and also without.

jnm2 avatar Nov 21 '21 21:11 jnm2

Moving this repo to use the .NET 6 SDK repros this problem immediately (https://github.com/tunnelvisionlabs/ReferenceAssemblyAnnotator/compare/master...jnm2:sdk_6)

jnm2 avatar Nov 21 '21 22:11 jnm2

See also https://github.com/manuelroemer/IsExternalInit/pull/11.

Seems to me the property is indeed the correct fix.

chucker avatar May 12 '22 10:05 chucker