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

Fix publishing in VS when runtime identifier in publishing profile differs from project rid #4205

Merged
merged 5 commits into from
Mar 19, 2021

Conversation

ryalanms
Copy link
Member

Description

1: In Visual Studio, publishing with a publishing profile that contains a runtime identifier which differs from the runtime identifier in the project results in a publish failure.

In this scenario, VS overrides 'ProjectToOverrideProjectExtensionsPath'. The parent WPF project must set the MSBuildProjectExtensionsPath of the child project. (See Sdk.props:35).

2: A Directory.Build.Props that uses MSBuildProjectName to set IntermediateOutputPath will cause the temporary local type assembly to not be found.

The parent targets assumes the assembly will be placed in the IntermediateOutputPath of the parent, not the IntermediateOutputPath of the child project. Return the assembly location from _CompileTemporaryAssembly so these paths no longer need to match.

Customer Impact

Breaks some publishing profiles in VS and a fairly common usage of directory.build.props for solutions with a large number of projects.

Regression

Yes. This is a regression when PackageReference support in WPF is enabled.

Testing

Repro'd the publish failure in VS, applied the change, and verified publishing was working.

Repro'd the missing assembly, applied the change, and verified the project compiled.

@ryalanms ryalanms requested a review from a team as a code owner February 22, 2021 21:07
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Feb 22, 2021
@ghost ghost requested review from fabiant3 and SamBent February 22, 2021 21:07
@ryalanms ryalanms merged commit 0221800 into main Mar 19, 2021
@vishalmsft vishalmsft deleted the publish.bug branch February 15, 2022 05:33
@ghost ghost locked as resolved and limited conversation to collaborators Apr 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage WindowsDesktop SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants