techstack
techstack

Reputation: 1477

The connected services component Microsoft WCF web service reference provider failed.(HRESULT: 0x80131500) the project format is incorrect

I upgraded my project from dotNetCore 2.2 to 3.0 two weeks ago. Now I want to add a Webservice to it. I am using Visual Studio 2019

But I got this error when I clicked on Microsoft WCF Web Service Reference Provider

None of the suggestions about Microsoft WCF Web Service Reference Provider are the same error as mine

This is the error I got

The connected services component Microsoft WCF web service reference provider failed.(HRESULT: 0x80131500) the project format is incorrect

Can someone please suggest a fix for this? Thanks

Upvotes: 12

Views: 11625

Answers (5)

Rutul Patel
Rutul Patel

Reputation: 39

In Visual Studio 2022, Issue is that if you are create new project with that It is working properly. But some how It is not working with old or Migration time.

So I have suggest just Create new Project and Move Code Old to New Project.

Upvotes: -1

cmpbedes
cmpbedes

Reputation: 523

I recently upgraded my .Net 5 project to .Net 6 using Visual Studio 2022 current (v17.0.0) and found that removing the below from the .csproj file fixed the problem for me.

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

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

Upvotes: 4

Suhaib Raadan
Suhaib Raadan

Reputation: 1338

In my case, I removed the package System.ServiceModel in the csproj.

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

Upvotes: 15

Lex
Lex

Reputation: 70

In my case, there was an old package referenced in the csproj. After removing it from there, the error disappeared.

Removed package:

<ItemGroup>
    <PackageReference Update="Microsoft.NETCore.App" Version="2.2.8" />
</ItemGroup>

Upvotes: 0

Ding Peng
Ding Peng

Reputation: 3974

I clicked on Microsoft WCF Web Service Reference Provider in my VS2019 and found no error. This is my VS2019 related information: enter image description here

You can show me the version information of your VS2019,Or you can reinstall VS2019 that the version information of VS2019 is consistent with that in the picture.

You can also generate proxy classes through svcutil.You can use this tool on the command-line interface of VS: enter image description here

Executing the above command will generate the a proxy class and configuration file on disk D.Then add these two files to your project.

Here's a link about svcutil:

https://learn.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-svcutil-guide?tabs=dotnetsvcutil2x

Upvotes: 0

Related Questions