microsoft / react-native-windows

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

Adding quotes around codegen tool executeable path and response file … #14100

Closed Swinkid closed 1 week ago

Swinkid commented 1 week ago

Description

Currently if you run CodeGen / react-native run-windows it will fail If you have a space in your user directory. I.e. in my case my directory was C:\Users\Alex Noble. The space in between Alex and Noble would trick CodeGen executable into thinking it was another parameter. Apologies if this is the wrong way to tackle this issue, new to the react-native-windows project and this is how I solved it on my machine.

Type of Change

Why

Motivation for this change was to allow users who have a space in their user directory to be able to build a c# project.

Resolves [Add Relevant Issue Here]

What

Added quotes around the directories used in the CodeGen Exec

Screenshots

image

Changelog

Should this change be included in the release notes: yes

Fixed issue with managed codegen target failing when run from path with spaces

Microsoft Reviewers: Open in CodeFlow
jonthysell commented 1 week ago

/azp run PR

azure-pipelines[bot] commented 1 week ago
Azure Pipelines successfully started running 1 pipeline(s).
jonthysell commented 1 week ago

@Swinkid Can you run yarn change in the PR branch of your repo, (Select pre-release for the type and pick your commit message as the change message) and then push the commit that's created? Thanks.

Swinkid commented 1 week ago

@jonthysell Done :-)

jonthysell commented 1 week ago

/azp run PR

azure-pipelines[bot] commented 1 week ago
Azure Pipelines successfully started running 1 pipeline(s).
Swinkid commented 1 week ago

@marlenecota @jonthysell Any pointers to fixing this? suggests permission errors on the CI?

  • Build failed with message D:\a_work\1\testcli\example\node_modules\react-native-windows\PropertySheets\Bundle.Common.targets(22,5): error MSB3075: The command "D:\a_work_temp.nuget\packages\microsoft.javascript.hermes\0.1.23\tools\native\release\x86\hermes.exe -emit-binary -out "D:\a_work\1\testcli\example\windows\testcliExample\Bundle\index.windows.bundle.hbc" "D:\a_work\1\testcli\example\windows\testcliExample\Bundle\index.windows.bundle" -O -output-source-map" exited with code 5. Please verify that you have sufficient rights to run this command. [D:\a_work\1\testcli\example\windows\testcliExample\testcliExample.vcxproj]. Check your build configuration.