Skip to content

Net48 is not compatible with WCF6.0 packages when projects specify multiple target frameworks #5211

Open
@JiakaiDou

Description

@JiakaiDou

Describe the bug
Specifying multiple target frameworks Net48 and Net6.0 in the project, adding a WCF service reference, and then building the solution, I get an error that Net48 is not compatible with the WCF6.0 package.

To Reproduce
Steps to reproduce the behavior:

  1. Create Net6.0 TargetFramework project, e.g., Console App
  2. Open .csproj file, change net6.0 to net6.0;net48, delete ImplicitUsings and Nullable those two properties
  3. Go to Program.cs file, add the following sample code. Save all changes.
  4. Add WCF Service reference
  5. Build solution

Expected behavior
The code is generated without error and the project builds successfully.

Metadata

Metadata

Assignees

Labels

toolingAn issues related to any tool shipped from this repo.triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions