Can't Install Entity Framework via NuGet - visual-studio

I am in a new ASP.NET MVC 4 project and I want to make use of Entity Framework v5.
So I opened up my package installer console in Visual Studio 2013 RC and I typed in the following:
Install-Package EntityFramework -Version 5.0.0
But I get an error! Here is what I get:
What can be causing this? I'm confused.

The message says that you can't upgrade EF6 to EF5. This tells you that EF6 is already installed. The only way to downgrade to EF5 is to remove EF6 first and then install the EF5 NuGet package.
The easiest way to remove a Nuget package is through the Visual Studio menu, Tools > Library Package Manager > Manage NuGet Packages for Solution...

Open the VS 2013
Go to TOOLS=>NuGet Package Manager=>Package Manage Console.
Copy and paste the below code and enter
PM>Install-Package EntityFramework

Right click the project you want to install EF v5 in, and click on Manage NuGet Packages. Search for "Entity Framework" and select it to install it. This simply another way to install NuGet packages but it could possibly work as opposed to typing it into the console.
Also, if this doesn't help, try it again after launching Visual Studio in Administrator mode.

Related

VS 2017 - NuGet Manager does not add reference

I´m trying to add System.Management.Automation to my project.
My project uses the .Net framework 4.5.
In my last project, I was able to add this reference easily by the NuGet manager console where I just had to type "Install Package" + the package name.
This time I tried the same but without any success.
I also already tried the following steps but still no success:
Reinstall the package by "Update-Package"
Delete the NuGet package so VS will reinstall it
Clear Nuget Manager Cache
Change the .Net framework
Clear project
I don´t have any other options left so hopefully someone of you can help me.

Even with Nuget.exe 4.1.0 - Serilog already has a dependency defined for 'Microsoft.CSharp'

I know there's an answer for this question from 2016 but it's not working today. I have VS2013 with the latest CU installed.
My Nuget package source settings:
I want to install the nu-get package "Serilog.Sinks.MSSqlServer". First, I ensure nuget is up to date by navigating to the ".nuget" folder of the solution's folder and running "nuget update -self":
Unfortunately, I still get the error when trying to add the package:
If I try to update nuget from the "Extensions and Updates" page of VS then I get a 403 error as shown below:
The 403 does suggest a proxy issue but other packages can be installed to the same dev box ok. I just installed "Apache log4net" from the Manage NuGet Packages window - no problem
Any ideas of a work-around for this please?
This might be related to the fact that you now (with the new NuGet CLI tool version) need to use the new NuGet API.
from nuget.org
NuGet feed v3 (VS 2015 and later / NuGet v3.x and above): https://api.nuget.org/v3/index.json
NuGet feed v2 (VS 2013 and earlier / NuGet 2.x): https://www.nuget.org/api/v2
You can check (and edit) your NuGet Package Sources under Tools, Options, NuGet Package Manager, Package Sources.
#Rob Bowman, in response to your comment and looking at the screenshot of your Available package sources, try edit your default nuget.org to https://api.nuget.org/v3/index.json or add a new source and make sure they're both enabled. Maybe that'll do the trick.
Update: maybe manually updating the NuGet Package Manager (since updating it through Extensions and Updates is not working) solves the problem. NuGet Package Manager for Visual Studio 2013.
Going to Visual Studio menu Help, About should display the currently installed version of this extension (and others).
To fix this I had to:
logon to a PC not connected to the corporate proxy
download the latest version of the nuget package manager (VSIX) for VS2013 from https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManagerforVisualStudio2013
copy the VSIX to my corporate dev VM and install

Getting alert of telerik ui for asp.net mvc requires nuget package manager 2.8 or later

For Visual studio 2013, when I try to create a new project, I get this alert message "Telerik UI for ASP.Net requires NuGet Package Manager 2.8.50126.400 or later".
I am not understanding what it is trying to say and unable to create my project and start my work.
In the menu bar in Visual Studio, I have one menu option named "TELERIK", may be it is related to that but not getting the exact solution to this. Please suggest.
You need to update the NuGet package manager that is installed inside your Visual Studio. You can download the latest version for VS 2013 from here https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManagerforVisualStudio2013 or you can go Tools > Extensions and Updates and update it from there.

Install nuget package in a new project in solution, where package is already used for existing projects

I have a solution, where I use Nuget for managing my packages.
Using Nuget, I have installed ie. entity framework in X projects in a solution. After, I have added a new project, and I want to install the entity framework in my new project.
However, when I open the nuget package manager, I cannot click install on existing packages I use. So how do I install the entity framework in my new projects?
Easiest way would be to use Package Manager Console. Just select your project from the dropdown and run this command:
Install-Package EntityFramework
You can also use Manage NuGet Packages for Solution dialog, maybe that won't show those packages as installed.

How to manually uninstall a Visual Studio 2010 extension?

So I got prompted to download the latest NuGet Package Manager in VS2010.
All previous updates (including this) has failed with:
VSIXInstaller.SignatureMismatchException: The installed version of 'NuGet Package Manager' is signed, but the update version has an invalid signature. Therefore, Extension Manager cannot install the update.
Which, in itself has been going on for some time now, and they still haven't fixed it (look in Q&A).
Ok, fine, previously I could simply uninstall the NuGet extension and install the latest. However, this time, both the Disable and Uninstall buttons are disabled.
So I can't uninstall and I can't upgrade.
Catch22.
How can I manually remove the NuGet extension from Visual Studio?
What files/folders/reg entries do I have to kill to get rid of NuGet?
To uninstall NuGet, you must first run Visual Studio as Administrator, then you will see the Uninstall option available.
Restart VS, but this time run it as your normal account. When you install NuGet going forward, you should be able to update to future versions without running as Administrator.
I believe this issue occurs due to NuGet being installed with MVC 3. I hope in the future we no longer bundle NuGet with other software.
Maybe this is fixed now. There is a very new release.
http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c/
http://docs.nuget.org/docs/reference/known-issues#Upgrading_to_latest_NuGet_from_an_older_version_causes_a_signature_verification_error.
When viewing the logs, you might see a mention of a SignatureMismatchException.
To prevent this from occurring, there is a Visual Studio 2010 SP1 hotfix you can install. Alternatively, the workaround is to simply uninstall NuGet and then install it from the VS Extension Gallery. See http://support.microsoft.com/kb/2581019 for more information.
If you want to delete/uninstall Nuget package which is applied to multiple projects in your solutions then go to:
Tools-> Nuget Package Manager -> Manage Nuget Packages for Solution
In the left column where is 'Installed packages' select 'All', so you'll
see a list of installed packages and Manage button across them.
Select Manage button and you'll get a pop out, deselect the checkbox across project name and Ok it
The rest of the work Package Manager will do it for you.

Resources