Use aliases for references to the setup flow elevated component #189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the pull request
This changes to use aliases for the references to the elevated component, to be able to include both the projection project and the elevated component.
References and relevant issues
Detailed description of the pull request / Additional comments
For the Setup Flow we created a CsWinRT component to communicate with a process that runs elevated. In the main app, this project is used with a reference to the CsWinRT projection, whereas from the elevated process it is used with a direct project reference. If on a project we include both the projection and the project, we get a compilation error due to both projects exposing the same public types.
The previous solution was to include the ElevatedServer project (which included the ElevatedComponent directly) with
ReferenceOutputAssembly
set to false. This prevented the conflict between types, but it caused a bunch other issues, like getting duplicated payload files because the ElevatedServer and the main app both used the same binaries but we didn't get MSBuild to resolve them.This changes to include both projects (projection and the project itself), but adding Aliases to them so that we don't get the type conflict, and when using the types we specify which one we want using
extern alias
.This also sets the right property for using the Publish Profiles from the ElevatedServer to ensure it is self-contained.
Validation steps performed
PR checklist