question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use a custom MSBuild task

See original GitHub issue

This 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:closed
  • Created 5 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
bordingcommented, Nov 23, 2018

involves managing System.Process requires listening to stderr and parsing (I’m not sure how reliable this is)

There is a ToolTask type that would be worth looking at to see if it helps with these.

requires another project sitting between MinVer and MinVer.Lib, and more complex packaging

It seems like it could be possible to use the minver-cli output instead of needing a separate project.

1reaction
bordingcommented, Nov 24, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found