-
Notifications
You must be signed in to change notification settings - Fork 258
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
Support DataSourceAttribute on .NET 6 and later #4074
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea for .NET Core support was to ship extra NuGet packages to not force deps on things most devs would not use. Furthermore, the current System.Data.*
packages are windows only and it's possible we would want to ship some different implementation. Something along the lines of MSTest.DataSource.Oledb
or MSTest.Data.Oledb
WDYT?
I'll need to investigate a bit how we can have this kind of extensibility. This needs a bit of design. To move the logic to a separate package and have the dependency inverted, the new package has to somehow tell the TestAdapter what it needs to do. For example, the new package could say, Then when we encounter a DataSourceAttribute in TestAdapter, we could look over the registered lambdas and try one by one until one resolver succeeds. The question is, what's the best way to have this new package do the registration. Or maybe there is a completely different approach that is better than what I have in mind? @Evangelink what do you think? |
I agree with Amaury here. I also don't think we should need anything special from the nuget, it should just normally extend the ITestDataSource interface, like DataRow or DynamicData does: e.g. This allows us to split the deps among their respective nugets, and the nuget is super standard, it just brings the lib into compilation, and is "registered" by being used on a test. |
@nohwnd The problem with that is it's not going to be compatible with what's already working on .NET Framework (i.e, it will be a new attribute) |
I don't see the problem in that, it has not been working on .NET core until now, so users either don't have a solution or will have to do some change. And it is a design that is more aligned with what we have right now. But feel free to prove me wrong :) |
Starting discussion in #4092 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes as we are going into a different direction. Let me know if you want to keep this one open for some time while we define the rest of the work.
I think we can close for now yes. If we wanted it back, it's there :) |
Fixes #233