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.

Need to add "Compile Include ..." to use files generated during the build but this causes more errors

See original GitHub issue

Environment data

dotnet --info output:

Ferramentas de Linha de Comando do .NET (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.0\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

VS Code version: 1.17.0 C# Extension version: 1.12.0 (I think)

Steps to reproduce

The attached project uses <Compile Include="$(IntermediateOutputPath)\*.cs" /> so GrammarParser is recognized. But usage of Compile causes others problems in Problems view and with dotnet cli.

If I remove Compile the project builds correctly with dotnet cli, but then OmniSharp does not recognize GrammarParser.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DustinCampbellcommented, Nov 7, 2017

Correct. It will only regenerate the files when MSBuild runs. That happens on initial project loading and during build.

1reaction
DustinCampbellcommented, Oct 31, 2017

It won’t generate the files simply by passing that variable, but it will with my full OmniSharp change. The project needs to be restored first though. There is an issue in OmniSharp where it won’t reload a project after a restore in some cases (and this is one of them). However, if the project is already restored, the files will be generated when OmniSharp loads the project. I just tried this to verify.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fatal Error C1083 | Microsoft Learn
The compiler generates a C1083 error when it can't find a file it requires. There are many possible causes for this error.
Read more >
Auto-generated "App_Web********.cs" files in temp directory ...
I am building my Views during the compilation, via <MvcBuildViews>true</MvcBuildViews> in the project file. If I turn this setting off, I can build...
Read more >
Top 10 C++ header file mistakes and how to fix them
Mistake # 1: Not using “include guards” in a header file. ... If a header file does not have everything it needs to...
Read more >
Ahead-of-time (AOT) compilation - Angular
Compiling your application during the build process provides a faster rendering in ... files with type information that the AOT compiler needs to...
Read more >
Documentation - tsc CLI Options - TypeScript
Flag Type Default ‑‑allowJs boolean false ‑‑allowUmdGlobalAccess boolean false ‑‑allowUnreachableCode boolean
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