Microsoft Visual Studio 2013 - There were compilation errors. Do you want to continue and run the last successful compilation?

Asked

Viewed 743 times

0

Guys, here’s the deal: I’m developing a program Windows Form for desktop in the C# using the Visual Studio 2013.

However, sometimes when I click on iniciar/ start some project compilation errors appear and I haven’t given a build and even if I did, the warning message would appear again.

Every time that happens, I have to close Visual Studio and open it again. It bothers me a lot because you go programming just thinking the same thing is going to happen.

These are the mistakes I copied when this happens:

Outgoing list:

Erro    12  Unable to copy file "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Erro    11  Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Exceeded retry count of 10. Failed.    GroupManager
Aviso   9   Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Aviso   8   Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Aviso   7   Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Aviso   6   Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Aviso   5   Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Aviso   4   Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Aviso   3   Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Aviso   2   Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Aviso   10  Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager
Aviso   1   Could not copy "obj\Debug\GroupManager.exe" to "bin\Debug\GroupManager.exe". Beginning retry 9 in 1000ms. O processo não pode acessar o arquivo 'bin\Debug\GroupManager.exe' porque ele está sendo usado por outro processo.    GroupManager

Program.Cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GroupManager
{
    static class Program
    {
        /// <summary>
        /// Ponto de entrada principal para o aplicativo.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

Folder path:

inserir a descrição da imagem aqui

How can I fix this mistake?

  • Open VS as Administrator

  • It makes sense, I’ll do it this way.

  • Solved your problem?

  • Apparently your application is not being properly finished, it is running and in the next compilation vs cannot create the file again because it is in use. Show us your Software, and the code of the Program.Cs file

  • @Leandroangelo used the VS13 for a while, but unfortunately the error continues :(

  • @Rovannlinhalis [https://i.stack.Imgur.com/hz0eL.png ] - [https://i.stack.Imgur.com/fWVaR.png ]

  • @Sérgio you can edit your question and add the information. When code, put it as text and not as image. In the images you put in the comments I saw nothing wrong, and it seems to me a simple Solution, should not be happening such error. Try to put more samples of your code, especially if you have some functionality to terminate the application, such as a quit button for example

  • @Rovannlinhalis In the Form there are no buttons to quit the application, even to quit is by clicking on the standard (X) window. I edited now in code form. Take a look there.

  • @Sergio, by any chance, enabled ? Antivirus tried to disable it ?

Show 4 more comments

2 answers

1

Some program is ultilizing the compiled file (.exe), or the program itself is running. Maybe by closing the program window by clicking on X, do not finish the process, just close the window. You can use the task manager to view the running processes, or close them. Or it can be an antivirus blocking the file or folder.

  • So when start the program the compiled file should not be running? That’s it?

  • @Sérgio That’s right.

0

For various actions Visual Studio needs privileges of an administration account on the machine.

To run it as Administrator it is necessary that the logged-in user has such privileges (it is included in the local Administrator gurpo of the machine).

Just locate the Visual Studio shortcut, right-click and select Run option como ou Administrador or Run as admninistrator, depending on the language of your operating system.

inserir a descrição da imagem aqui

Source

Browser other questions tagged

You are not signed in. Login or sign up in order to post.