dotnet-websharper / ui

A reactive UI library for WebSharper.
https://websharper-samples.github.io/ui/
Apache License 2.0
77 stars 22 forks source link

C# templating: don't save the file if it would be unchanged #187

Closed Tarmil closed 6 years ago

Tarmil commented 6 years ago

Currently it is not possible to use dotnet watch on a C# project that uses templating: the compiler writes the *.g.cs file, which prompts dotnet watch to restart compilation, and so on indefinitely. The fix would be to read the existing file if it exists, and only write if the new contents would be different.