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.

Files generated during precompile do not get added to compilation

See original GitHub issue

Steps to reproduce

Consider a project.json with a scripts node like so

"scripts": {
    "precompile": "cmd /c echo namespace Test { public class Foo {} } > Test.cs"
  }

Referencing Test.Foo does not work in the first compile when the file is not on disk. Having an empty Test.cs which gets populated during precompile works. It looks like the build is calculating the set of files to compile earlier than precompile. Perhaps it needs to do it after?

dotnet --info output: 1.0.0-preview3-003150

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
livarcocccommented, Nov 11, 2016

This will work with preview3.

0reactions
chwarrcommented, Nov 1, 2016

This looks like a duplicate of https://github.com/dotnet/cli/issues/1475 to me. That issue mentions a possible workaround: have dummy files that get overwritten by the precompile scripts. This is working for me.

I doubt that this will get fixed, with the planned move to MSBuild-based builds.

(Though I work for Microsoft, I’m not associated with this project.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

ruby on rails - asset precompile not generating any json files
I have an app which I want to deploy to Heroku. It works in development, but not when deploying to Heroku. I am...
Read more >
How we sped up our asset precompile by removing it
Tanda's web instances don't have a copy of the compiled assets on them, just the asset manifest containing the mapping between the original ......
Read more >
ASP.NET Precompilation Overview
Faster response time for users, because pages and code files do not have to be compiled the first time that they are requested....
Read more >
The Asset Pipeline
When using asset precompilation (the production default), you will need to ensure that your controller assets will be precompiled when loading them on...
Read more >
Precompiling Your Website (C#)
With WAPs, you compile the web application's code into a single assembly, which is created in the website's Bin folder.
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