Skip to content
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

Add MSBuild test-related properties #42404

Merged
merged 5 commits into from
Sep 9, 2024
Merged

Conversation


### IsTestProject

The `IsTestProject` property signifies that a project is a test project. When this property is set to `true`, validation to check if the project references a self-contained executable is disabled. That's because test projects have an `OutputType` of `Exe` but usually call APIs in a referenced executable rather than trying to run. In addition, if a project references a project where `IsTestProject` is set to `true`, the test project isn't validated as an executable reference.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this property do anything else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good question for @Evangelink

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. @nohwnd?

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if it would make sense to group the properties by platform:

  • VSTest
  • Microsoft.Testing.Platform

to make it easy to understand which properties are available in which mode.

I am fine with current setup, I am just trying to put myself in the shoes of someone with basic knowledge in testing "internals".

docs/core/project-sdk/msbuild-props.md Outdated Show resolved Hide resolved

### IsTestProject

The `IsTestProject` property signifies that a project is a test project. When this property is set to `true`, validation to check if the project references a self-contained executable is disabled. That's because test projects have an `OutputType` of `Exe` but usually call APIs in a referenced executable rather than trying to run. In addition, if a project references a project where `IsTestProject` is set to `true`, the test project isn't validated as an executable reference.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is mainly needed for dotnet test scenario and has no impact when using vstest.console.exe. @nohwnd Could you please confirm and give some more details?


### IsTestProject

The `IsTestProject` property signifies that a project is a test project. When this property is set to `true`, validation to check if the project references a self-contained executable is disabled. That's because test projects have an `OutputType` of `Exe` but usually call APIs in a referenced executable rather than trying to run. In addition, if a project references a project where `IsTestProject` is set to `true`, the test project isn't validated as an executable reference.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. @nohwnd?

docs/core/project-sdk/msbuild-props.md Outdated Show resolved Hide resolved
docs/core/project-sdk/msbuild-props.md Outdated Show resolved Hide resolved
docs/core/project-sdk/msbuild-props.md Show resolved Hide resolved
docs/core/project-sdk/msbuild-props.md Show resolved Hide resolved
docs/core/project-sdk/msbuild-props.md Show resolved Hide resolved
Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in reviewing, I was off for a week.

I am wondering if it would make sense to group the properties by platform:

  • VSTest
  • Microsoft.Testing.Platform

to make it easy to understand which properties are available in which mode.

I am fine with current setup, I am just trying to put myself in the shoes of someone with basic knowledge in testing "internals".

@gewarren gewarren mentioned this pull request Sep 9, 2024
6 tasks
@gewarren
Copy link
Contributor Author

gewarren commented Sep 9, 2024

I am wondering if it would make sense to group the properties by platform:

Tracked in #42544.

@gewarren gewarren merged commit ca821ac into dotnet:main Sep 9, 2024
8 checks passed
@gewarren gewarren deleted the props-aug24 branch September 9, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing properties
5 participants