cannot open source file
See original GitHub issueAfter deleting my bin/obj folders, I get this when trying to build:
c1 : fatal error C1083: Cannot open source file: '<path>\BC3\obj\Debug\net6.0-windows\win-x86\dnne\BC3.g.c': No such file or directory
I’ve seen this with multiple projects (I’ve created new projects multiple times when encountering this problem).
This is an x86 project and does have
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
set per #58 and this commit .
Issue Analytics
- State:
- Created a year ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
visual studio - ERROR: Cannot open source file " "
In solution explorer, single click each file with the error, bring up the Properties window (right-click, Properties), and ensure the "Relative ...
Read more >"Cannot open source file" for a file that is part of project
I have a header file, "Graphics.h" When I try to #include it somewhere else I get "cannot open source file" error. Yet it's...
Read more >Error "Cannot open source file" in c++ - Microsoft Q&A
So I am new in c++ and in visual studio, every time i try and build/debug, it always fails and basically all the...
Read more >c++ cannot open source file [SOLVED] - Mr.CodeHunter
Solution-1 : Check your Visual Studio Project settings under C++, Check Include directories and make sure Your_filename.h is pointing to correct ...
Read more >How to Fix Stdio.h Not Found Visual Studio Error
In This Video We Will See How to Fix Stdio.h Not Found Visual Studio Error or Cannot Open Include File or Source File...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AArnott That is entirely possible and likely the case. I wrote most of this while testing outside of VS. I assume following these docs will help avoid a majority of these problems, https://github.com/dotnet/project-system/blob/main/docs/design-time-builds.md.
Another thing that concerns me about this message is that it means VS is trying to run cl.exe in its design-time build, which is totally inappropriate, as it will slow down a great many other design-time experiences in VS. In fact this failure appears to be breaking the design-time build, which is now producing many more errors in the error list as the language service cannot fully initialize.