Код серьезности Описание Файл Файл.
This happens because another process is using your project's resources, or you have insufficiant privilages to modify them.
Try the following actions:
"As soon as I open again my database the problem repeats herself" - Do not open your database while trying to build - you are locking the mdf file.
Open your task manager and look for a process of your application, it might be running in the background. If it does, kill it.
Make sure you are building in "Debug" mode and not in "Release" mode. If you are, there could be a production EXE running somewhere.
Close and reopen Visual Studio.
Start Visual Studio as administrator.
Mohamed Sami khiari