Skip to content

[WIP] [DRAFT] Implement New Architecture C# template cs-app #15013

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonthysell
Copy link
Contributor

@jonthysell jonthysell commented Aug 5, 2025

Description

This PR adds a new New Architecture C# app template, named cs-app, which attempts to parallel the functionality with the cpp-app template.

This PR is currently a proof-of-concept and should not be checked in yet. It's just a starting point and comes with many caveats:

Steps for making and testing a new app:

  1. Sync locally to this PR branch with git
  2. Run yarn build to build JS changes
  3. Create a new app using the template (outside of the repo directory, use creaternwapp.cmd /linkrnw /t cs-app NewApp)

Working

  1. Able to create a new app using the template and run in Debug from Visual Studio (see screenshot):
    1. Create a new test app as per the steps above
    2. Run yarn start to start metro
    3. Open the solution file in VS 2022
    4. Build Debug x64 (should default to the *.Package project)

Not Working

  1. Building Release in VS 2022 gives build errors, as it suddenly can't find the Microsoft.ReactNative types
  2. Building from the RNW CLI (i.e. run-windows) does not work, giving an error about a missing RuntimeIdentifier (the CLI calls regular msbuild.exe on the solution, not dotnet nor dotnet msbuild)
  3. Auto-linking (i.e. autolink-windows) does not work
  4. Loading C++ native modules, view components probably works, but writing / loading C# modules has not been tested and does not have a complete dev story (i.e. no C# codegen for specs, no [ReactModule] attributes, etc.)

Type of Change

  • New feature (non-breaking change which adds functionality)

Why

Some developers want to build native code in C# rather than C++.

Resolves #14349

What

Created a new cs-app template using the New Arch.

Screenshots

image

Testing

Verified a new app made with the template builds and launches.

Changelog

Should this change be included in the release notes: yes

Created a New Architecture C# template cs-app

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.

Create a New Architecture cs-app template using C# and .NET
1 participant