Error when installing NUnit 3.9 in Visual Studio 13 with NuGet - selenium

I am trying to install NUnit 3.9 in Visual Studio 13 Professional, but I am facing the below mentioned error while installing:
'NUnit' already has a dependency defined for 'NETStandard.Library'.
How do I solve this issue?

This error is often caused by the fact that your version of NuGet is too old. Try updating NuGet.
NUnit's most recent NuGet packages include .NET Standard builds, which mean NuGet client version 2.12 or later is required. From the next version of NUnit, you'll get a more helpful error message for this.

If you cannot upgrade Visual Studio to a newer version that includes newer versions of NuGet, you can install NUnit 3.5.0 which doesn't include .NET Standard. You can select the older versions from a dropdown in the user interface, or install from the Package Manager Console.
Install-Package NUnit -Version 3.5.0

Related

The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found

I tried to upgrade my web app from .net core 2.0 to .net core 2.1
I did:
1) Install Visual Studio Professional 2017 Preview Version 15.8.0 Preview 1.1
2) Installed the .net core 2.1.3 RC1 SDK from here: https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-rc1
3) Updated all of my aspnetcore nuget packages to the latest version.
After doing both of these things, when I start my project I get this screen:
HTTP Error 502.5 - Process Failure Common causes of this issue:
The application process failed to start
The application process started but then stopped
The application process started but failed to listen on the configured port
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit:
https://go.microsoft.com/fwlink/?LinkID=808681
and in my Output window from ASP.NET Core Web Server, I get this:
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
- The following versions are installed:
2.1.0-preview2-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2.1.0-rc1-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\dotnet\
- Installing .NET Core prerequisites might help resolve this problem:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
- The following versions are installed:
2.1.0-preview2-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
2.1.0-rc1-final at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
.NET Core 2.1 SDK will be released this week. If you can't wait until then, add this to your *.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RestoreAdditionalProjectSources>
https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/20180515-07/final/index.json
</RestoreAdditionalProjectSources>
</PropertyGroup>
....
</Project>
And download the final SDK from: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/2.1.300/dotnet-sdk-2.1.300-win-x64.exe
For more details visit: https://github.com/aspnet/Home/wiki/2.1.0-Early-Access-Downloads
By updating all NuGet packages, you seem to have upgraded from the RC version you started out with (which is installed on your system) to the RTM version currently being released (and thus already available on NuGet but not installed on your system).
The Microsoft.AspNetCore.App NuGet packages are supposed to be referenced without a version so that the installed tooling can pick an appropriate version.
Update your .csproj file to remove the Version attribute and only reference that package through:
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
.NET Core SDK 2.1.300 is now available: https://www.microsoft.com/net/download/windows Install it, this fixed the problem for me.
Looks like it's available on chocolatey now https://chocolatey.org/packages/dotnetcore-sdk/2.1.300
Not yet on the normal dotnet distribution sites. Crazy.
uninstall previous version
Download and install version 2.1 sdk
After the whole process reboot your PC
It should work.
I opened the Visual Studio installer, went to Individual Components, selected .NET Core 2.1 Runtime (LTS), and installed it.
Solved my problem.

'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.

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.

Wrong EntityFramework version is being installed

From the Package Manager Console I do this:
Install-Package EntityFramework -Version 5.0.0
And then I right-click on the Reference and I see it is version 4.4.0.0. Doing an uninstall and then installing doesn't help.
This happens for 1 project in the solution, in another project it installs the correct version.
Turns out that the problem was the Project was .NET 4.0, once I upgraded it to 4.5 it installs the correct version.

nuget get different versions swicth

I am trying to nuget the new 3.0 binaries for NServiceBus but they don't seem to be available in package manager.
Is there a switch to force nuget to get the latest available version?
The 3.0 line is in pre-release at the moment, so you'll have to do:
PM> Install-Package NServiceBus -Pre
At the time of this answer, it will install RC5.
The switch -Pre is short for -PreRelease, which will install a pre-release version if it's more recent than the latest stable. If a stable version is more recent, it will install the stable. See this NServiceBus page on nuget. For details on prerelease on nuget, see the versioning page.
You can also try the continuous integration (CI) package:
PM> Install-Package NServiceBus-CI