0
Is it possible to know which processes are opened inside Visual Studio through some hotkey? I am debugging and the error message is that the file is opened in another process, I checked if it was the database connection, if it was someone else and even closed and reopened the VS.
string sb = @arquivo.Caminho + "\\" + repositorioArquivo.AtribuiData(arquivo.Nome_fisico, dataReferenciaArquivo);
StreamReader arqLido = new StreamReader(@sb); //da exceção aqui
Most likely this isn’t about Visual Studio. This file you’re trying to open from your source, right? If so, understand that this is a problem in the code and has nothing to do with Visual Studio. If so, you need [Edit] the question and show the code you use to open this file.
– Jéf Bueno
@LINQ I found out where I was giving problem, I went through a method that simply read the file
– Leonardo Lima
Great, you need to always close up any and all stream that open. Using
Dispose()
.– Jéf Bueno
Well, I marked the question as duplicate because it’s the same problem.
– Jéf Bueno
Related: Why use block using in ASP.NET MVC?
– Jéf Bueno