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

Use aliases for references to the setup flow elevated component #189

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Use aliases for references to the setup flow elevated component #189

merged 2 commits into from
Apr 11, 2023

Conversation

florelis
Copy link
Member

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

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

@florelis
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bbonaby bbonaby requested review from manodasanW and bbonaby April 11, 2023 00:40
@florelis
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@florelis florelis merged commit 7d38e31 into microsoft:main Apr 11, 2023
@florelis florelis deleted the references branch April 11, 2023 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants