I'm getting an error when I try to compile or run the application.
Performing a simple tutorial, I worked at first but now when I generate the project F6 or try to run it, I always get the error
Error 1 Unable to copy
"C:\Projects\DatabaseExampleApp\DatabaseExampleApp\App_Data\northwnd.mdf" to "bin\Debug\App_Data\northwnd.mdf". The process can not access the file 'bin\Debug\App_Data\northwnd.mdf' because it is being used by another process. DatabaseExampleApp
The first time when I run the app worked fine
I'm using:
- Visual Studio 2010 Professional
- SQL Server 2012 Express 64-bits
EDIT:
after:
- kill the
sqlservr.exe
(is the file locker) - delete the files myself
northwnd.* northwnd_log.*
- generate project F6
- run the app work fine
But I have a questions:
- how kill or unload the file
northwnd.mdf
to avoid this problem?
The app compile after that but don't run