Skip to content

Error: "File already exists" when adding .dbml to new .NET project using LINQ to SQL #450

@samuvosucm

Description

@samuvosucm

Describe the bug

When starting a new .NET project from scratch and attempting to add a LINQ to SQL .dbml file, Visual Studio throws an error stating that the file already exists, even though it does not. This only appears to happen in new projects and seems to be related to framework-level changes. The issue does not affect existing or upgraded projects and appears to be backward compatible.

List of tasks to be accomplished

  • Investigate the root cause of the file conflict
  • Solve the issue without adding new technologies
  • TBD

To Reproduce

Steps to reproduce the behavior:

  1. Create a new .NET project
  2. Right-click on the project and choose Add > New Item
  3. Select LINQ to SQL Classes, name it and add it
  4. See error

Expected behavior

The .dbml file should be added without error

Screenshots

Image

Metadata

Metadata

Assignees

Labels

bugsomething is wrong and must be fixed

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions