microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.01k stars 1.13k forks source link

Autolinking for C++ projects only generates AutolinkedNativeModules.g.cpp, not the header file #13174

Open jonthysell opened 2 weeks ago

jonthysell commented 2 weeks ago

Problem Description

The header file is necessary, and while it doesn't really change when autolinking is run, autolinking should still (re)create the file, as it may have been deleted by the end user (or missing for another reason) and we claim in the file that it gets generated by the autolink command, when it clearly isn't.

Steps To Reproduce

  1. Create a new C++ RNW project.
  2. Delete AutolinkedNativeModules.g.h
  3. Run autolink-windows or run-windows

Expected Results

The file gets recreated.

CLI version

npx react-native -v

Environment

npx react-native info

Target Platform Version

None

Target Device(s)

No response

Visual Studio Version

None

Build Configuration

None

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

No response

jonthysell commented 2 weeks ago

This bug was found by our partners in Xbox.