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

CsWinRT/WinUI Authoring Support #1111

Merged
merged 27 commits into from
Mar 9, 2022
Merged

CsWinRT/WinUI Authoring Support #1111

merged 27 commits into from
Mar 9, 2022

Conversation

j0shuams
Copy link
Contributor

@j0shuams j0shuams commented Feb 18, 2022

This PR includes changes to our authoring targets that fix gaps in our WinUI support. The issue we were seeing was with native apps referencing cswinrt components; the managed projection binaries the component depended on (e.g. Microsoft.WinUI.dll) were not being copied to the output folder of the native app. We leverage the item group AllItemsFullPathWithTargetPath to place the binaries correctly. This also removes some of the logic we were using to place CsWinRT binaries like WinRT.Runtime, as the new target will handle that for us.

Because we ship a WinRT.Runtime.dll and the .NET SDK also has its own version, we explicitly pick the dll with the latest version for copying.

This has been tested using Windows App SDK 1.1 (experimental build) and VS2022.

@j0shuams j0shuams requested a review from manodasanW February 18, 2022 00:31
@j0shuams
Copy link
Contributor Author

Should review/revise the authoring.md docs

@j0shuams
Copy link
Contributor Author

j0shuams commented Mar 1, 2022

This should address #694

@asklar Take a look if you get a chance and think there's more useful clarifications to be made!

@j0shuams j0shuams linked an issue Mar 1, 2022 that may be closed by this pull request
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
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
@asklar
Copy link
Member

asklar commented Mar 2, 2022

thanks @j0shuams !

Because we ship a WinRT.Runtime.dll and the .NET SDK also has its own version, we explicitly pick the dll with the latest version for copying.

Is there an expectation that there are no ABI changes between different versions of this binary? IOW is it always safe to swap one WinRT.Runtime for another?

docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved

**Note:** With C#/WinRT 1.3.5 or later, project references to a C#/WinRT component require .NET 6.
```xml
<?xml version="1.0" encoding="utf-8"?>
Copy link
Member

Choose a reason for hiding this comment

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

does the manifest not need a <supportedOS> entry for unpackaged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not aware of this, perhaps thats why the unpackged scenario doesn't work? When I made the unpackaged scenario I followed the docs here.

Copy link
Member

Choose a reason for hiding this comment

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

I think the docs are missing some scenarios. I had filed this: MicrosoftDocs/windows-dev-docs#3691
Also this MicrosoftDocs/windows-dev-docs#3695
@JesseCol fyi

Copy link
Member

Choose a reason for hiding this comment

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

also @stevewhims for context

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 force-pushed the jlarkin/authoring branch from af8cd6b to 02d8398 Compare March 3, 2022 23:12
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 Show resolved Hide resolved
docs/authoring.md Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Outdated Show resolved Hide resolved
docs/authoring.md Show resolved Hide resolved
docs/authoring.md Show resolved Hide resolved
@j0shuams j0shuams merged commit b8cfff0 into master Mar 9, 2022
@j0shuams j0shuams deleted the jlarkin/authoring branch March 9, 2022 06:29
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.

Authoring guide - integration with WinUI packaged desktop apps
4 participants