Visual Studio compile problem

Anonymous
2019-04-28T21:50:20+00:00

How do you fix a problem where the program cannot find the file for the project when compiling. The setup was default and should be found by Visual Studio, but I get an message box about this. There is no problem with the code, just can't seem to find the file. I can pull the file up manually, but would like to know how to fix this issue please.

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. DaveM121 812.5K Reputation points Independent Advisor
    2019-04-28T21:54:44+00:00

    Hi Spartan080

    This error generally is generated when the previous exe that was created from the previous build was not deleted automatically form the bin folder . . .

    Try clicking, Build - Clean, then try compiling your project again . . .

    0 comments No comments
  2. Anonymous
    2019-04-28T22:00:24+00:00

    DaveM121,

    Thank you for getting back to me so quickly. I went to build, clean and then tried to build again, but no joy. When trying to run without debugging or with, it gives the same message box. Anything else you think I should try?

    0 comments No comments
  3. DaveM121 812.5K Reputation points Independent Advisor
    2019-04-28T22:06:41+00:00

    Hi Spartan080

    What type of coding project (WinForms, WPF . . etc) in Visual Studio are you working on?

    What is the exact error you are seeing when you go to compile your project - a screenshot would really help to diagnose this error . . .

    0 comments No comments
  4. Anonymous
    2019-04-28T22:12:54+00:00

    DaveM121,

    It's a basic HelloWorld program from an old game programming book from high school. Below is the issue:

    0 comments No comments
  5. DaveM121 812.5K Reputation points Independent Advisor
    2019-04-28T22:24:04+00:00

    Hi Spartan080

    HelloWorld - that is where we all started . . .

    At the top of you code add this line, after the include <windows.h> statement:

    using namespace std;

    Then try to compile your project . . .

    If that does not resolve this:

    If you manually go into the Debug folder delete Project1.exe and then compile your project, does it execute?

    If not, then you anti-virus is not allowing that to run, temporarily stop whatever anti-virus (Defender or 3rd party AV) and see if you can compile and execute your project . . .

    0 comments No comments