Error when adding Linq to Sql class it says "A file with name studentdb.dbml.layout already exist."

100 Views Asked by At

Whenever I'm trying to add LINQ to SQL class as a new item in visual studio 2022, then every time it shows an error by saying "A file name studentdb.dbml.layout already exist. Please give us a unique name to the item you are adding or delete the existing one."

For every new name unlike studentdb always it shows the error and if it is normal then it supposed to add "system.data.linq" in the reference section but it didn't add that, but it adds .designer.cs file under .dbml file but in the .designer.cs file .linq isn't recognized. I have added LINQ to SQL as individual component. Error Photo

0

There are 0 best solutions below