question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot open source file

See original GitHub issue

After 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:closed
  • Created a year ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
AaronRobinsonMSFTcommented, Jan 9, 2023

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

@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.

0reactions
AArnottcommented, Jan 6, 2023

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found