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

Unable to add Microsoft.ReactNative to native module project #4211

Closed
dstaley opened this issue Feb 28, 2020 · 4 comments
Closed

Unable to add Microsoft.ReactNative to native module project #4211

dstaley opened this issue Feb 28, 2020 · 4 comments
Labels

Comments

@dstaley
Copy link

dstaley commented Feb 28, 2020

Environment

  1. react-native -v: 0.61.5
  2. npm ls rnpm-plugin-windows:
  3. npm ls react-native-windows: 0.60.0-vnext.133
  4. node -v: v12.15.0
  5. npm -v: 6.13.4
  6. yarn --version:

Then, specify:

  • Target Platform Version(s): 10.0.18362
  • Target Device(s): N/A
  • Visual Studio Version: 16.4.5
  • Build Configuration: N/A

Steps to Reproduce

(Write your steps here:)

  1. Try to add a reference to Microsoft.ReactNative to native module project

Expected Behavior

Reference is added to project

Actual Behavior

An error occurs when attempting to add the reference:

A reference to 'Microsoft.ReactNative' could not be added.
PrimaryWinMDOutputGroup
Parameter name: Output group '{0}' not known or another build error occurred.

image

Additional context

I'm attempting to follow the native module setup guide on the website to add a Windows native module to an existing React Native native modules library.

@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Feb 28, 2020
@namrog84
Copy link
Contributor

namrog84 commented Feb 28, 2020

I see

react-native -v: 0.61.5
npm ls react-native-windows: 0.60.0-vnext.133

The docs you followed might be a little out of date.

I think you need to be on a 61 version of rnw if you are using a 61 version of rn

Which the 61 variant isn't under vnext anymore but beta
e.g. "react-native-windows": "0.61.0-beta.27",

@dstaley
Copy link
Author

dstaley commented Feb 29, 2020

@namrog84 I think that was the issue! After running npm install --no-save react-native-windows@beta and adding the reference it seems to have worked! If I run into any other issues I'll be sure to file a new issue. Please feel free to close this unless it's useful to keep around.

@chrisglein chrisglein removed the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Jul 20, 2020
@meddyrainzo
Copy link

Followed the current setup guide. Getting the same error.

Steps to reproduce

Tried to add a reference to Microsoft.ReactNative

Versions

react-native: 0.62.2

react-native-windows: 0.62.7

Error

A reference to 'Microsoft.ReactNative' could not be added. 
Output group 'PrimaryWinMDOutputGroup' not known or another build error occurred.

@ghost ghost added the Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) label Aug 31, 2020
@meddyrainzo
Copy link

I got it to work by using version 0.63 for both react-native and react-native-windows. I also checked the .sln file in the samples project and compared the missing references to that in the current setup guide

@chrisglein chrisglein removed the Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) label Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants