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

Modern .NET Support #20

Merged
merged 38 commits into from
Jan 9, 2024
Merged

Modern .NET Support #20

merged 38 commits into from
Jan 9, 2024

Conversation

shmuelie
Copy link
Owner

Adds proper support for having the server be a modern .NET application. In addition:

  • Change to use CsWin32 instead of manually writing interop code.
  • Added editorconfig
  • Upgraded projects to target C# 12 and .NET8
    • Also updated code style to use C# 12 syntax
  • Updated dependencies
  • Added SupportedOSPlatform attributes to WinRT APIs
  • Added example server using modern .NET
  • Fixes Specified cast is not valid while using as WinRT server on net8.0 #19

@shmuelie shmuelie self-assigned this Dec 27, 2023
Copy link
Collaborator

@Sergio0694 Sergio0694 left a comment

Choose a reason for hiding this comment

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

Just had a quick glance for now. Also don't forget to set <IsAotCompatible>!

src/Directory.Build.props Outdated Show resolved Hide resolved
@@ -0,0 +1,10 @@
[*.{cs,vb}]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider just copying the same editorconfig/etc. files from eg. ComputeSharp?

Copy link
Owner Author

Choose a reason for hiding this comment

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

So much is just copied from ComputeSharp lol. Should make a repo template from it lol

@shmuelie shmuelie changed the title Modern net Modern .NET Support Dec 27, 2023
@shmuelie
Copy link
Owner Author

Just had a quick glance for now. Also don't forget to set <IsAotCompatible>!

Doing so complicates things so I'll make an issue and do so later on 😅

@shmuelie shmuelie merged commit b805a17 into main Jan 9, 2024
8 checks passed
@shmuelie shmuelie deleted the modern-net branch January 9, 2024 05:21
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.

Specified cast is not valid while using as WinRT server on net8.0
2 participants