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 resolve 'dotnet-svcutil (>= 0.5.10306-preview)' for '.NETCoreApp,Version=v1.1' #1813

Closed
hongdai opened this issue Mar 21, 2017 · 26 comments
Assignees
Labels
tooling An issues related to any tool shipped from this repo.
Milestone

Comments

@hongdai
Copy link
Contributor

hongdai commented Mar 21, 2017

Scaffolding Code ...
Error:Error: Restoring packages for C:\Users\Administrator\AppData\Local\Temp\WCFConnectedService\2017_Mar_17_20_34_33\svcutil_bootstrap\project.csproj...
Restoring packages for C:\Projects\WorkSpace\Nic\Server API\ServerAPI\ServerAPI\ServerAPI.csproj...
Restoring packages for C:\Projects\WorkSpace\Nic\Server API\ServerAPI\ViewModelCore\ViewModelCore.csproj...
Restoring packages for C:\Projects\WorkSpace\Nic\Server API\ServerAPI\DbModelCoew\ModelCore.csproj...
Lock file has not changed. Skipping lock file write. Path: C:\Projects\WorkSpace\Nic\Server API\ServerAPI\ViewModelCore\obj\project.assets.json
Restore completed in 871.15 ms for C:\Projects\WorkSpace\Nic\Server API\ServerAPI\ViewModelCore\ViewModelCore.csproj.
Lock file has not changed. Skipping lock file write. Path: C:\Projects\WorkSpace\Nic\Server API\ServerAPI\DbModelCoew\obj\project.assets.json
Restore completed in 1.25 sec for C:\Projects\WorkSpace\Nic\Server API\ServerAPI\DbModelCoew\ModelCore.csproj.
C:\Program Files\dotnet\sdk\1.0.0\NuGet.targets(97,5): error : Unable to resolve 'dotnet-svcutil (>= 0.5.10306-preview)' for '.NETCoreApp,Version=v1.1'. [C:\Users\Administrator\AppData\Local\Temp\WCFConnectedService\2017_Mar_17_20_34_33\svcutil_bootstrap\project.csproj]
Lock file has not changed. Skipping lock file write. Path: C:\Projects\WorkSpace\Nic\Server API\ServerAPI\ServerAPI\obj\project.assets.json
Restore completed in 3 sec for C:\Projects\WorkSpace\Nic\Server API\ServerAPI\ServerAPI\ServerAPI.csproj.
Generating MSBuild file C:\Users\Administrator\AppData\Local\Temp\WCFConnectedService\2017_Mar_17_20_34_33\svcutil_bootstrap\obj\project.csproj.nuget.g.props.
Generating MSBuild file C:\Users\Administrator\AppData\Local\Temp\WCFConnectedService\2017_Mar_17_20_34_33\svcutil_bootstrap\obj\project.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Users\Administrator\AppData\Local\Temp\WCFConnectedService\2017_Mar_17_20_34_33\svcutil_bootstrap\obj\

@zhenlan
Copy link
Member

zhenlan commented Mar 21, 2017

Same issue to #1807?

@hongdai
Copy link
Contributor Author

hongdai commented Mar 21, 2017

This issue is reported by a different customer(Sinoheh Enayati) on the download page. It could be same issue. Waiting for Sinoheh confirmation to see if it needs further investigation.

@gregp55305
Copy link

I just received this same error.

