Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Distribute the MSBuild internal test helpers as a nuget package #3569

Open
Tracked by #10733
MeikTranel opened this issue Aug 1, 2018 · 4 comments
Open
Tracked by #10733

Distribute the MSBuild internal test helpers as a nuget package #3569

MeikTranel opened this issue Aug 1, 2018 · 4 comments
Labels

Comments

@MeikTranel
Copy link
Contributor

Some of the APIs such as "TestEnvironment", the custom loggers and assertion wrappers could be really helpful for people who distribute Custom MSBuild Tasks / Sdks.

@jeffkl
Copy link
Contributor

jeffkl commented Aug 1, 2018

I have created https://github.com/jeffkl/MSBuildProjectCreator as a test helper and its used in the MSBuildSdks repo:

https://github.com/Microsoft/MSBuildSdks/blob/master/src/CentralPackageVersions.UnitTests/CentralPackageVersionsTests.cs#L80

It does not do everything you mention but it does cover some of it.

@MeikTranel
Copy link
Contributor Author

@jeffkl that does indeed help for some tasks and is definitely a good fit for a smaller projects who struggle with the most basic testing "infrastructure".

But at my workplace we're planning on investing in Custom SDKs and Task Packages on a much larger scale, where an official testing package build alongside the package we're testing would help greatly.

It's kind of an odd feature to have, but i have grown much more fond with the underlying idea since https://github.com/cake-build/cake 's test package. They serve the same basic need really. The application model is so odd/complex, that regular testing workflows and tooling is kinda all over the place for them.

The question to me would be: How much of an additional workload would it be for the product ownership of MSBuild to put this into the hands of some of the consumers. I'm sure the implementation of deployment wouldn't be an issue. Would you expect users of this package to use the package in a way that would drive the already implemented testing framework into places that it wouldn't naturally be (aka requiring APIs that serve no use the actual msbuild tests etc.)

@baronfel
Copy link
Member

Would be lovely to do this - I replicated the helpers in dotnet/sdk#26729 out of a desire to easily assert on logged messages.

@MeikTranel
Copy link
Contributor Author

Hey @baronfel can you do some internal advertising for this to get some PM eyeballs on this?

Maybe we should wrap this in a larger vision and create an official MSBuild task package template - there seems to be much confusion about the entire system - which is why many people still use AfterBuild shell scripts seemingly confused that there even is something like a task that can act in a sane manner from within msbuild.

This discussion really shows this whole dilemma: dotnet/roslyn#57608

Oh wait... you're PM :D:D

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants