Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add connected services in 2.1 Preview (Error: Version for package dotnet-svcutil could not be resolved) #2719

Closed
sliceofbytes opened this issue Mar 27, 2018 · 30 comments
Assignees
Labels
tooling An issues related to any tool shipped from this repo.

Comments

@sliceofbytes
Copy link

Create New Web Application using Core 2.1 Preview. (Angular Application)

Attempt to add connected services.

Error: Version for package dotnet-svcutil could not be resolved.

Switch version to Core 2.0 attempt to add service (Completes successfully)

@Lxiamail Lxiamail added this to the 2.1.0 milestone Mar 29, 2018
@mlacouture
Copy link
Member

Hi @sliceofbytes
Thank you for reporting this issue. We made several improvements to the tool to support versions of the framework not yet known to the tool (so the tool doesn't need to be recompiled to add support for the newer framework version) and these improvements will be available with the release of Visual Studio 2017 v15.7 Preview 3 scheduled to be released on the first week of April (4/4). Stay tuned ...

@mlacouture mlacouture added the tooling An issues related to any tool shipped from this repo. label Mar 29, 2018
@Lxiamail Lxiamail modified the milestones: 2.1.0, S133 Mar 30, 2018
@mlacouture mlacouture modified the milestones: S133, S134 Apr 6, 2018
@mlacouture
Copy link
Member

Visual Studio v15.7 v15.7 Preview 4 is now available.

@rvanmaanen
Copy link

This issue still persists in VS 15.7 preview 4. The project is using .NET Core version 2.1.300-preview2-008533

image

@mlacouture mlacouture reopened this Apr 25, 2018
@mlacouture
Copy link
Member

Hi @sliceofbytes
Thank you again for reporting this problem; it is very unfortunate that this was not fixed; I'm sorry about it.

I can offer a workaround while the fix for this issue is released in case you absolutely need to run this for NET Core v2.1:

Locate the temporary folder created by the WCF Web Service Reference connected service after the failure, and fix up the nuget.config file generated on this folder, the folder path should look like the following:

%USERPROFILE%\AppData\Local\Temp\WCFConnectedService\2018_Apr_24_16_00_36\svcutil_starter

Edit the nuget.config to fix the location (directory) of the svcutil nuget package, it should look like the following after the fix:

<configuration>
  <packageSources>
    <add key="SvcUtilLocalFeed" value="<VSINSTALLDIR>\Common7\IDE\EXTENSIONS\MICROSOFT\WCF Connected Service\svcutil" />
  </packageSources>
</configuration>

Now from this directory restore the dotnet-svcutil NuGet package by running the following command:
>dotnet restore

Once you complete all these steps you should be able to run the WCF Web Service Reference wizard successfully.

Observe that this workaround is not a supported scenario so it should not be treated as a permanent solution.

I hope this helps,

@rvanmaanen
Copy link

I can conform that the workaround works, thanks! Do you have any idea when this will be fixed with a permanent solution?

@Wonovan
Copy link

Wonovan commented May 3, 2018

It worked for me.

@mlacouture
Copy link
Member

We are planning to provide a fix for this with the release of Visual Studio 2017 v15.8 Preview 2 which is currently scheduled for 05/30.

@mlacouture mlacouture modified the milestones: S134, S135 May 14, 2018
@ygeelen-tb
Copy link

@mlacouture we are experiencing the same issue. I can't use the fix above because the subdirectories "WCF Connected Service\svcutil" don't seem to exist within my "Program Files (x86)" path..
I installed the 64-bit version of .NET Core SDK 2.1.300 RC1. Do I need to install the 32-bit version instead?

@mlacouture
Copy link
Member

Hi @ygeelen-tb
If you can't locate the svcutil directory then something is wrong with your installation. What version of Visual Studio 2017 are you running? it must be 15.5 and over (you may be running an older version of VS with the deprecated version of the tool from the VS Marketplace).
hope this helps,

@ygeelen-tb
Copy link

Hi, I have the latest version installed being 15.7.1 and I don't see the extension installed and can't install it. I believe it's no longer an extension and baked into VS?

@mlacouture
Copy link
Member

@ygeelen-tb, I'm a bit confused, are you able to run the WCF connected service at all? it sounds like you aren't, in which case you may not have the workloads that install this tool (.NET desktop development, ASP.NET and web development, or .NET Core cross-platform development). This doesn't seem to be a problem with .NET Core 2.1. Can you confirm?
thanks,

@ygeelen-tb
Copy link

I have the same error screen as rvanmaanen in the comment above and have all those workloads installed. I'm using the Connected Services template for WCF on a .NET Core 2.1 RC1 ASP.NET Web API project.

@mlacouture
Copy link
Member

thanks @ygeelen-tb for clarifying. Since you are using the connected service it must be installed under the %VSINSTALLDIR%\Common7\IDE\Extensions... folder, where is your VSINSTALLDIR?

@ygeelen-tb
Copy link

@mlacouture Thanks a lot, I looked up the installation folder by looking at the file properties of Visual Studio shortcut and it seems to be installed in another folder than I expected: C:\Program Files\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\WCF Connected Service\svcutil\

I confirm now that the workaround works! So we also await Visual Studio 2017 v15.8 Preview 2.

@mlacouture
Copy link
Member

great, thanks @ygeelen-tb

@simeyla
Copy link

simeyla commented May 16, 2018

My folder for preview release was in a folder preview

C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\Extensions\Microsoft\WCF Connected Service

As @ygeelen-tb says - if in doubt get the file properties of the shortcut.

So for me the file NuGet.config looked like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="SvcUtilLocalFeed" value="C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\Extensions\Microsoft\WCF Connected Service\svcutil" />
  </packageSources>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="SvcUtilLocalFeed" value="C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\IDE\Extensions\Microsoft\WCF Connected Service\svcutil" />
  </packageSources>
</configuration>

and I ran dotnet restore from within C:\Users\Simon\AppData\Local\Temp\WCFConnectedService\2018_May_16_13_30_57\svcutil_starter

@mlacouture
Copy link
Member

Hi all!
Visual Studio 2017 v15.8 Preview 2 was released today, please try it out! thank you!

@AdamDotNet
Copy link

@mlacouture - In version 15.8 Preview 3, I get the following warnings when adding the connected service to https://webservices.netsuite.com/wsdl/v2014_2_0/netsuite.wsdl from within a netcoreapp2.1 project.

image

It seemed to have generated the code, but is there anything to be concerned about?

This warning does not occur when the project is netstandard2.0, however.

Thanks for working on this!

@mlacouture mlacouture changed the title Unable to add connected services in 2.1 Preview Unable to add connected services in 2.1 Preview (Error: Version for package dotnet-svcutil could not be resolved) Jul 5, 2018
@mlacouture
Copy link
Member

Hi @AdamDotNet!
No, this is not to be concerned about. Basically, the tool is letting you know that it won't be able to include types from these assemblies as candidates for using them for type reuse when generating the proxy code. By default all assembly references are selected so you don't have to pick individual assemblies. It is very unlikely these assemblies define types that can be used for representing your web service contract types.

BTW: In the future it would be great if you open a separate issue when asking about something that is not related to the current issue, this way other people can find the issue more easily and benefit from the discussion in it. Thank you!

@Bodokh
Copy link

Bodokh commented Aug 7, 2018

Hey @mlacouture ,
Just want to personally thank you for the temporary solution you offered here, and also just wanted to let you know that with the most recent version of vs 2017 and the most recent .net core this problem still persists and i had to use the your suggested workaround.

Thanks!

@mlacouture
Copy link
Member

Hi @Bodokh!
I'm glad the workaround helped you but I'm surprised you are still hitting this problem with the latest version of VS 2017, can you confirm you have Visual Studio 2017 v15.8 P2+ installed?

@Bodokh
Copy link

Bodokh commented Aug 8, 2018

Hey @mlacouture,
I'm using VS Professional version 15.7.6, I don't see any pending updates in the Notifications window.

@mlacouture
Copy link
Member

@Bodokh, thank you for checking the VS version, not sure why you don't see notifications, but you need at least Visual Studio 2017 v15.8 Preview 2 to get the fix.
thanks,

@Bodokh
Copy link

Bodokh commented Aug 9, 2018

@mlacouture Strange, my VS is up to date. Could it be that the update is only available for the community edition?

@jmcelreavey
Copy link

Hi, I also have the latest version of VS Professional which is stated as 15.7.6 and I am having the exact same issue. Thanks

@grsmvmsk
Copy link

I have this issue too. It worth noting, I am trying to consume non-WCF but SOAP web-service. I have not tried workaround from above messages. Is it actual at this moment?

Microsoft Visual Studio Community 2017
Version 15.8.1
VisualStudio.15.Release/15.8.1+28010.2003
Microsoft .NET Framework
Version 4.7.02558

@mlacouture
Copy link
Member

As mentioned before, you need Visual Studio 2017 v15.8 Preview 2 at least, v15.8 RTM is already out.

@johnnyjones09
Copy link

image

I've been unable to get it to work. I have the latest version installed as done an update already. Currently using Visual Studio 2017 v15.8 Preview 2. Any idea on how I would be able to add this service reference?

@avesse
Copy link

avesse commented Oct 24, 2018

Having this issue using the dotnet cli on MacOS.

@mlacouture
Copy link
Member

Hi @avesse
Based on the error message it seems you are adding the tool as a PackageReference to the project instead of a DotNetCliToolReference,. See the Getting Started page for details on how to setup the tool. If that's not the case, can you run the tool with the debug verbosity and provide the log file? you may want to restore nuget packages for the project first. thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling An issues related to any tool shipped from this repo.
Projects
None yet
Development

No branches or pull requests