wcf: Dotnet-svcutil & VS extension fails with dotnet 1.1

The dotnet-svcutil.exe tool keeps failing on me. The error in the VS from Visual Studio WCF Connected Service extension is:

Scaffolding Code ...
Error:Error: MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
An error occurred while bootstrapping svcutil. This usually happens when processing references.  You might be able to work around this problem by not providing reference parameters, and manually removing any types redefined in the generated proxy code.

Failed to generate service reference.

Reading in the comments at the announcement page I have tried digging into the internals at: C:\Users\<name>\AppData\Local\Temp\WCFConnectedService\2016_Nov_17_16_07_08\svcutil_bootstrap\dotnet-svcutil

From the console doing dotnet -v restore . fails with: Error: MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

So I dug deeper, and found out that since I have dotnet 1.1 it looks for csproj at restore. So I put in the sdk in the global.json at 2016_Nov_17_16_07_08\svcutil_bootstrap. But the command actually overwrites that global.json. Any pointers on how to use this extension with the latest bits?

Note: have copied this comment over from that page for greater visibility

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 21 (8 by maintainers)

Most upvoted comments

@zhenlan @hongdai @masaeedu thank you all for your help. I managed to get it work with VS2017 and copying reference to VS2015 project. Thanks again.

@lucky3, just an idea, you can download and install WCF Connected Service for VS 2017, create a dummy .NET Core project, generate reference.cs using the tool and then copy the reference.cs back to your VS2015 project.

For anyone else running into this who needs a quick hack. Simply go to C:\Program Files\dotnet\sdk and temporarily rename any sdk versions above 2.1 so that a .json project format compatible SDK is used.

Hi @aateeque, we just released an update to the WCF Connected Service that added support for .NET Core/ASP.NET Core 1.1. Please let us know if you run into any issues. Thank you!