Files generated during precompile do not get added to compilation
See original GitHub issueSteps 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:
- Created 7 years ago
- Reactions:6
- Comments:5 (1 by maintainers)
Top 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 >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
This will work with preview3.
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.)