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

Updates ReactNativeWindowsDir prop in vcxproj to support symlinks properly #2

Open
wants to merge 3 commits into
base: windows
Choose a base branch
from

Conversation

max-pv
Copy link

@max-pv max-pv commented Sep 3, 2021

If a RNW application set up in a monorepo and its dependencies are symlinked into application's node_modules folder, MSBuildThisFileDirectory will point to the original directory of symlynked react-native-windows.

However, when the application (and RNW in the node_modules folder) is built, the artifacts somehow not being copied to the original folder and staying only in the symlinked directory, which breaks the build (Visual Studio can't find Microsoft.ReactNative.winmd file), since MSBuildThisFileDirectory pointing to the original directory.

I think this has something to do with how symlinks work on Windows. Anyway, changing MSBuildThisFileDirectory to SolutionDir fixes this, and ReactNativeWindowsDir is poiting to the symlink location, and not the original directory.

My colleagues and I already made a few contributions adding this fix to other projects, such as react-native-device-infp PR #1279, so hopefully we can have the same fix for this fork of react-native-splash-screen, which will eventually get into the original repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant