You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide a "Build Order" property for TypeScript files in Visual Studio #2181
The request is for something like the following on the properties page for a file.
At present this ordering needs to be specified in _references.ts. The properties page is a more natural way for Visual Studio users to specify file-level actions.
Another alternative is for the ordering to be determined automatically: If Type B is the base class for Type C and they both exist in the same project then the file in which Type B is defined must be compiled first.
I don't think we're about to get into the business of trying to automatically deduce file ordering so I'll address the other part of this proposal:
Having to check each file's metadata to understand the build order seems like really bad UX to me. It's essentially impossible to get a holistic view of the build order, there's even more metadata tied up in annoying tool windows (and doesn't work in loose file scenarios), and it's super painful to update the values across a project. What happens when I want to insert a new file at build order 3 in a project with many files?
I get the pain you're feeling with _references.ts and /// references but I'm pretty skeptical that this is the best way to address those problems.
Yes, I see the point about bad UX. What's a good long term solution, though?
Why not ditch .csproj and create a brand new .tsproj? The NTVS people have done that with their .njsproj and they've created some nice functionality around it.
All it needs is a simple box where files can be added if ordering needs to be specified.
Solution Explorer should probably just reflect the correct file order and support re-ordering files rather than an alphabetical ordering (this is how F# handles the same problem).
Activity
danquirk commentedon Mar 2, 2015
I don't think we're about to get into the business of trying to automatically deduce file ordering so I'll address the other part of this proposal:
Having to check each file's metadata to understand the build order seems like really bad UX to me. It's essentially impossible to get a holistic view of the build order, there's even more metadata tied up in annoying tool windows (and doesn't work in loose file scenarios), and it's super painful to update the values across a project. What happens when I want to insert a new file at build order 3 in a project with many files?
I get the pain you're feeling with _references.ts and /// references but I'm pretty skeptical that this is the best way to address those problems.
NoelAbrahams commentedon Mar 2, 2015
Yes, I see the point about bad UX. What's a good long term solution, though?
Why not ditch
.csprojand create a brand new.tsproj? The NTVS people have done that with their.njsprojand they've created some nice functionality around it.All it needs is a simple box where files can be added if ordering needs to be specified.
danquirk commentedon Mar 2, 2015
Solution Explorer should probably just reflect the correct file order and support re-ordering files rather than an alphabetical ordering (this is how F# handles the same problem).
NoelAbrahams commentedon Mar 2, 2015
So, it's just a case of nipping down the hall to where the F# guys are holed up, and asking to borrow their code, right?
NoelAbrahams commentedon Apr 3, 2015
Probably a bit obvious, but we should be able to specify the order of folders in the project as well.
mhegazy commentedon Feb 22, 2016
using _references.ts, tsconfig.json with files property, or just adding
///<references>directives in your project should solve the issue.