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

Automatically project referenced WinRT components without CsWinRTIncludes #780

Open
Scottj1s opened this issue Mar 26, 2021 · 2 comments
Open
Assignees
Labels
enhancement New feature or request tooling
Milestone

Comments

@Scottj1s
Copy link
Member

Repro sample here:
https://github.com/Scottj1s/ReunionCsAppWithCppRC/blob/22a8792d54a15c3ace13e131808e63300635a7f0/App3/App3/App3.csproj#L6

CsWinRTWindowsMetadata should default to TargetPlatformMinVersion. And CsWinRTIncludes should default to enabling anything which is not expressly in CsWinRTExcludes (Microsoft, Windows).

@Scottj1s Scottj1s added the bug Something isn't working label Mar 26, 2021
@Scottj1s Scottj1s changed the title Adding a C++ runtime component to a C# app requires unnecessary project properties Project Reunion: Adding a C++ runtime component to a C# app requires unnecessary project properties Mar 26, 2021
@angelazhangmsft
Copy link
Contributor

angelazhangmsft commented Mar 29, 2021

#657 closes CsWinRTWindowsMetadata issue

@angelazhangmsft angelazhangmsft added this to the Release 1.1.6 milestone Mar 29, 2021
@angelazhangmsft angelazhangmsft added the pri-2 Non-critical bugs/acceptable workaround label Apr 22, 2021
@angelazhangmsft angelazhangmsft added the enhancement New feature or request label Jul 20, 2021
@angelazhangmsft angelazhangmsft modified the milestones: Release 1.3.2, Future Jul 20, 2021
@angelazhangmsft angelazhangmsft changed the title Project Reunion: Adding a C++ runtime component to a C# app requires unnecessary project properties Automatically project referenced WinRT components with CsWinRTIncludes Jan 5, 2022
@angelazhangmsft angelazhangmsft added tooling and removed bug Something isn't working pri-2 Non-critical bugs/acceptable workaround labels Jan 5, 2022
@Scottj1s Scottj1s changed the title Automatically project referenced WinRT components with CsWinRTIncludes Automatically project referenced WinRT components without CsWinRTIncludes Mar 17, 2022
@lukasf
Copy link

lukasf commented Oct 24, 2022

I think this is very much needed. With C++/WinRT being a first class citizen in the Microsoft techstack, we need smooth tech interop as is expected and available on all other Microsoft languages/technologies. It's ok to require adding a NuGet to allow interop from C++/WinRT to .NET Core. But additionally requiring manual editing of project files does not make sense.

If no inputs are explicitly configured, CsWinRT should generate and compile projection headers for all referenced winmd projects. It should be as easy as that. Add CsWinRT nuget, add your C++\WinRT project references, and things should just work.

One more thing to make the above vision work would be automatically moving referenced binaries into the expected place (not directly into the project output folder, but into runtimes\win10-\native). This would allow us to get rid of the intermediate NuGet packages and directly work with project references. Having to create NuGets inside the develop+debug loop is a productivity nightmare. But I will open a separate issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tooling
Projects
None yet
Development

No branches or pull requests

4 participants