0

I upgraded a C# Class Library Project from .Net Framework 4.5.2 to .NetStandard2.0. Post migration, I removed the existing Web References (which were present in .Net framework) and trying to add them as Connected Services. However, I'm getting an error when I choose "WCF Web Reference" in the "Add Service Reference" dialog. Below is the screenshot of the error:

Add WCF service error

I already referred to the below StackOverflow question and followed the solution. There are no item group in my .csproj that could be causing this issue.

similar issue

<ItemGroup>
  <Reference Include="System.ServiceModel" />
</ItemGroup>

<ItemGroup>
  <WCFMetadata Include="Connected Services" />
</ItemGroup>

1 Answers1

0

After scrutinizing the .csproj file, found that these references were still present and causing the issue. Removing the below lines from .csproj resolved the issue.

    <Reference Update="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Update="System.Runtime.Serialization">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Update="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>