microsoft / react-native-windows

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

Unable to build project of visual studio 2017 #1593

Closed setsuna closed 6 years ago

setsuna commented 6 years ago

Environment

  1. react-native -v: react-native-cli: 2.0.1 react-native: 0.52.0
  2. npm ls rnpm-plugin-windows:rnpm-plugin-windows@0.2.8
  3. npm ls react-native-windows:react-native-windows@0.52.0-rc.0
  4. node -v:8.9.4
  5. npm -v:5.6.0
  6. yarn --version:1.3.2

Then, specify:

Steps to Reproduce

(Write your steps here:)

1.react-native init Meeting 2.yarn add rnpm-plugin-windows --dev 3.react-native windows 4.react-native run-windows

Expected Behavior

New project unable build

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Add screenshots!) Build started: Project: ReactNativeWebViewBridge, Configuration: Debug x86 ------ 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.nuget.props(16,5): warning MSB4011: "C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\microsoft.net.native.sharedlibrary-x86\1.7.0\build\Microsoft.Net.Native.SharedLibrary-x86.props" cannot be imported again. It was already imported at "F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\obj\ReactNativeWebViewBridge.csproj.nuget.g.props (16,5)". This is most likely a build authoring error. This subsequent import will be ignored. [F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.csproj] 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.nuget.props(17,5): warning MSB4011: "C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\microsoft.net.native.sharedlibrary-x64\1.7.0\build\Microsoft.Net.Native.SharedLibrary-x64.props" cannot be imported again. It was already imported at "F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\obj\ReactNativeWebViewBridge.csproj.nuget.g.props (17,5)". This is most likely a build authoring error. This subsequent import will be ignored. [F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.csproj] 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.nuget.props(18,5): warning MSB4011: "C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\microsoft.net.native.sharedlibrary-arm\1.7.0\build\Microsoft.Net.Native.SharedLibrary-arm.props" cannot be imported again. It was already imported at "F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\obj\ReactNativeWebViewBridge.csproj.nuget.g.props (18,5)". This is most likely a build authoring error. This subsequent import will be ignored. [F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.csproj] 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\obj\ReactNativeWebViewBridge.csproj.nuget.g.targets(7,5): warning MSB4011: "C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\microsoft.net.native.sharedlibrary-x86\1.7.0\build\Microsoft.Net.Native.SharedLibrary-x86.targets" cannot be imported again. It was already imported at "F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.nuget.targets (7,5)". This is most likely a build authoring error. This subsequent import will be ignored. [F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.csproj] 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\obj\ReactNativeWebViewBridge.csproj.nuget.g.targets(8,5): warning MSB4011: "C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\microsoft.net.native.sharedlibrary-x64\1.7.0\build\Microsoft.Net.Native.SharedLibrary-x64.targets" cannot be imported again. It was already imported at "F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.nuget.targets (8,5)". This is most likely a build authoring error. This subsequent import will be ignored. [F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.csproj] 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\obj\ReactNativeWebViewBridge.csproj.nuget.g.targets(9,5): warning MSB4011: "C:\Program Files (x86)\Microsoft SDKs\NuGetPackagesFallback\microsoft.net.native.sharedlibrary-arm\1.7.0\build\Microsoft.Net.Native.SharedLibrary-arm.targets" cannot be imported again. It was already imported at "F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.nuget.targets (9,5)". This is most likely a build authoring error. This subsequent import will be ignored. [F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\ReactNativeWebViewBridge.csproj] 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(8,12,8,25): error CS0246: The type or namespace name 'AssemblyTitleAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(8,12,8,25): error CS0246: The type or namespace name 'AssemblyTitle' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(9,12,9,31): error CS0246: The type or namespace name 'AssemblyDescriptionAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(9,12,9,31): error CS0246: The type or namespace name 'AssemblyDescription' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(10,12,10,33): error CS0246: The type or namespace name 'AssemblyConfigurationAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(10,12,10,33): error CS0246: The type or namespace name 'AssemblyConfiguration' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(11,12,11,27): error CS0246: The type or namespace name 'AssemblyCompanyAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(11,12,11,27): error CS0246: The type or namespace name 'AssemblyCompany' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(12,12,12,27): error CS0246: The type or namespace name 'AssemblyProductAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(12,12,12,27): error CS0246: The type or namespace name 'AssemblyProduct' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(13,12,13,29): error CS0246: The type or namespace name 'AssemblyCopyrightAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(13,12,13,29): error CS0246: The type or namespace name 'AssemblyCopyright' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(14,12,14,29): error CS0246: The type or namespace name 'AssemblyTrademarkAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(14,12,14,29): error CS0246: The type or namespace name 'AssemblyTrademark' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(15,12,15,27): error CS0246: The type or namespace name 'AssemblyCultureAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(15,12,15,27): error CS0246: The type or namespace name 'AssemblyCulture' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(27,12,27,27): error CS0246: The type or namespace name 'AssemblyVersionAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(27,12,27,27): error CS0246: The type or namespace name 'AssemblyVersion' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(28,12,28,31): error CS0246: The type or namespace name 'AssemblyFileVersionAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(28,12,28,31): error CS0246: The type or namespace name 'AssemblyFileVersion' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(29,12,29,22): error CS0246: The type or namespace name 'ComVisibleAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(29,12,29,22): error CS0246: The type or namespace name 'ComVisible' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\Setsuna\AppData\Local\Temp.NETCore,Version=v5.0.AssemblyAttributes.cs(4,20,4,26): error CS0400: The type or namespace name 'System' could not be found in the global namespace (are you missing an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(8,26,8,52): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(9,32,9,34): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(10,34,10,36): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(11,28,11,30): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(12,28,12,54): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(13,30,13,49): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(14,30,14,32): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(15,28,15,30): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(27,28,27,37): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(28,32,28,41): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(29,23,29,28): error CS0518: Predefined type 'System.Boolean' is not defined or imported 1>C:\Users\Setsuna\AppData\Local\Temp.NETCore,Version=v5.0.AssemblyAttributes.cs(4,71,4,94): error CS0518: Predefined type 'System.String' is not defined or imported 1>C:\Users\Setsuna\AppData\Local\Temp.NETCore,Version=v5.0.AssemblyAttributes.cs(4,96,4,116): error CS0246: The type or namespace name 'FrameworkDisplayName' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\Setsuna\AppData\Local\Temp.NETCore,Version=v5.0.AssemblyAttributes.cs(4,119,4,147): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(1,7,1,13): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(1,7,1,13): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(2,7,2,13): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\Properties\AssemblyInfo.cs(3,7,3,13): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\Setsuna\AppData\Local\Temp.NETCore,Version=v5.0.AssemblyAttributes.cs(2,7,2,13): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) 1>C:\Users\Setsuna\AppData\Local\Temp.NETCore,Version=v5.0.AssemblyAttributes.cs(3,7,3,13): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\MessagePostedEventArgs.cs(6,25,6,47): error CS0518: Predefined type 'System.Object' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\MessagePostedEventArgs.cs(17,16,17,19): error CS0518: Predefined type 'System.Int32' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\MessagePostedEventArgs.cs(22,16,22,22): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\MessagePostedEventArgs.cs(8,41,8,44): error CS0518: Predefined type 'System.Int32' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\MessagePostedEventArgs.cs(8,50,8,56): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\MessagePostedEventArgs.cs(8,9,12,10): error CS0518: Predefined type 'System.Void' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(10,6,10,17): error CS0518: Predefined type 'System.Object' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(10,6,10,17): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(10,6,10,17): error CS0518: Predefined type 'System.Void' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(11,25,11,38): error CS0518: Predefined type 'System.Object' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(27,22,27,58): error CS0518: Predefined type 'System.Object' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(27,22,27,58): error CS0246: The type or namespace name 'EventHandler<>' could not be found (are you missing a using directive or an assembly reference?) 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(27,35,27,57): error CS0518: Predefined type 'System.Object' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(27,59,27,72): error CS0518: Predefined type 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(27,59,27,72): error CS0518: Predefined type 'System.Void' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(33,33,33,39): error CS0518: Predefined type 'System.String' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(33,16,33,20): error CS0518: Predefined type 'System.Void' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(19,30,19,33): error CS0518: Predefined type 'System.Int32' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(19,9,22,10): error CS0518: Predefined type 'System.Void' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(13,26,13,29): error CS0518: Predefined type 'System.Int32' is not defined or imported 1>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNativeWebViewBridge\WebViewBridge.cs(27,59,27,72): error CS0518: Predefined type 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable`1' is not defined or imported 2>------ Build started: Project: ReactNative, Configuration: Debug x86 ------ 2>F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNative\obj\x86\Debug\XamlTypeInfo.g.cs(15,25,15,45): warning CS1591: Missing XML comment for publicly visible type or member 'XamlMetaDataProvider' 2> ReactNative -> F:\RN_work\Meeting\node_modules\react-native-windows\ReactWindows\ReactNative\bin\x86\Debug\ReactNative.dll 3>------ Build started: Project: Meeting, Configuration: Debug x86 ------ 3> Meeting -> F:\RN_work\Meeting\windows\Meeting\bin\x86\Debug\Meeting.exe ========== Build: 2 succeeded, 1 failed, 1 up-to-date, 0 skipped ========== image

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