[3/21/2017 6:41:30.073 AM] Adding WCF Service - Preview to the project.
[3/21/2017 6:41:30.088 AM] Scaffolding Code ...
[3/21/2017 6:41:37.652 AM] Error:Error: Restoring packages for C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\project.csproj...
Restoring packages for C:\Dev\Test Projects\aspnetcorewcf\aspnetcorewcf\aspnetcorewcf.csproj...
Lock file has not changed. Skipping lock file write. Path: C:\Dev\Test Projects\aspnetcorewcf\aspnetcorewcf\obj\project.assets.json
Restore completed in 1.41 sec for C:\Dev\Test Projects\aspnetcorewcf\aspnetcorewcf\aspnetcorewcf.csproj.
C:\Program Files\dotnet\sdk\1.0.1\NuGet.targets(97,5): error : Unable to resolve 'dotnet-svcutil (>= 0.5.10306-preview)' for '.NETCoreApp,Version=v1.1'. [C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\project.csproj]
Generating MSBuild file C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\obj\project.csproj.nuget.g.props.
Generating MSBuild file C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\obj\project.csproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\obj\project.assets.json
Restore failed in 2.74 sec for C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\project.csproj.

Errors in C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\project.csproj
Unable to resolve 'dotnet-svcutil (>= 0.5.10306-preview)' for '.NETCoreApp,Version=v1.1'.

NuGet Config files used:
C:\Users\pennerg\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\NuGet.Config

Feeds used:
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages
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.
[3/21/2017 6:41:37.824 AM] Failed adding WCF Service - Preview to the project.

I am using Visual Studio 2017 Enterprise on Windows 7

@hongdai
Copy link
Contributor Author

hongdai commented Mar 21, 2017

@gregp55305 Could you check the below Nuget.Config file to see if package resource 'local' is disabled machine wise?

c:\Users\pennerg\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config

If so, you can workaround the issue by rename the disabled 'local' package source.

Please let me know if it helps,
Thanks,
Hong

@gregp55305
Copy link

I don't see a package source called 'local' in either of those config files. Here are the contents of both of those config files:

NuGet.Config:

Microsoft.VisualStudio.Offline.Config:

@gregp55305
Copy link

Hmm the contents of the config files didn't paste...

NuGet.Config:

<?xml version="1.0" encoding="utf-8"?> <configuration> <activePackageSource> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> </activePackageSource> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="IHC Package Source" value="http://ihcphxdevweb01.iac.com/ihcnuget/nuget" /> </packageSources> <packageRestore> <add key="enabled" value="True" /> <add key="automatic" value="True" /> </packageRestore> <bindingRedirects> <add key="skip" value="False" /> </bindingRedirects> <disabledPackageSources /> </configuration>

Microsoft.VisualStudio.Offline.Config:

<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\"/> </packageSources> </configuration>

Sorry for the formatting...

@zhenlan zhenlan added the tooling An issues related to any tool shipped from this repo. label Mar 21, 2017
@zhenlan zhenlan added this to the S115 milestone Mar 21, 2017
@hongdai
Copy link
Contributor Author

hongdai commented Mar 21, 2017

@gregp55305 in the C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\NuGet.Config, could you check if dotnet-svcutil.0.5.10306-preview.nupkg exists in the 'local' package source path?

@hongdai
Copy link
Contributor Author

hongdai commented Mar 21, 2017

@gregp55305 I noticed that you global Nuget config file specify only one active package resource. This might cause package not found problem according to http://docs.myget.org/docs/how-to/nuget-configuration-inheritance.

Could you change it to below:

 <activePackageSource>
    <add key="All" value="(Aggregate source)" />
  </activePackageSource>

Thanks,
Hong

@gregp55305
Copy link

I'll check that when I get back to work tomorrow. Would it be possible for you to post an example of a global Nuget config file or does that not make sense?

@hongdai
Copy link
Contributor Author

hongdai commented Mar 21, 2017

This is what on my machine. Be aware of that I do not use activePackageSource.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <packageRestore>
    <add key="enabled" value="True" />
    <add key="automatic" value="True" />
  </packageRestore>
  <bindingRedirects>
    <add key="skip" value="False" />
  </bindingRedirects>
  <packageManagement>
    <add key="format" value="0" />
    <add key="disabled" value="False" />
  </packageManagement>
</configuration>

@gregp55305
Copy link

You have referred to a 'local' package source a couple of times, what exactly does that mean?

@hongdai
Copy link
Contributor Author

hongdai commented Mar 22, 2017

@gregp55305 We uses this name in our bootstrap tool, you can see an example in C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap\NuGet.Config

@gregp55305
Copy link

I updated the activePackageSource value to what you suggested and then closed out of all instances of Visual Studio. I also located the nuget.config file with the 'local' reference and confirmed the path for the packageSource in that file does exist. Then restarted VS 2017, but the end result was the same when trying to generate connected wcf service.

@hongdai
Copy link
Contributor Author

hongdai commented Mar 22, 2017

@gregp55305 I'm sorry to hear that you are still hitting the issue.
To further diagnose, Could you:

  1. go to folder C:\Users\pennerg\AppData\Local\Temp\WCFConnectedService\2017_Mar_21_06_41_30\svcutil_bootstrap
  1. Rename 'Local' in the NeGet.Config to a Guid(to make sure it's unique across your machine).
  2. The run the command:
    dotnet restore

Let me know if step 3) succeeded for you.

Thanks,
Hong

@gregp55305
Copy link

step 3 did succeed. I assume that you wanted me to run dotnet restore from the project root directory.

@gregp55305
Copy link

Or did I need to run that from the svcutil_bootstrap directory?

@gregp55305
Copy link

I ran 'dotnet restore' from the svcutil_bootstrap directory. That failed. The message is familiar. "Unable to resolve 'dotnet-svcutil ()= 0.5.10306-preview' for '.NETCoreApp,Version=v1.1

@hongdai
Copy link
Contributor Author

hongdai commented Mar 22, 2017

This looks like a nuget problem. There is one more thing you can try.

  1. Go to the svcutil_bootstrap.
  2. dotnet add package dotnet-svcutil -v 0.5.10306-preview -s "the path to where the package located"
  3. If 2) succeed, it will cache the package in your local nuget package cache, the issue should be gone.

@gregp55305
Copy link

Progress, but no success: Received another error:

`[3/22/2017 1:47:35.233 PM] Adding WCF Service - Preview to the project.
[3/22/2017 1:47:35.242 PM] Scaffolding Code ...
[3/22/2017 1:48:03.091 PM] Error:Warning: Cannot import wsdl:binding
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Channels.StandardBindingImporter
Error: The method or operation is not implemented.
XPath to Error Source: //wsdl:definitions[@targetNamespace='CustomerProfile.AgentService.AgentService']/wsdl:binding[@name='BasicHttpBinding_IAgentService']
Warning: Cannot import wsdl:port
Detail:
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='AgentService']/wsdl:port[@name='BasicHttpBinding_IAgentService']
Error: No endpoints compatible with .Net Core apps were found.

Failed to generate service reference.
[3/22/2017 1:48:03.140 PM] Failed adding WCF Service - Preview to the project.`

@hongdai
Copy link
Contributor Author

hongdai commented Mar 22, 2017

Great to hear it work around the Nuget issue!

For the new issue you hit, it looks like your service requires a feature .dotnet core does not support yet, such as message security. See a similar issue in #1354

@gregp55305
Copy link

The service does require credentials to be supplied, is that what you mean?

@hongdai
Copy link
Contributor Author

hongdai commented Mar 22, 2017

Yes. The tool does not support generating authenticated client yet.

@gregp55305
Copy link

So, can you explain what the nuget issue was? I am running the latest version of that.

@hongdai
Copy link
Contributor Author

hongdai commented Mar 23, 2017

I don't actually know exactly what the nugget issue was. It has to do with how nuget resolve paths in nuget configuration inheritance. It seems dotnet add package -s command does not use the nuget config file to resolve package sources That's why it can workaround the issue.

@hongdai
Copy link
Contributor Author

hongdai commented Mar 27, 2017

We have a workaround for the original customer issue.

@hongdai hongdai closed this as completed Mar 27, 2017
@Oosterbosch
Copy link

Dear, is it possible to provide us more information about the workaround, having the same issue here.

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

4 participants