If you created the file yourself, you forgot to close the stream. If Visual Studio is using it, restart your system there are a lot of underground processes that might be using the files, and even in Task Manager you would have no idea which of the process is using it. (
I have no idea of doing this in Diagnostics
[^] namespace)
So the only option left for you (for the second problem of adding a model) would be to close the Visual Studio and restart the machine. The solution to first problem is, when you are creating a new Controller, you are provided with a few options, try removing the Model selection at the time and see if that works.
If controller is created without using a Model, then the problem is indeed with that file. Using this method, you can after ways add the model to your views (
Models are required in Views, and in controllers only for data validations and other check ups).