randy-motluck commented 6 years ago

My colleague and I are having the same issue as shown here. I have tried this with 0.39, 0.51 and 0.52 of react native and manually changed the UWP version to 10.0.14393 etc. My version of the other tools matches what is above. Is there a known configuration that works? We are using Win 10 Pro in a VM with VS 17 Community and the 14393 SDK installed and selected. We get the same exact error trying to load the 'System' objects, etc.

db-rdz commented 6 years ago

Same problem here...

IndianAg0711 commented 6 years ago

I know this isn't the long term answer, but dropping back to react-native-windows 0.50 has me up and running with VS 2017, rn0.52, etc.

db-rdz commented 6 years ago

I got it working by:

1- Right click each project (ReactNative, ReactNativeWebViewBridge, ChakraBridge) and:

2- If you get an error saying that the project is not referencing the UAP,version=v10.0.10240 framework or something like that then:

keatongreve commented 6 years ago

Yep, @db-rdz's suggestion fixed it for me as well.

randy-motluck commented 6 years ago

@db-rdz 's solution worked for us. Thank you.

setsuna commented 6 years ago

@db-rdz thanks for yourkindly help!it works!

keatongreve commented 6 years ago

By the way, in case anyone wants the fix to apply on npm install, I made this quick branch: https://github.com/Microsoft/react-native-windows/compare/master...keatongreve:vs2017-sdk10.0.16299. you can just set "react-native-windows": "github:keatongreve/react-native-windows#vs2017-sdk10.0.16299 in your package.json.

edit: i don't really have any plans on keeping it up to date, but you can see if you want to do it yourself, it is super easy

rozele commented 6 years ago

@keatongreve - sounds like you just needed to install the Windows 10 14393 SDK.

eastcoastcoder commented 6 years ago

@rozele No this is a real breaking issue of core projects (ReactNativeWebBridge, Chakra, etc.) defaulting to a version <14393. From my observations anything targeting a lower sdk does not resolve System calls. I have to manually set each React Native project within the solution to a minimum of 14393 and a target of 16299. Upon yarning the project they reset themselves again to older versions. Is there any way to make sure these target within this range? Do I need to install very old versions of the sdk to ensure my project will at least compile? Edit: I should note I do in fact have 16299 and 14393 installed. But I probably don't have 10240 on my system. Are all three a requirement?

eastcoastcoder commented 6 years ago

Finally found a way to fix the problem without retargeting each time. I went to the root react-native project directory (one above windows) and I ran react-native windows to regenerate the solution file...Maybe the initial solution was made on VS2015 or something and I think it affected the build targets. Keep in mind you'll probably have to relink libraries and references if you do this. After that I had other issues (See https://github.com/Microsoft/react-native-windows/issues/1644). But finally I am able to get around these problems.