Why getting Intelligence error in VS 2019 - visual-studio

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>

Related

VIsual Studio 2019 Entity Data Model Wizard AssemblyFile is null

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.

'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" %>

Hidden references in visual studio 2010 web site project

When I create a new web site project (not web application) in VS 2010, it seems to have some dlls already referenced. If I try to add System, System.Core, System.Data, I get the error stating that "The Web site is already referencing the assembly 'System.Core'" etc. When I try to use a datatype from one of these assemblies, it seems to be recognized and I get intellisense and all. But I cannot see these dlls added in the Web.Config nor when I open the references tabs in the properties of the website. Is there any new secret place that these "Default" references are being added to?
Background Info:
The main reason I am trying to figure out these references is that I have migrated a project from VS 2008 to 2010 and I am getting build errors that System.Data.DatasetExtensions need to be refered. However, the reference is present in the web.config and I can also see the reference in the project properties. I also checked that it has the same version and same public key token as the build error. Below if the build error:
error BC30007: Reference required to assembly 'System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the base class 'System.Data.TypedTableBase`1'. Add one to your project.
Here is the reference in the web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="false" strict="false" explicit="true">
<assemblies>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<authentication mode="Windows"/>
</system.web>
</configuration>
I would really appreciate if someone can help me figure this out.
Thanks.
Notes:
1. I do not have the option of moving to a Web Application project.
2. In VS 2008, references from GAC were stored in Web.Config, Project references were stored in the solution file and other dll references were stored as .refresh files in the bin folder. I cannot find these dlls in any of the above places.
I had the exact same problem, and I eventually figured out the cause to mine was that I had copied a DLL to the project's BIN folder. Doing this causes Visual Studio to consider the DLL referenced. If you move the DLL outside of that folder, you'll be able to add the reference from within Visual Studio.

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

Resources