You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the newest version, a static method with the same name as in the base class (AssemblyInitialize) gives the warning warning MSTEST0036: Member 'AssemblyInitialize' already exists in the base class.
However, since the base class is coming from another assembly, the AssemblyInitialize must be repeated (and we are forwarding the call to the base class). Renaming the method of course worked.
Steps To Reproduce
Create two test projects
Create test class Class1 with static AssemblyInitialize and AssemblyInitialize attribute in project1.
Create test class inheriting Class1 with AssemblyInitialize method and attribute.
Expected behavior
I personally would expect that the static methods with assembly initialize attribute would be ignored in the analyzer, or that the AssemblyInitialize would work when used from another project...
Actual behavior
Warning is shown.
Additional context
Not required, I think it's clear.
The text was updated successfully, but these errors were encountered:
Thanks for feedback, the shadowing happens even across different assemblies, so having the same assemblyInit function should add the warning. you can change naming
Describe the bug
When using the newest version, a static method with the same name as in the base class (AssemblyInitialize) gives the warning
warning MSTEST0036: Member 'AssemblyInitialize' already exists in the base class
.However, since the base class is coming from another assembly, the AssemblyInitialize must be repeated (and we are forwarding the call to the base class). Renaming the method of course worked.
Steps To Reproduce
Expected behavior
I personally would expect that the static methods with assembly initialize attribute would be ignored in the analyzer, or that the AssemblyInitialize would work when used from another project...
Actual behavior
Warning is shown.
Additional context
Not required, I think it's clear.
The text was updated successfully, but these errors were encountered: