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

Add NuGet AssetTargetFallback #578

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MaxPMagee
Copy link

I'm taking a stab at resolving the issue
microsoft/react-native-windows#10059 (comment)

Summary

Currently, RNDocumentPicker doesn't build against react-native 0.69.1/react-native-windows 0.69.1 because of a bug in the way that r-n-w handles older dependencies (built with a previous target version)—see the discussion on the thread mentioned above.

One of the suggestions was to update the csproj's AssetTargetFallback handling, which is what this PR does.

I'm hoping this PR will resolve #562

Test Plan

I can't figure out how to build the RNDocumentPicker project on my vscode 2019 (and I could use some help verifying that this PR resolves the 0.69.1 issues). For now, I'm punting and asking for someone who knows how to build/deploy to try building this so I can see if it resolves the issues.

What's required for testing (prerequisites)?

Try to build a UWP app that references RNDocumentPicker with react-native-windows 0.69.1 and no longer see builds fail due to issue 562.

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS
Android
WINDOWS!

Checklist

  • [❌] I have tested this on a device and a simulator - Need help with this part
  • [ ] I added the documentation in README.md
  • [ ] I updated the typed files (TS and Flow)

I'm getting 1>...\react-native-document-picker\windows\ReactNativeDocumentPicker\ReactNativeDocumentPicker.csproj(144,5): error : This project references targets in your node_modules\react-native-windows folder that are missing. The missing file is \node_modules\react-native-windows\\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpLib.props. and have no clue where or how to resolve that, for the project.

@tero-paananen
Copy link

AssetTargetFallback is removed, it was not needed then? Does this really build?

@tero-paananen
Copy link

tero-paananen commented Aug 2, 2022

My C# module builds with this kind of hacks on c# app (react-native-windows 0.68)

    <TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
    <TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
    
    <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
    <WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>

 <PropertyGroup Label="NuGet">
    <AssetTargetFallback>$(AssetTargetFallback);native</AssetTargetFallback>
  </PropertyGroup>

but i am not really sure what is valid solution.

EDIT: this is not yet final solution to get c# module build on c# app

EDIT: some kind of solution found microsoft/react-native-windows#10059 (comment)

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