Skip to content

Conversation

@kvpt
Copy link

@kvpt kvpt commented Sep 8, 2022

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

The WPF platform files are included by this condition :

$(TargetFramework.StartsWith('net4')) And '$(OS)' == 'Windows_NT'

but the WPF framework included by the UseWPF property is included by the condition :

'$(OS)' == 'Windows_NT'

Use the same condition to not include Wpf when not in NET Framework project.

⤵️ What is the current behavior?

When creating a test project targeting net5.0/net6.0 that reference a library that using this library, the build fail because the WPF FrameworkReferences is required, this force to use net5.0-windows or net6.0-windows. The build fail with error NETSDK1136.

🆕 What is the new behavior (if this is a feature change)?

WPF is now only required on .NET Framework project.

💥 Does this PR introduce a breaking change?

No because the WPF framework was required but the platform files was not included on non .NET Framework project.

🐛 Recommendations for testing

Reference the library in a project targeting net5.0/net6.0, the build should not fail with error NETSDK1136.

📝 Links to relevant issues/docs

Issue #568

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines
  • Relevant documentation was updated
  • Rebased onto current develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant