Skip to content

Fix test projects which reference self-contained Exes #17594

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

dsplaisted
Copy link
Member

@dsplaisted dsplaisted commented May 13, 2021

Fix #17579

Description

In #15134, we added an error when a self-contained app references a non self-contained app, or vice versa. This is because if you are trying to get copies of both apps in the output folder, they won't both work.

However, I didn't consider that test projects are also use the Exe OutputType. So with that change, test projects which reference Exe projects which were self-contained would fail to build.

Customer Impact

Test projects referencing Exe projects (fairly common, especially for Web projects) which were self-contained (not as common, but enough that at least two projects hit this bug in the preview) would fail to build. This could be worked around by setting the ValidateExecutableReferencesMatchSelfContained property to false, but developers would have to look through our MSBuild code or search for help on the internet to figure out they needed to do that.

Regression?

  • Yes
  • No

Regressed from 5.0.2xx and prior behavior in #15134.

Risk

  • High
  • Medium
  • Low

[Justify the selection above]

The change is to disable the error check for unit test projects, and is a simple code change.

Verification

  • Manual (required)
  • Automated

Added test cases covering failing scenario

Packaging changes reviewed?

  • Yes
  • No
  • N/A

Addresses [issue number]
#17579

@ghost
Copy link

ghost commented May 13, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@dsplaisted dsplaisted requested a review from a team May 13, 2021 00:16
@sfoslund
Copy link
Member

@dsplaisted I was going to try to prep a build for insertion today, do we need to wait for this PR to do that?

@dsplaisted
Copy link
Member Author

@sfoslund We're going to take this to tactics today, so yes hold off until after that. Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants