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 targets for hosting support #665

Merged
merged 19 commits into from
Jan 15, 2021
Merged

Add targets for hosting support #665

merged 19 commits into from
Jan 15, 2021

Conversation

j0shuams
Copy link
Contributor

@j0shuams j0shuams commented Jan 13, 2021

Summary

This PR contains a new file in our nuget directory - Microsoft.Windows.CsWinRT.Authoring.targets. This file handles the binplacement of DLLs needed for hosting authored components. This file is used in changes to Microsoft.Windows.CsWinRT.targets, introduced in this PR to properly package an authored component. We package the Authoring.targets file as AuthoredComponent.CsWinRT.targets for any authored component. Details can be found in the authoring docs (also updated in this pr).

For the packaging, I needed to use better paths for the arch-specific dlls (hence the changes to the CsWinRT.nuspec). This raised issues where references to the WinRt.Host.dll showed up just by a package reference to cswinrt, so I've added reference removals of this for the general case of CsWinRT usage to the target CsWinRTRemoveHostingDllReferences.

Testing

I have been using a C# winrt component in a C++ app and was able to do a successful end-to-end test with this configuration. Link here

Related issues

Closes #474 and part of #663

docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved
Copy link
Member

@Scottj1s Scottj1s left a comment

Choose a reason for hiding this comment

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

nice! just a few tweaks

docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved
@j0shuams j0shuams merged commit 15942b3 into master Jan 15, 2021
@j0shuams j0shuams deleted the jlarkin/nuget-targets branch January 15, 2021 21:45
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.

Add WinRT.Host to nuget package for C# authoring
4 participants