agnicore / nfx

.NET Standard Unistack Framework
http://nfxlib.com
Other
75 stars 91 forks source link

The Net SDK project structure does not see auto-generated CS files by NTC #25

Closed itadapter closed 6 years ago

itadapter commented 6 years ago

The solution, generate *.ntc|*.htm -> .tc/*.auto.cs

add -sub switch to NTC, so it adds .tc/to relative output path.

Something like:

ntc "*.htm" -sub ".template-compiled" -r
itadapter commented 6 years ago

New .Net SDK includes CS by default, the problem is that it gets the list of included files BEFORE the prebuild command runs. Because of this, the files generated by pre-build command are no "seen" by the MsBuild system.

Now, we compile *cs by NTC using this form:

ntc .....   -sub .....

It places the CS files into .tc sub-folder that needs to be explicitly included in CS project, so the problem goes away.

DONE ba7e2b1