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

0.77 Build Error - LNK1161 Cannot Open İnput File Error #14358

Open
kudretyilmazz opened this issue Feb 20, 2025 · 2 comments
Open

0.77 Build Error - LNK1161 Cannot Open İnput File Error #14358

kudretyilmazz opened this issue Feb 20, 2025 · 2 comments
Assignees
Labels
bug Developer First Experience Issues that are going to be hit by a new developer as they first try out RNW New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric Scenario: NuGet Workstream: New Arch NuGet Refactor Create new architecture NuGet packages that exclude old architecture types and dependencies.
Milestone

Comments

@kudretyilmazz
Copy link

kudretyilmazz commented Feb 20, 2025

Problem Description

I downloaded the Fabric Calculator example. Then I added the npm packages I needed to it. I can build my project on the Android emulator without any problems. However, I could not run it on windows in any way. I have been trying to solve the problem for days.

The error I get:
:heavy_multiplication_x: Building Solution :heavy_multiplication_x: Build failed with message LINK : fatal error LNK1181: cannot open input file 'C:\Users\kyilmaz\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\buildTransitive\native\..\..\lib\win10-\Microsoft.WindowsAppRuntime.Bootstrap.lib' [C:\Users\kyilmaz\Desktop\kiosk\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]. Check your build configuration.

Steps To Reproduce

Download Fabric Calculator sample
Add some npm packages
yarn windows (npx @react-native-community/cli run-windows)
error

Expected Results

succesfull build

CLI version

15.0.1

Environment

System:
  OS: Windows 10 10.0.19045
  CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-11390H @ 3.40GHz
  Memory: 7.68 GB / 15.75 GB
Binaries:
  Node:
    version: 18.20.6
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.22
    path: ~\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 10.8.2
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Enabled
    Versions:
      - 10.0.18362.0
      - 10.0.19041.0
      - 10.0.22000.0
      - 10.0.22621.0
      - 10.0.26100.0
IDEs:
  Android Studio: AI-242.23339.11.2421.12483815
  Visual Studio:
    - 17.11.35327.3 (Visual Studio Community 2022)
Languages:
  Java:
    version: 17.0.13
    path: C:\Program Files\Microsoft\jdk-17.0.13.11-hotspot\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.77.0
    wanted: 0.77.0
  react-native-windows:
    installed: 0.77.0
    wanted: ^0.77.0
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Community Modules

"@react-native-async-storage/async-storage": "^2.1.0",
"@react-native-community/netinfo": "^11.4.1",
"@react-navigation/elements": "^2.2.5",
"@react-navigation/native": "^7.0.14",
"@react-navigation/native-stack": "^7.2.0",
"@reduxjs/toolkit": "^2.5.0",
"@tanstack/react-query": "^5.64.2",
"axios": "^1.7.9",
"babel-plugin-inline-dotenv": "^1.7.0",
"date-fns": "^4.1.0",
"lottie-react-native": "^7.2.2",
"react": "18.3.1",
"react-native": "0.77.0",
"react-native-device-info": "^14.0.2",
"react-native-gesture-handler": "^2.22.0",
"react-native-reanimated": "^3.16.7",
"react-native-safe-area-context": "^5.2.0",
"react-native-screens": "^4.6.0",
"react-native-svg": "^15.11.1",
"react-native-windows": "^0.77.0",
"react-redux": "^9.2.0",
"redux-persist": "^6.0.0",
"zod": "^3.24.1"

Target Platform Version

10.0.22000

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2022

Build Configuration

Debug

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

:heavy_multiplication_x: Building Solution :heavy_multiplication_x: Build failed with message LINK : fatal error LNK1181: cannot open input file 'C:\Users\kyilmaz\.nuget\packages\microsoft.windowsappsdk\1.6.240923002\buildTransitive\native\..\..\lib\win10-\Microsoft.WindowsAppRuntime.Bootstrap.lib' [C:\Users\kyilmaz\Desktop\kiosk\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]. Check your build configuration.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Feb 20, 2025
@chrisglein chrisglein added the New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric label Feb 24, 2025
@chrisglein chrisglein added Developer First Experience Issues that are going to be hit by a new developer as they first try out RNW Scenario: NuGet Workstream: New Arch NuGet Refactor Create new architecture NuGet packages that exclude old architecture types and dependencies. and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Feb 24, 2025
@chrisglein chrisglein added this to the Next milestone Feb 24, 2025
@chrisglein
Copy link
Member

Question. Before this step:

Add some npm packages

When you'd just downloaded the calculator sample. Did it build then?

Most modules don't have support for the new architecture on Windows yet. Some in your list are okay (like SVG and async-storage). But many of the rest are not (lottie, screens, etc.).

What looks like it's happening is that instead of getting the pre-build nuget for RNW, based on some of those modules it's unable to use the nuget and then trying to build Microsoft.ReactNative.vcxproj, which is why the failure is coming from there. But the root problem is incompatibility of the modules with the new arch.

So @kudretyilmazz that's what's going on, if that helps unblock you in the meantime.

There may have been some warnings emitted due to the misalignment of module projects, but that might not have been prominent enough. We anticipate many people are going to end up in your situation in the coming months (trying out new arch, but wanting to use modules that aren't supported yet).

If the app project is set to new arch but the module isn't set to say it explicitly supports new arch, there should be some kind of more obvious warning/error. The solution to this may be somewhere in autolinking. @jonthysell FYI.

@kudretyilmazz
Copy link
Author

hi @chrisglein

Thank you for your interest and opinion. My project was in version 0.73.4, svg images were not displayed (no warning message). I thought that updating to the new version would solve the problem. Looks like I will have to go back to version 0.73.4 and deal with the svg problem again.

Thanks again for your help and your efforts for react-native-windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Developer First Experience Issues that are going to be hit by a new developer as they first try out RNW New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric Scenario: NuGet Workstream: New Arch NuGet Refactor Create new architecture NuGet packages that exclude old architecture types and dependencies.
Projects
None yet
Development

No branches or pull requests

3 participants