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.

Package validation and interface inheritance problem

See original GitHub issue

Problem

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:open
  • Created a year ago
  • Reactions:2
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
hudecekdcommented, Jun 22, 2022

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

0reactions
Eiloncommented, Jun 22, 2022

@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 😁

Read more comments on GitHub >

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

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