We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The same setup as in #2683 results in MSTEST0005: Test context property should have valid layout.
MSTEST0005: Test context property should have valid layout
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @avivanoff
Can you please add a code sample that produces MSTEST0005 in the issue description directly? Thanks
Sorry, something went wrong.
@Youssef1313, sample project.
The best workaround for this is to use the following:
[DeploymentItem("SomeItem.txt")] [TestClass] public abstract class TestBase { protected TestBase(TestContext testContext) { this.TestContext = testContext; } protected TestContext TestContext { get; } }
instead of this:
[DeploymentItem("SomeItem.txt")] [TestClass] public abstract class TestBase { private readonly TestContext _testContext; protected TestBase(TestContext testContext) { this._testContext = testContext; } protected TestContext TestContext { get => this._testContext; } }
Meanwhile, we will investigate if we can eliminate this false positive.
Youssef1313
Successfully merging a pull request may close this issue.
The same setup as in #2683 results in
MSTEST0005: Test context property should have valid layout
.The text was updated successfully, but these errors were encountered: