Package validation and interface inheritance problem
See original GitHub issueProblem
Greetings,
we use package validation which is great and currently we are facing issue (maybe it is feature).
We have extended our interface from IBackgroundTaskQueue
to IBackgroundTaskQueue : IDisposable
.
I would expect that when we try to make package it shows error since we introduced new required metho Dispose
which has
to be implemented in class which implements this interface.
But there is no error. It seems odd to me since if I add some method to interface directly it shows error such as
error CP0006: Cannot add interface member 'IBackgroundTaskQueue.Test()' to lib/netstandard2.1/XXX.dll because it does not exist on [Baseline] lib/netstandard2.1/XXX.dll
Thanks for advice Dusan Hudecek
Current behavior
No error package builds and package validation reports NO error.
Expectation
I would expect that error similar to CP0006 is shown.
sdk
.NET 6
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Design of inheritance for Validate interfaces - java
As simple solution to the "can an object be validated" problem is to add a third interface.
Read more >Mastering TypeScript: Inheritance and Validation Made Easy
The validation logic is encapsulated within each derived class, ensuring that the base User class remains as generic as possible while still ...
Read more >c# - Why is an interface used rather than inheritance?
In c# you can inherit many interfaces, but only one base class. Inheritance has lost popularity as a method of sharing code against...
Read more >Method validation and inheritance - feedback needed!
One question the EG currently is discussing is whether and, if so, how a refinement of method constraints should be allowed in sub-types....
Read more >Is it true that inheritance isn't used that much in regular ...
We are going over inheritance right now, and the course material says "you'll find that inheritance is not as common as you think...
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 FreeTop 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
Top GitHub Comments
Hi @Eilon , shouldn’t your discussion have its own issue? it seems that all comments now are not about the original problem but about Fabricbot and it can make issue comments not clear since they are not related to issue. Thanks
@hudecekd you know what, I never even noticed what the original issue here was because I was only responding to individual comments 😄 Anyway, I logged https://github.com/dotnet/sdk/issues/26166 to track creating automation rules, and I’ve hidden the irrelevant comments from this issue. Thanks for keeping us honest 😁