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

Can't build a RNW project with Visual Studio 2022 17.1 #9559

Closed
qmatteoq opened this issue Feb 16, 2022 · 2 comments · Fixed by #9562
Closed

Can't build a RNW project with Visual Studio 2022 17.1 #9559

qmatteoq opened this issue Feb 16, 2022 · 2 comments · Fixed by #9562

Comments

@qmatteoq
Copy link
Contributor

Problem Description

Since I upgraded my Visual Studio 2022 installation to 17.1, I can't compile anymore any React Native for Windows project. I always get the following error during the build process of the Microsoft.ReactNative project:

C:\src\VS2022\node_modules\react-native-windows\Mso\dispatchQueue\dispatchQueue.h(728,17): error C2607: static assertion failed
C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(486,5): error MSB4181: The "CompileXaml" task returned false but did not log an error.

The same project compiled with Visual Studio 2019 builds fine.

Steps To Reproduce

  1. Create a new RNW project based on RN 0.67
  2. Open the solution inside the windows folder with Visual Studio 2022 17.1
  3. Build the Microsoft.ReactNative project

Expected Results

The solution can be compiled without errors

CLI version

6.4.0

Environment

System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
    Memory: 2.09 GB / 15.60 GB
  Binaries:
    Node: 14.18.3 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Enabled
      AllowAllTrustedApps: Enabled
      Versions: 10.0.17134.0, 10.0.17763.0, 10.0.18362.0, 10.0.19041.0, 10.0.22000.0
  IDEs:
    Android Studio: Not Found
    Visual Studio: 16.11.32126.315 (Visual Studio Enterprise 2019), 17.2.32210.308 (Visual Studio Enterprise 2022), 17.1.32210.238 (Visual Studio Enterprise 2022)
  Languages:
    Java: 11.0.14 - C:\Program Files\Microsoft\jdk-11.0.14.9-hotspot\bin\javac.EXE
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.67.2 => 0.67.2
    react-native-windows: 0.67.1 => 0.67.1
  npmGlobalPackages:
    *react-native*: Not Found

Target Platform Version

10.0.19041

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2022

Build Configuration

Debug

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

No response

@qmatteoq qmatteoq added the bug label Feb 16, 2022
@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Feb 16, 2022
@ghost ghost closed this as completed in #9562 Feb 17, 2022
@chrisglein chrisglein added Area: Build Infrastructure Area: Developer Experience and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Feb 17, 2022
@chrisglein chrisglein added this to the 0.68 milestone Feb 17, 2022
@markokhman
Copy link

I have a same problem. Any ideas how to resolve it?

@ghost ghost added the Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) label Mar 21, 2022
@chrisglein
Copy link
Member

I have a same problem. Any ideas how to resolve it?

I believe the merged fix above would have gone into the 0.68 release (currently in preview). So you could update to point to that preview, spot fix it yourself with that commit, use an older version of VS, or wait. If you're seeing a different problem afterwards, open a new issue that contains your environment info.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants