Skip to content
New issue

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

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

Open
jnm2 opened this issue Nov 21, 2021 · 2 comments · May be fixed by #90

Comments

@jnm2
Copy link
Contributor

jnm2 commented Nov 21, 2021

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 #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
Copy link
Contributor Author

jnm2 commented Nov 21, 2021

Moving this repo to use the .NET 6 SDK repros this problem immediately (master...jnm2:sdk_6)

@chucker
Copy link

chucker commented May 12, 2022

See also manuelroemer/IsExternalInit#11.

Seems to me the property is indeed the correct fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants