-
Notifications
You must be signed in to change notification settings - Fork 22
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
Suggestion: msbuild task for automatic source generation #7
Comments
I usually invoke xsd2 from a pre-build step. If xsd files change, code is updated on the next build. That worked very well for me. |
The reason for this suggestion is, that I wanted to avoid recreation of the xsd2 output when the source file(s) didn't change to avoid unnecessary recompilation. This - just as issue #6 - is of quite low priority for me. The xsd2 tool is already usable as-is. |
That could be another flag. Skip the run if the output file is newer than the latest xsd input. |
Maybe the following PR will answer your need. Maybe it's not perfect, but I saw in most cases, it doesn't call to xsd2 generation until file change or rebuild was requested. I've added to rthe readme an example how should the lines in the csproj file (I guess it will be the same in msbuild file as well - the should be the same afterall...). P.S |
This does look better. It's just confusing that you might end up having a dependency for a C# source file that might not exist. |
I don't understand your point. |
It would be nice to have a MSBuild task that creates the source code of an XSD file automatically. The following features for xsd2 would be needed:
How should the msbuild task be configured?
The text was updated successfully, but these errors were encountered: