Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ALL] Make the generators work on .NET Core (2.1) #11

Open
JabX opened this issue Jun 9, 2018 · 0 comments
Open

[ALL] Make the generators work on .NET Core (2.1) #11

JabX opened this issue Jun 9, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@JabX
Copy link
Contributor

JabX commented Jun 9, 2018

.NET Core 2.1 comes with a global tool system which works exactly like npm modules work for node. This would be the perfect way to distribute the generators (instead of cloning the repo and building from the source), but that also would mean that the generators need to run on .NET Core, which is currently not the case.

The main reason for this is because we use T4 runtime templates to generate the TS model and services, which aren't supported on Core. Existing T4 alternatives for Core cover the design-time T4 part (which is actually the main feature of T4 and the one that's harder to replicate), but for runtime generation we'll be fine with basic file writing like we already do for the C# and SQL generators. (I am the one would chose T4 for TS generation, so this is my bad)

Again, this will need #9 beforehand, in order not to copy/paste the whole TS writer from both projects.

There might be other issues preventing the switch to Core, but we'll see and update the issue if there are any other problem.

EDIT : Actually, the biggest problem isn't T4 but the dependencies to MSBuild that the generators have. The modgen uses it to update SSDT project files, though it's been broken for a long time so I don't think it would matter too much if we dropped it in its current form (and if someone wants to find a solution I think it'd be best not to rely on it). The servicegen uses it to load the entire solution in a Roslyn workspace to find FrontEnd projects, their controllers and all the data about the types they use. It should be possible to do it without MSBuild, but it will require some further investigations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants