------ Clean started: Project: DataService, Configuration: Debug Any CPU ------ O/R Designer validation failed for file: a.dbml O/R Designer validation failed for file: b.dbml O/R Designer validation failed for file: c.dbml O/R Designer validation failed for file: d.dbml O/R Designer validation failed for file: e.dbml O/R Designer validation failed for file: f.dbml Error: The operation could not be completed. Unspecified error This error is intermittent. Sometimes the clean is fine, sometimes this happens.
I'm running VS2008 version 9.0.30729.1 SP - 64bit.
Is there some way I can disable the O/R designer's validation or otherwise stop this from occuring?
17 Answers
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.
2I had also the same problem, but the following procedure let VS always compile the code correctly:
Close VS
delete all files in the obj\x86 (and eventually x64)\Debug (and Release)\ directory
Then start VS again via command line using
<Path>\devenv.exe /ResetSkipPkgs (optionally: <Name>.sln to open directly the correct project)
(Not sure whether the /ResetSkipPkgs is necessary, but another article told so. I made a small batch script which does all of this automatically). The code should compile now without any problems!
For reference, my script file looks like this:
del /Q C:\[...]\[...]\obj\x86\Debug\*.* "C:\Programme (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /ResetSkipPkgs C:\[...]\[...]\<Name>.sln (I always develop in debug mode, thus I only delete the matching x86\Debug directory...)
3This problem appeared after I copied a property in a table. For some reason the copied property had the same storage name. Deleting this storage attribute in dbml xml for those copied properties solved the issue.
So the source of this problem is most likely some error in the dbml file. If you have version control, check what you changed and maybe you'll spot the error.
1vs2010 was giving me this error while vs2017 was building it fine, running vs2010 with /ResetSkipPkgs (Andre's answer) solved for me.
I solved moving a table around in the .dbml designer (so basically not changing anything), saving and rebuilding the project.
VS2017 was giving this error for one of my DBML files, and was preventing me from successfully building the project. None of these answers worked for me. Things I tried were: (1. Check csproj file for any inconsistencies such as missing item groups or appended numbers on filenames 2. Running devenv.exe /ResetSkipPkgs 3. Deleting visual studio temporary files)
This error was driving me crazy as the error visual studio shows is very cryptic. My eventual solution was to open the problematic DBML in design mode, and delete every stored procedure (I left the tables). Ran a build and the error stopped generating. Then I simply re added all the stored procedures back to the DBML, and that seemed to have done the trick.
So far, deleting and re-adding the dbml file is the only thing that has worked for me.