Use a custom MSBuild task
See original GitHub issueThis will replace the use of the Exec task to run MinVer.dll as an executable, with the use of a custom task within that assembly. This is dependent on either #256, or changes in LibGit2Sharp which @bording is aware of.
One functional effect of this change is that the MSBuild verbosity level will be respected, which means that MinVerVerbosity will be ignored (probably deprecated initially, with a warning message). This could be considered a breaking change. It will also mean that the calculated version will not be outputted to the console (when the MSBuild verbosity level is detailed) as a side effect of using the Exec task.
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (9 by maintainers)
Top Results From Across the Web
Task Writing - MSBuild
Examples of tasks include Copy, which copies one or more files, MakeDir, which creates a directory, and Csc, which compiles C# source code...
Read more >Implementing and Debugging Custom MSBuild Tasks
Custom Tasks – We can operate with MSBuild infrastructure directly, including ITask , IBuildEngine , and ITaskItem objects. This allows us to ...
Read more >MSBuild custom task "Hello World" walkthrough
Can someone write (or link to) a walkthrough that explains exactly how to create a custom MSBuild task and run it during a...
Read more >Implement custom MSBuild tasks and distribute them via NuGet
This is a powerfull technique to share and manage MSBuild tasks (e.g. build scripts, code generators, etc.) in bigger environments (enterprises, ...
Read more >Shipping a cross-platform MSBuild task in a NuGet package
In this post, I'm going walk through the key pieces of how to write an MSBuild task that works on both the .NET...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

There is a ToolTask type that would be worth looking at to see if it helps with these.
It seems like it could be possible to use the minver-cli output instead of needing a separate project.
The fact that there is no way to know the configured log level is rather annoying.
I agree with your assessment that it doesn’t make sense to go ahead and try for a task now just to get rid of
MinVerVerbosity.I’d say this can wait until it’s feasible to actually use LibGit2Sharp directly from an MSBuild task.