VIsual Studio 2019 Entity Data Model Wizard AssemblyFile is null - visual-studio

I've created a WebSite Project in Visual Studio 2019, but when I try to add an ADO Entity Model and I click on New COnnection, Visual Studio raise an error:
assemblyFile is null or empty
at Microsoft.Data.Entity.Design.VisualStudio.ExecutorWrapper...
After clicking on Abort, the only button that can close the error window, VS crashes.
I've tried to reinstall everything from scratch several times, I've installed also on another PC but the error persists.
The reference to the assembly System.Data.Entity is in the webconfig:
<compilation debug="true" targetFramework="4.7.2">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
Anyone knows how to solve or Database first in EF6 must be forget??

This happen to me on a website project. I change it to use Web Application project and now EF works fine. Try that.

Related

Why getting Intelligence error in VS 2019

First, I update the VS 2019. After that I updated my project from .net framework 4.6 to 4.8.
Now I getting the Intelligence error in the MVC view. I check some article and blog related it and try below points for it.
Delete the bin and obj folder.
Delete .vs file
Delete the packages folder.
I did all things but still I am getting the same Intelligence error.
I was getting the same error after the framework upgrade. Need to add System.Core reference in the main Web.config file.
<compilation>
<assemblies>
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>

'System.Data.Linq.DataContext' is not defined in Web Applications (not web sites)

In a Web Forms Web Application project, in both C# and VB, Linq2SQL is not working. I'm getting the error 'System.Data.Linq.DataContext' is not defined, and my Linq2SQL class will not compile. Well, that's not quite correct. The entire solution will compile, but if I try to open the default page, the error comes up, and if I look in the designer for the class, anything to do with Linq is underlined in red, and I can't reference the class.
Also, in the Imports of the Linq class, the compiler is telling me "Namespace or type specified in the Imports 'System.Data.Linq' doesn't contain any public member or cannot be found."
And if I create a Web Site project, there is no problem with Linq.
Visual Studio 2015.
I encountered this issue, found that the core problem was not having the web.config file in the root with the following node:
<configuration>
<system.web>
<compilation strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
</configuration>
My understanding: the referencing issue arises as it's not including the Linq assembly in the build, so if you add the assembly, it works.

ReportViewer not working on Visual Studio 2012

I just adquired the VS 2012 and I tryed to open my projects I made using VS 2010.
But now, the ReportViewer is not working, it shows up but with NO DATA.
my code are OK, my querys are OK, everything about this are OK, I'm sure !!
Because it's not working only now in the Visual Studio 2012, anyone would know what could I do ?
I tried to remove some lines from my web.config:
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
I also tried to delete my current ReportViewer and Create a new one, didn't work neither...
Obs: I'm not posting any code here because I have no need to correct my code, it's ok, I'm sure ! I just need know why it's not working on VS 2012.
Make sure you have updated your aspx page hosting the reportviewer with the reference to the version 11.
<%# Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

Strange error in using ErikEJ's SQL CE Membership provider

I've been trying to implement the wonderful SqlCe 4.0 Membership Provider by ErikEJ but I'm having trouble. I got it working via the documentation mr EJ provides. But....
I want to abstract the source into an external DAL. But I'm having issues getting there. The first problem I'm getting is trying to add the reference to SqlCe via the .csproj file rather than the web.config. (I need to do this so I can add the same reference in my DAL project) (I also need to be able to set copy local to true so want it in the csproj references). So I do this....
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<!--<add assembly="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>-->
</assemblies>
And then add it in my project...
But when I browse to the website I get this error message:
Unable to load the native components of SQL Server Compact
corresponding to the ADO.NET provider of version 8482. Install the
correct version of SQL Server Compact. Refer to KB article 974247 for
more details.
When I refer to the KB article it says:
FIX: You receive an error message when you run a SQL Server Compact
3.5-based application after you install the 32-bit version of SQL Server Compact Edition 3.5 Service Pack 2 on an x64 computer
And yeah that's whats throwing me. Why is it talking about 3.5? I have added a reference to the 4.0 dll which Eric's provider is designed to work with.
I really hope someone can help. Perhaps Erik will read this post :-)
p.s. I'm also wondering what the difference between adding a reference in the web.config and adding it it via the csproj actually is. I thought it was because the web.config looks in the GAC. But when I try to add a reference in visual studio (to the csproj) i cant see the option to add System.Data.SqlServerCe at all!
I can also say that when I copy the dlls directly from
C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Private
Into my DAL bin and website bin and reference them directly in the CSproj I still get the same issue.
You are using the Private assembly version (4.0.0.1) - sounds like the required unmanaged DLL files are missing from your deployed site. Could you have a look in file explorer and show what you see.
Also, see this SO answer: Can't get sql server compact 3.5 / 4 to work with ASP .NET MVC 2

System.Linq namespace missing even with reference to System.Core.Dll

When I open up a Asp Net web site of mine in Visual Studio 2010 the properties say "Target Framework 3.5", however when I try to using the Linq namespace the compiler complains about it.
"The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)"
"The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)"
I manually referenced some dll's to fix my problem, but still no success.
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Help? :-)
If you can't even use var, that suggests it's not even using the right version of the C# compiler. (You should be able to use var even when targeting .NET 2.0, so long as you're using the C# 3 or C# 4 compiler.) I would concentrate on getting that working first before anything else.
Is it possible that you're running on IIS but don't have that configured appropriately? It might be worth looking at your website configuration around that side of things, and possibly rerunning aspnet_regiis.
I just fixed a similar issue adding a targetFramework="4.0" attribute to the compilation element in web.config
The modified relevant fragment is:
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>

Resources