Visual Studio 2017 .net core project give Restoring NuGet packages for bootstrapper error when adding wcf endpoint - wcf

With Visual Studio 2017 preview (latest version of VS 2017 Professional), in ASP.Net Core 2.0 project, I am trying to add a WCF service via Connected Services, and it gives the below error.
My teammate has the same project and it works on his computer but gives the below error on my pc. I cleaned the project, rebuild but the error is not fixed. What should I do? Is that error about WCF, or NuGet? I deleted and reinstalled NuGet but the error still occurs.
Importing web service metadata ... Number of service endpoints found:
1 Restoring NuGet packages ... Building solution ... Scaffolding
service reference code ... Restoring NuGet packages for bootstrapper
... Error:Error: Restoring packages for
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj...
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: warning NU1603: dotnet-svcutil 1.0.0-preview-11010-660 depends on
System.Collections.Specialized (>= 4.0.1) but
System.Collections.Specialized 4.0.1 was not found. An approximate
best match of System.Collections.Specialized 4.3.0 was resolved.
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: warning NU1603: dotnet-svcutil 1.0.0-preview-11010-660 depends on
System.ComponentModel.TypeConverter (>= 4.1.0) but
System.ComponentModel.TypeConverter 4.1.0 was not found. An
approximate best match of System.ComponentModel.TypeConverter 4.3.0
was resolved.
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: warning NU1603: dotnet-svcutil 1.0.0-preview-11010-660 depends on
System.Linq.Expressions (>= 4.1.1) but System.Linq.Expressions 4.1.1
was not found. An approximate best match of System.Linq.Expressions
4.3.0 was resolved. C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: error NU1102: Unable to find package
System.ComponentModel.EventBasedAsync with version (>= 4.0.11)
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: error NU1102: - Found 1 version(s) in Microsoft Visual Studio
Offline Packages [ Nearest version: 4.0.10 ]
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: error NU1102: - Found 0 version(s) in SvcUtilLocalFeed
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: error NU1101: Unable to find package System.Data.Common. No packages
exist with this id in source(s): Microsoft Visual Studio Offline
Packages, SvcUtilLocalFeed
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: error NU1101: Unable to find package System.Net.WebSockets. No
packages exist with this id in source(s): Microsoft Visual Studio
Offline Packages, SvcUtilLocalFeed
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: error NU1101: Unable to find package System.Net.WebSockets.Client.
No packages exist with this id in source(s): Microsoft Visual Studio
Offline Packages, SvcUtilLocalFeed
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: error NU1101: Unable to find package System.Private.ServiceModel. No
packages exist with this id in source(s): Microsoft Visual Studio
Offline Packages, SvcUtilLocalFeed
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj
: error NU1101: Unable to find package System.ServiceModel.Primitives.
No packages exist with this id in source(s): Microsoft Visual Studio
Offline Packages, SvcUtilLocalFeed Generating MSBuild file
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\obj\SvcUtilBootstrapper.csproj.nuget.g.props. Generating MSBuild file
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\obj\SvcUtilBootstrapper.csproj.nuget.g.targets.
Restore failed in 3,32 sec for
C:\Users\MSefer\AppData\Local\Temp\WCFConnectedService\2017_Nov_13_19_03_33\svcutil_bootstrap\SvcUtilBootstrapper.csproj.
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. Error:An unknown
error occurred while invoking the service metadata component. Failed
to generate service reference.

I change package source(tools->nuget package manager->manage nuget package
...) with nuget.org instead of visual studio package and it works
via:
http://yazilimsozluk.com/visual-studio-2017-net-core-projesine-wcf-eklemede-restoring-nuget-packages-for-bootstrapper-errorerror-restoring-packages-hatasi

Related

'MySql.Data' already has a dependency defined for 'System.Text.Encoding.CodePages' [duplicate]

I'm trying to add AutoMapper as a dependency to a project using NuGet on Visual Studio Premium 2012, but it fails.
It says:
Operation failed
'AutoMapper' already has a dependency defined for
'Microsoft.CSharp'.
I'm able to add other dependencies.
I'm using the last version of the package manager for VS 2012:
NuGet Package Manager 2.8.60318.667
Any ideas what should I check?
The problem is that your NuGet Package Manager is too old. You need NuGet 2.12 since this supports the newer .NETStandard frameworks that the AutoMapper 5.0.1 NuGet package is using.
The AutoMapper has a group dependency which specifies a target framework of .NETStandard. Since your version of NuGet Package Manager is too old it does not recognise this target framework and converts it to an Unknown target framework and you end up with duplicate frameworks since there .NETStandard is used a few times in that NuGet package. This causes the error:
'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'
Unfortunately NuGet 2.12 is not available for Visual Studio 2012 but is available for Visual Studio 2013.
So either you need to update to Visual Studio 2013 or above, or you will have to use the older AutoMapper NuGet package which does not support .NETStandard.
Seems to be a problem with the current version of automapper:
AutoMapper 5.0.0 Tuesday, June 28, 2016
I tried with the previous version and it works:
PM> Install-Package AutoMapper -Verbose
Install-Package : 'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'.
At line:1 char:16
+ Install-Package <<<< AutoMapper -Verbose
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM> Install-Package AutoMapper -Version 4.2.1
Installing 'AutoMapper 4.2.1'.
Successfully installed 'AutoMapper 4.2.1'.
So, if you can't update NuGet Package Manager, the answer is:
PM> Install-Package AutoMapper -Version 4.2.1
I ended up needing to update NuGet.exe that was included in the solution to be able to build NuGet packages by running:
nuget.exe update -self
I had the same issue on VS2013. I had to update to VS2013 Update 5 and get the latest nuget distro for VS2013 at
https://dist.nuget.org/visualstudio-2013-vsix/v2.12.0/NuGet.Tools.vsix
Once that was done, I rebooted Visual Studio. After that I was able to use the Automapper 5.0.2 package
Go to Visual Studio > Tools > Extension and Updates
Find Updates in left accordion menu, Go to Visual Studio Gallery.
You will find a update for Nuget.
Update the nuget package and try installing or builing the project.
Thanks,
GT
An other workaround if you're stuck with VS2012 and the old Nuget version:
Find the Cache folder of VS 2012's Nuget Package Manager (with Tools - Options - Nuget Package Manager)
Open AutoMapper.5.x.x.nupkg with your favorite Zip Tool
Modify the file AutoMapper.nuspec - I simply deleted all dependencies except .NETFramework4.5
Add the cache folder as a Nuget source (also in Tools - Options - Nuget Package Manager)
Install Automapper either with the console or the GUI but make sure to choose first the newly added cache folder as package source.
Of course, the next version of Automapper probably needs to be adapted, too, in order to install it.
This looks like a mismatch between the .NET version used by the Automapper package and your project. Can you confirm the .NET version that your project is using?
Automapper 6.0.2 - nuget 2.8.8 gives this error. Needed to update to 3.4.4 to get this working.
Removed both CSharp and AutoMapper. Installed CSharp (4.0.0.0) first and then added Automapper (6.1.1.0). This resolved the problem for me.
I observed this exact problem when opening a project with Visual Studio 2010.
After opening with VS2017, I was able to install AutoMapper without any error.

Nuget Package cannot be installed in NET Core v1.1 Project

Trying to build a project with a reference to a package that should be compatible with .net core 1.1 but when nuget is restoring packages (VS.NET 2017 or the command line) I an see an error message
"One or more of the packages are incompatible with netcoreapp1.1"
The package name is
Microsoft.AspNetCore.DataProtection.AzureStorage
It says it is compatible with .NET Standard v1.5
And the error relates to dependencies of the package:
Microsoft.Data.Edm
Microsoft.Data.Services.Client
Microsoft.Data.OData
Microsoft.Data.Spatial
The csproj file has a package fallback setting:
<PackageTargetFallback>
$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;
</PackageTargetFallback>
Not sure what the problem is
thanks
Michael

Unable to install MySql.Data.EntityFrameworkCore into .NET Core App

When trying to install the 'MySql.Data.EntityFrameworkCore' package, I get the following error:
Microsoft (R) Build Engine version 15.1.548.43366 Copyright (C)
Microsoft Corporation. All rights reserved.
Writing /tmp/tmpiXrULm.tmp info : Adding PackageReference for
package 'MySql.Data.EntityFrameworkCore' into project
'/media/xxx/xxx.csproj'. log
: Restoring packages for
/media/xxx/xxx.csproj...
info : CACHE
https://api.nuget.org/v3-flatcontainer/mysql.data.entityframeworkcore/index.json
error: Unable to resolve 'MySql.Data.EntityFrameworkCore' for
'.NETCoreApp,Version=v1.1'.
error: Package
'MySql.Data.EntityFrameworkCore' is incompatible with 'all' frameworks
in project
'/media/xxx/xxx.csproj'.
I'm targeting Asp.NetCore 1.1.1
Is this the correct MySql EF package for .NET core?
Install given nuget package using package manager console:
Install-Package MySql.Data.EntityFrameworkCore -Version 8.0.9-dmr
OR
Using .NET CLI:
dotnet add package MySql.Data.EntityFrameworkCore --version 8.0.9-dmr
Then add this to .csproj file and restore your project:
<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.8-dmr" />

Why is package restore failing when I upgrade to ASP.NET Core 1.0.1?

I am attempting to install ASP.NET Core 1.0.1 on my windows 7 dev box which already has ASP.NET Core 1.0 working in Visual Studio Community 2015 Update 3.
To accomplish this I installed .NET Core 1.0.1 - VS 2015 Tooling Preview 2 from https://www.microsoft.com/net/core#windows as indicated by https://blogs.msdn.microsoft.com/dotnet/2016/09/13/announcing-september-2016-updates-for-net-core-1-0/
I then updated several version numbers in my existing project.json file from 1.0.0 to 1.0.1 so that my web application would use the new 1.0.1 components.
As expected this triggers a package restore, but unfortunately it fails. I can't figure out why the packages restore is failing. Any help would be greatly appreciated.
Here are the errors from the output window:
Errors in C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\wwwGiftOasisResponsive.xproj
Unable to resolve 'Microsoft.AspNetCore.Server.IISIntegration (>= 1.0.1)' for '.NETFramework,Version=v4.5.2'.
PATH=.\node_modules.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\git
C:\Program Files\dotnet\dotnet.exe restore "C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive.vs\restore.dg"
log : Restoring packages for C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\project.json...
error: Unable to resolve 'Microsoft.AspNetCore.Server.IISIntegration (>= 1.0.1)' for '.NETFramework,Version=v4.5.2'.
log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\project.json...
log : Writing lock file to disk. Path: C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\project.lock.json
log : C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\wwwGiftOasisResponsive.xproj
log : Restore failed in 2895ms.
Errors in C:\Users\Ron Clabo\Documents\Visual Studio 2015\Projects\wwwGiftOasisResponsive\src\wwwGiftOasisResponsive\wwwGiftOasisResponsive.xproj
Unable to resolve 'Microsoft.AspNetCore.Server.IISIntegration (>= 1.0.1)' for '.NETFramework,Version=v4.5.2'.
My understanding is that the upgrade from ASP.NET Core 1.0 to 1.0.1 is suppose to be pretty easy so I must be missing something simple but after hours of looking I could really use some advice.
You didn't read the upgrade instructions (and here) correctly.
This is not a global version bump. Only the listed packages were upgraded to 1.0.1. All remaining ASP.NET Core packages stay at 1.0.0, this includes Microsoft.AspNetCore.Server.IISIntegration.
The affected packages are:
Microsoft.EntityFrameworkCore
Microsoft.AspNetCore.Server.Kestrel
Microsoft.AspNetCore.Mvc
Microsoft.AspNetCore.Antiforgery
Microsoft.AspNetCore.Routing
Not every package got version bumped to 1.0.1. There is no 1.0.1 version of IIS Integration on nuget. That component should be left at 1.0.0 in your project.json.

entity framework 5 install on win8 MSVC2012 RTM

I have recently installed the Latest Win8 OS (RTM) and installed MSVC 2012 RTM as well (I also have MSVC 2010 installed as I am porting from Win7 Phone to Win 8 Tablet and need to refer to the old code (not sure if this may affect outcome)). I need to install Entity Framework in MSVC 2012 and when I look at the NuGet Package Manager it tells me version 5.0.0. is available. However it never installs correctly, it says it has installed successfully then, says it can't and uninstalls it. I have tried using the NuGet Package Manager and the PM console, the results from the PM console are below :
PM> Install-Package EntityFramework
You are downloading EntityFramework from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkId=253898&clcid=0x409. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'EntityFramework 5.0.0'.
Successfully uninstalled 'EntityFramework 5.0.0'.
Install failed. Rolling back...
Install-Package : Could not install package 'EntityFramework 5.0.0'. You are trying to install this package into a project that targets '.NETCore,Version=v4.5', but
the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package EntityFramework
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
When I look at the packages folder during the install it all seems present and then it is deleted. I have admin rights set on my user Account.
What is going wrong? pls help.
Brenda
You are adding EntityFramework package to Windows 8 Application or class library project (= to Metro application). That is not supported. You must use full .NET Framework 4.5 (= desktop application, web application, etc.) to use Entity Framework.
I had this problem. This is what I did:
From the package manager console:
PM> Uninstall-Package EntityFramework -Force
This threw an error. I then went to the "packages" folder under the solution folder and removed the Entity Framework subfolder. I then ran
PM> Install-Package EntityFramework
And then right-clicked my project where I wanted to install EF and installed it from the NuGet dialog.