LINQ to SQL Designer Bug
Move using
directives in your DataContext.cs
and DataContext.designer.cs
files into the namespace
scope.
LINQ to SQL Designer not working
Its fixed, the problem was when Installing vs 2008 sp1, it haven't installed .net 3.5 sp1 automatically , i have manually installed .net 3.5 sp1 , its now working!
Missing LINQ to SQL Classes (DBML designer) in Visual Studio 2017 RC
You need to opt in to enable the designer during installation, it is not enabled by default: https://developercommunity.visualstudio.com/content/problem/4616/linq-to-sql-dbml-designer-in-not-working.html
"Editing .dbml files with a designer surface requires the LINQ to SQL tools which are not installed by default as part of any of the workloads of Visual Studio 2017. It can be installed by selecting the 'LINQ to SQL tools' item under the 'Code Tools' category in the 'Individual Components' tab of the Visual Studio installer."
Linq to SQL creating duplicate designer files
Not sure what could have caused this (but Marc's suggestion about the file being readonly or not checked out seems possible), but the association is described in the .proj file. If you open that file with a text editor you should see somewhere within something like:
<ItemGroup>
<None Include="Minerva.dbml">
<Generator>MSLinqToSQLGenerator</Generator>
<LastGenOutput>Minerva1.designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</None>
Replace Minerva1.designer.cs
with Minerva.designer.cs
. You can now delete or exclude the Minerva1.designer.cs
file from you project and the next time the generator is invoked it will overwrite Minerva.designer.cs
as expected.
Linq to SQL creating duplicate designer files
Not sure what could have caused this (but Marc's suggestion about the file being readonly or not checked out seems possible), but the association is described in the .proj file. If you open that file with a text editor you should see somewhere within something like:
<ItemGroup>
<None Include="Minerva.dbml">
<Generator>MSLinqToSQLGenerator</Generator>
<LastGenOutput>Minerva1.designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</None>
Replace Minerva1.designer.cs
with Minerva.designer.cs
. You can now delete or exclude the Minerva1.designer.cs
file from you project and the next time the generator is invoked it will overwrite Minerva.designer.cs
as expected.
O/R Designer Validation failed - during clean?
I had to close Visual Studio and reopen it. Solved this for me. In another case I had to roll back my DBML file, then close Visual Studio, and reopen it.
Looks like a bug for Microsoft to fix.
Linq to SQL (designer) does not understand stored procedure
This is not technically an issue with the Linq to SQL designer, it is an issue with SQL Server. Linq to SQL designer uses SET FMTONLY ON to get the result set information of a stored procedure. Unfortunately, this method does not work when the stored procedure has a temporary table.
There is a small back and forth regarding this in the first few comments of ScottGu's blog post.
LINQ to SQL designer not opening/timing out (VS 2022)
Viewing the Toolbox and (optionally) resetting it (right click > Reset) seems to solve this. It seems the designer can't open when the toolbox is not initialised (or fails to initialise). It is often a while before I open the toolbox on a new install so I kept on encountering this problem.
Linq to Sql saying that item by 'Customer' already exists. Choose a different name
Figured it out. Somehow there were duplicate associations. The part that confused me was that it looked like it was pointing to an object and didn't look like it was pointing to the association.
Related Topics
What Is The Advantage of Using Varbinary Over Varchar Here
Select Distinct Values from Multiple Columns in Same Table
Is Using Char as a Primary/Foreign Key a No No
Using Columns in a Regexp in MySQL
How to Get Records Before and After Given One
Best Practice for Naming SQL Table Columns
How to Get Second Highest Salary Department Wise Without Using Analytical Functions
Select All Parents or Children in Same Table Relation SQL Server
How to Fetch The Nth Highest Salary from a Table Without Using Top and Sub-Query
Checking for Existence of Index in Postgresql
How to Convert a SQL Subquery to a Join
How to Count All Rows with The Same Id with Count
Excel Vlookup Incorporating SQL Table
How to Concat_Ws Multiple Fields and Remove Duplicate Separators for Empty Slots
What Is The T-Sql Equivalent of MySQL Syntax Limit X, Y