System.Data.Sqlite + EF6 - entity-framework-6

I am trying to get the System.Data.Sqlite (1.0.92.0) work with EF6 (6.0.2) but i cannot get this working. I installed designer components for VS2013 and installed latest nuget packages of the Sqlite which also contains System.Data.Sqlite.EF6.dll assembly. I even tried adding EntityFramework assemblies to GAC. But nothing worked, I always end up with the following dialog in VS2013.
Please help me to fix this.
Thanks

Related

model does not exist in the current context in view after opening project in visual studio 2017

My project was working in visual studio 2012 MVC4 i opened it in visual studio 2017 and i see under URL,model,View Bag,im getting error stating model does not exist,Url does not exist in the current context,
i dont know what im missing something which i have to add when i want to open project in visual studio 2017,in webconfig my mvc version :
System.Web.Mvc, Version=3.0.0.0
i changed it to 4 also but still the same errors,what could be the cause?am i missing a reference?
Are you able to run the project, even though it's giving you errors? I had the same issue when I started using VS2017 with an older project. For some reason, it could not resolve the dependencies and restore packages was not working. However, I am now on VS2017 15.8.6, and a simple "Rebuild Solution" did the trick. Failing that, you can try some of the suggestions mentioned here. Good luck, I hope it helps!

Cannot install RavenDb.Database 3.0.30000 via Nuget v3.2 in Visual Studio 2015 Community

I want to try out NoSql Database, and based on some articles RavenDb is highly recommended for .Net. Now I cant even start because I cant install RavenDb.Database (v3.0.30000) on my Web project. Im not sure if the issue is in Nuget.
Im using the below tools if it matters.
.Net 4.5.2
ASP MVC 5 (empty template/no package added yet)
Visual Studio 2015
Yes, this is a nuget issue.
can you try this using the command line client?
Alternatively, just download the ravendb zip from our site
https://www.nuget.org/packages/RavenDB.Client/3.0.30000
find your version and download it from the menu on the left, hope this will be fixed

Entity Framework power tools pre generating view - error

I am using entity framework power tools 4 (beta). My project uses asp.net identity and EF 6.1.2. I have updated all the entity framework dlls via nuget. When I attempt to pre generate a view with EF Powertools for my dbcontext i receive the error :
Could not load type 'System.ComponentModel.DataAnnotations.Schema.IndexAttribute' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
I have updated my EF to 6.1.2 so it is the latest.
Has anyone else experienced this issue and solved it. I've seen people on the EF Powertools site posting similar issues to this but there's no solution I can find.
Thanks
UPDATE : - I have reinstalled all the packages with no luck. I have even gone as far as giving the solution to someone else to install on their pc - and they can run it and generate the views using power tools without the error. So it's probably something to do with my environment. Any ideas what to try changing ?
The IndexAttribute is a new feature that is added in Entity Framework 6.1.
You say that you have updated to 6.1, but the error suggests that you have a reference to version 6.0.
Can you remove all references to EF and System.Data.Entity and then try to install it again with Nuget?
The reason is that Power tools use the IDE version of EntityFramework and not the referenced. Please check my solution EntityFramwork Power Tools error while generating views

Visual Studio 2012 can't resolve namespace even though DLL reference seems fine

I have attempted to create an MVC 5 project by creating an MVC 4 project in Visual Studio 2012 and installing MVC 5 through Nuget.
I can build this fine.
I attempt to add a reference to another DLL, Sitecore.Mvc.DLL, which I can see was built against MVC 5.1.0. The DLL reference is added fine, and there seems to be no .NET framework conflict (which is where I've seen this issue in the past).
I'm trying to add a using statement to my code:-
using Sitecore.Mvc.Presentation;
IntelliSense picks this up fine....even allowing me to auto-complete 'Presentation'.
However when I build I get the following error:-
The type or namespace name 'Sitecore' could not be found (are you missing a using directive or an assembly reference?)
What could be the issue here?
I'm using:-
Visual Studio 2012 - Update 4
MVC 4 Web Application (initially)
MVC 5.1.0 Nuget Package
Sitecore 7.2 - Update 2 (where Sitecore.Mvc.DLL comes from)
.NET 4.5.2 installed on my machine.
Turns out I'm using a different version of Sitecore.Mvc.DLL, which IS targeted to .NET 4.5.1. Seems like the mscorelib reference in Reflector doesn't quite tell all the details.
Now I need to target my Web App to .NET 4.5.1, which means I need to follow the steps here to be able to select it.
http://blogs.msdn.com/b/dotnet/archive/2013/08/08/building-apps-with-the-net-framework-4-5-1-preview-in-visual-studio-2012.aspx
Thanks, and sorry to #Khanh TO, and everyone else for helping out.

NuGet Project > Add Library Package Reference not appearing

I have installed NuGet.
When I try to go to Project > Add Library Package Reference
"Add Library Package Reference" is not under the project menu. If I try to install NuGet again it says it is already installed. My application is an MVC 3 application targeting .net 4.
How can I get this option to appear?
You might also run VS as Admin (Ctrl-Shift-Click) then uninstall NuGet from the package manager dialog. Then update to NuGet 1.1 from http://nuget.codeplex.com and see if that fixes it. ASP.NET MVC is not needed.
Is it possible that some of the extensions of your Visual Studio are causing NuGet to not show the menu or crash? You could try to disable/remove them and then install NuGet from here: http://nuget.codeplex.com/
Besides, there is also a PowerShell-based Package Manager Console. You could take a look on that in case everything fails.
Make sure you have the project selected and not the solution in the solution explorer.
As of May 2012, it's now called "Manage NuGet Packages".
Especially confusing because the screenshots in the NuGet Docs have not been updated.
https://stackoverflow.com/a/9844659/24267
Normally NuGet is installed with ASP.NET MVC 3 so it should appear automatically. Try removing the NuGet package that you have installed and reinstall ASP.NET MVC 3.
Had this same issue, just realized that if you're not on the project (i.e., you have the solution highlighted in solution explorer) that the option for the Add Library Package Reference won't show. Select the project and it's there.
Whoops: Didn't notice that was already mention.
I've just had a similar problem, after trying to install a package over dial-up, which timed out.
To fix it, I renamed the registry key (so that I could rename it back if it didn't work) HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\NuGet, then restarted visual studio and opened a project. The Add Library Package Reference now works and the registry key has been recreated.

Resources