microsoft / microsoft/react-native-windows

Autolinking should only add the MS.RN.Managed projects to a C++ solution if the app project is source based and there's at least one source based C# lib that will need it to build

Open
#9,582 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Autolinking Area: Native Modules enhancement Workstream: Module Support
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Problem Description

Right now, autolinking will add MS.RN.Managed projects to a C++ app's solution, if C# native modules are detected.

In enabling native modules to consume the M.RN nugets as per #9580, and allowing nuget-based native modules, we'll need to fix autolinking to only insert the projects if the app project is source based and there's at least one source based C# lib that will need it to build

Steps To Reproduce

C++ app with C# dependencies

Expected Results

No response

CLI version

npx react-native --version

Environment
npx react-native info
Target Platform Version

No response

Target Device(s)

No response

Visual Studio Version

No response

Build Configuration

No response

Snack, code example, screenshot, or link to a repository

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Windows autolinking path that adds MS.RN.Managed projects to a C++ solution. Reproduce the case with a C++ app and C# dependencies, then compare source-based and NuGet-based app and library projects. Done means projects are added only for a source-based app with at least one source-based C# library that needs them.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp, react-native
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.