frhagn / Typewriter

Automatic TypeScript template generation from C# source files
http://frhagn.github.io/Typewriter
Apache License 2.0
537 stars 132 forks source link

Option to stop including the generated files in the current project #305

Closed wwarby closed 5 years ago

wwarby commented 5 years ago

I've implemented a number of Typewriter TST files that use settings.OutputFilenameFactory to push the output files into a UI project that is outside the scope of my Visual Studio API project. This works perfectly, except it then create a reference to the generated file in my .csproj file and clutters up my solution with the generated TypeScript. I do get that saving the output outside of the project isn't supported (https://github.com/frhagn/Typewriter/issues/77) but given that it does actually work just fine and the only problem with it is the generated entries in the .csproj file, it would be really great if that generation could be turned off with a setting.

aeslinger0 commented 5 years ago

I agree. I use OutputFilenameFactory to generate the code in my Angular project which is in a completely separate directory from my Web API project. This was working fine for me actually until recently. I think VS auto-updated the extension. Now it generates files in the C# project that I have to delete whenever I make a change.

The changelog says that version 1.17 added the "Option not to add generated files to the current project". How do you set that option? Does it still exist?

frhagn commented 5 years ago

There's an option to change this behaviour in the Visual Studio Options dialog (Tools > Options and then select Typewriter in the settings tree).

wwarby commented 5 years ago

Bah - sorry, I should have looked there before posting. Thanks.