Visual Studio 2017 fatal error C1083: Cannot open source file: 'Main.cpp' The Next CEO of...

What happened in Rome, when the western empire "fell"?

Is it possible to search for a directory/file combination?

How do I go from 300 unfinished/half written blog posts, to published posts?

Should I tutor a student who I know has cheated on their homework?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

Won the lottery - how do I keep the money?

In excess I'm lethal

How to safely derail a train during transit?

How powerful is the invisibility granted by the Gloom Stalker ranger's Umbral Sight feature?

Which kind of appliances can one connect to electric sockets located in a airplane's toilet?

Real integral using residue theorem - why doesn't this work?

If the heap is initialized for security, then why is the stack uninitialized?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

Inappropriate reference requests from Journal reviewers

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Can I run my washing machine drain line into a condensate pump so it drains better?

How do I reset passwords on multiple websites easily?

Multiple labels for a single equation

Why didn't Khan get resurrected in the Genesis Explosion?

Elegant way to replace substring in a regex with optional groups in Python?

Why do professional authors make "consistency" mistakes? And how to avoid them?

Novel about a guy who is possessed by the divine essence and the world ends?

How to solve a differential equation with a term to a power?

Make solar eclipses exceedingly rare, but still have new moons



Visual Studio 2017 fatal error C1083: Cannot open source file: 'Main.cpp'



The Next CEO of Stack OverflowVisual Studio 2010 Stops Building RandomlyRemove broken Visual Studio 2017 TemplatesVisual Studio 2017 not openingCan not install Visual Studio 2017Cant install Visual Studio 2017Visual Studio 2017 installation failsVisual Studio 2017, F7 not workingVisual Studio 2017 AutoRecover Doesn't DisableDebugger.Launch() on Visual Studio 2017Getting an error trying to find libfftw3-3.dll after adding the containing folder to “Additional Dependencies” in VS2017












0















I am a brand new user of Visual Studio 2017 and I am having difficulty building a simple HelloWorld project. Here's what I am doing:



File > New > Project...



I choose Empty Project. I rename the project HelloWorld and I change the location from the default location on my c drive to a location inside my Dev folder, which is on my d drive. Once the project is created, I right click Source Files and add a file called Main.cpp, containing the simplest code:



int main() {
return 0;
}


However, when I right-click HelloWorld and Build, I receive the following output:



1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>Main.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'Main.cpp': No such file or directory
1>Done building project "HelloWorld.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


However, I only receive this error if I change the Location of the project. If I use the default directory, c:my_userSourcerepos then the project builds without any issue. But I would like to know how to fix this error, because I don't want to keep my files on my c drive. Has anyone else experienced this problem who might know how to fix it? Because I am at a loss.









share







New contributor




leisheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I am a brand new user of Visual Studio 2017 and I am having difficulty building a simple HelloWorld project. Here's what I am doing:



    File > New > Project...



    I choose Empty Project. I rename the project HelloWorld and I change the location from the default location on my c drive to a location inside my Dev folder, which is on my d drive. Once the project is created, I right click Source Files and add a file called Main.cpp, containing the simplest code:



    int main() {
    return 0;
    }


    However, when I right-click HelloWorld and Build, I receive the following output:



    1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
    1>Main.cpp
    1>c1xx : fatal error C1083: Cannot open source file: 'Main.cpp': No such file or directory
    1>Done building project "HelloWorld.vcxproj" -- FAILED.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


    However, I only receive this error if I change the Location of the project. If I use the default directory, c:my_userSourcerepos then the project builds without any issue. But I would like to know how to fix this error, because I don't want to keep my files on my c drive. Has anyone else experienced this problem who might know how to fix it? Because I am at a loss.









    share







    New contributor




    leisheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I am a brand new user of Visual Studio 2017 and I am having difficulty building a simple HelloWorld project. Here's what I am doing:



      File > New > Project...



      I choose Empty Project. I rename the project HelloWorld and I change the location from the default location on my c drive to a location inside my Dev folder, which is on my d drive. Once the project is created, I right click Source Files and add a file called Main.cpp, containing the simplest code:



      int main() {
      return 0;
      }


      However, when I right-click HelloWorld and Build, I receive the following output:



      1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
      1>Main.cpp
      1>c1xx : fatal error C1083: Cannot open source file: 'Main.cpp': No such file or directory
      1>Done building project "HelloWorld.vcxproj" -- FAILED.
      ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


      However, I only receive this error if I change the Location of the project. If I use the default directory, c:my_userSourcerepos then the project builds without any issue. But I would like to know how to fix this error, because I don't want to keep my files on my c drive. Has anyone else experienced this problem who might know how to fix it? Because I am at a loss.









      share







      New contributor




      leisheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I am a brand new user of Visual Studio 2017 and I am having difficulty building a simple HelloWorld project. Here's what I am doing:



      File > New > Project...



      I choose Empty Project. I rename the project HelloWorld and I change the location from the default location on my c drive to a location inside my Dev folder, which is on my d drive. Once the project is created, I right click Source Files and add a file called Main.cpp, containing the simplest code:



      int main() {
      return 0;
      }


      However, when I right-click HelloWorld and Build, I receive the following output:



      1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
      1>Main.cpp
      1>c1xx : fatal error C1083: Cannot open source file: 'Main.cpp': No such file or directory
      1>Done building project "HelloWorld.vcxproj" -- FAILED.
      ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


      However, I only receive this error if I change the Location of the project. If I use the default directory, c:my_userSourcerepos then the project builds without any issue. But I would like to know how to fix this error, because I don't want to keep my files on my c drive. Has anyone else experienced this problem who might know how to fix it? Because I am at a loss.







      windows-10 visual-studio visual-studio-2017





      share







      New contributor




      leisheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      leisheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      leisheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 8 mins ago









      leishengleisheng

      1




      1




      New contributor




      leisheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      leisheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      leisheng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          leisheng is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1419272%2fvisual-studio-2017-fatal-error-c1083-cannot-open-source-file-main-cpp%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          leisheng is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          leisheng is a new contributor. Be nice, and check out our Code of Conduct.













          leisheng is a new contributor. Be nice, and check out our Code of Conduct.












          leisheng is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1419272%2fvisual-studio-2017-fatal-error-c1083-cannot-open-source-file-main-cpp%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...