diff --git a/.ado/e2e-test.yml b/.ado/e2e-test.yml
deleted file mode 100644
index 42659e22349..00000000000
--- a/.ado/e2e-test.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-# This file defines the Windows Visual Studio PR build steps used during the CI loop
-name: $(Date:yyyyMMdd).$(Rev:.r)
-
-trigger: none # will disable CI builds entirely
-
-pr:
- - master
-
-jobs:
- - template: templates/e2e-test-job.yml # Template reference
- parameters:
- name: E2ETest
- pool:
- vmImage: vs2017-win2016
- BuildPlatform: x64
- UseRNFork: true
diff --git a/.ado/templates/build-rnw.yml b/.ado/templates/build-rnw.yml
index 052ebb81e6c..614b6843855 100644
--- a/.ado/templates/build-rnw.yml
+++ b/.ado/templates/build-rnw.yml
@@ -14,7 +14,7 @@ parameters:
yarnBuildCmd: build
# Visual Studio Installer
- vsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe'
+ vsInstallerUri: $(VsInstallerUri)
vsComponents: ''
steps:
@@ -25,7 +25,6 @@ steps:
vsComponents: ${{ parameters.vsComponents }}
yarnBuildCmd: ${{ parameters.yarnBuildCmd }}
debug: ${{ parameters.debug }}
- forceVSDependencies: false
- task: NuGetCommand@2
displayName: NuGet restore
@@ -51,6 +50,7 @@ steps:
/p:PreferredToolArchitecture=${{parameters.preferredToolArchitecture}}
/p:PlatformToolset=${{parameters.platformToolset}}
${{parameters.msbuildArguments}}
+ /p:BaseIntDir=$(BaseIntDir)
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
diff --git a/.ado/templates/e2e-test-job.yml b/.ado/templates/e2e-test-job.yml
index 0e876a7ee7c..3a79cfaecd4 100644
--- a/.ado/templates/e2e-test-job.yml
+++ b/.ado/templates/e2e-test-job.yml
@@ -1,20 +1,28 @@
#
parameters:
name: ''
- pool:
BuildPlatform: x86 # ARM, x86, x64
UseRNFork: true
- vsComponents: ''
- vsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe'
jobs:
- job: ${{ parameters.name }}
displayName: E2E Test
dependsOn: Setup
condition: ne( dependencies.Setup.outputs['checkPayload.shouldSkipPRBuild'], 'True' )
- pool: ${{ parameters.pool }}
+
+ # E2ETest is in the pipeline of windows-vs-pr, but windows-vs-pr is still using vs2017.yml
+ # E2ETest can only be executed on windows-2019 or above, so force to use windows-2019 image and override vs2017.yml variables
+ # so pool and variables are hard coded here.
+ pool:
+ vmImage: windows-2019
+ variables:
+ VsComponents: Microsoft.VisualStudio.Component.VC.v141.x86.x64,Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141
+ BaseIntDir: $(BUILD_SOURCESDIRECTORY)\vnext\build
+ VmImage: windows-2019
+
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
+
steps:
- checkout: self
clean: false
@@ -23,15 +31,8 @@ jobs:
- template: prepare-env.yml
parameters:
useRnFork: ${{ parameters.UseRNFork }}
- vsComponents: ${{ parameters.vsComponents }}
+ vsComponents: $(VsComponents)
yarnBuildCmd: build
- vsInstallerUri: ${{ parameters.vsInstallerUri }}
- forceVSDependencies: true
-
- - task: CmdLine@2
- displayName: Install react-native-cli
- inputs:
- script: npm install -g react-native-cli
- task: NuGetCommand@2
displayName: NuGet restore - ReactUWPTestApp
@@ -40,12 +41,6 @@ jobs:
restoreSolution: packages/E2ETest/windows/ReactUWPTestApp.sln
verbosityRestore: Detailed # Options: quiet, normal, detailed
- - task: PowerShell@2
- displayName: Install MUX framework package
- inputs:
- targetType: "inline"
- script: Add-AppxPackage -path $(Build.SourcesDirectory)/packages/E2ETest/windows/packages/Microsoft.UI.Xaml.2.3.191129002/tools/AppX/${{ parameters.BuildPlatform }}/Release/Microsoft.UI.Xaml.2.3.appx
-
- task: CmdLine@2
displayName: Create bundle
inputs:
diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml
index 17be92e3c32..3d5f1c7f0a5 100644
--- a/.ado/templates/prepare-env.yml
+++ b/.ado/templates/prepare-env.yml
@@ -4,13 +4,25 @@ parameters:
useRnFork: true
yarnBuildCmd: build
debug: false
- forceVSDependencies: false
# Visual Studio Installer
- vsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe'
+ vsInstallerUri: $(VsInstallerUri)
vsComponents: ''
steps:
+ - task: PowerShell@2
+ displayName: Display env
+ inputs:
+ targetType: "inline"
+ script: gci env:* | sort-object name
+
+ - task: PowerShell@2
+ displayName: Display disksize
+ inputs:
+ targetType: inline # filePath | inline
+ script: |
+ Get-WmiObject Win32_LogicalDisk
+
- task: UseNode@1
inputs:
version: '10.x'
@@ -37,6 +49,11 @@ steps:
script: yarn install
condition: and(succeeded(), not('${{parameters.useRnFork}}'))
+ - task: CmdLine@2
+ displayName: Install react-native-cli
+ inputs:
+ script: npm install -g react-native-cli
+
- task: CmdLine@2
displayName: yarn ${{ parameters.yarnBuildCmd }}
inputs:
@@ -55,10 +72,10 @@ steps:
-InstallerUri ${{ parameters.vsInstallerUri }}
-Components ${{ parameters.vsComponents }}
-Collect:$${{ parameters.debug }}
- condition: and(ne('${{parameters.vsComponents}}', ''), or(eq(variables['VmImage'], 'windows-2019'), ${{ parameters.forceVSDependencies }}))
+ condition: and(ne('${{parameters.vsComponents}}', ''), eq(variables['VmImage'], 'windows-2019'))
- task: PowerShell@2
- displayName: List disksize by Get-WmiObject Win32_LogicalDisk
+ displayName: List disksize after prepare-env
inputs:
targetType: inline # filePath | inline
script: |
diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml
index acfd91a3fd9..d2a60a27cf7 100644
--- a/.ado/templates/react-native-init.yml
+++ b/.ado/templates/react-native-init.yml
@@ -5,7 +5,7 @@ parameters:
platform:
configuration:
vsComponents: ''
- vsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe'
+ vsInstallerUri: $(VsInstallerUri)
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
@@ -91,6 +91,7 @@ steps:
msbuildArguments:
/p:PreferredToolArchitecture=$(MSBuildPreferredToolArchitecture)
/p:PlatformToolset=$(MSBuildPlatformToolset)
+ /p:BaseIntDir=$(BaseIntDir)
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
diff --git a/.ado/variables/msbuild.yml b/.ado/variables/msbuild.yml
index a535c0d7d37..bd2a5b1eda1 100644
--- a/.ado/variables/msbuild.yml
+++ b/.ado/variables/msbuild.yml
@@ -4,3 +4,4 @@ variables:
MSBuildPlatformToolset: v141
TargetPlatformVersion: 10.0.18362.0
Win10Version: 18362
+ VsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe'
\ No newline at end of file
diff --git a/.ado/variables/vs2017.yml b/.ado/variables/vs2017.yml
index 325667fefb1..b4f41037b63 100644
--- a/.ado/variables/vs2017.yml
+++ b/.ado/variables/vs2017.yml
@@ -2,3 +2,4 @@ variables:
VmImage: vs2017-win2016
MSBuildVersion: 15.0
GoogleTestAdapterPath: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\drknwe51.xnq'
+ BaseIntDir: $(Agent.HomeDirectory)\BaseIntDir # redirect to C:
\ No newline at end of file
diff --git a/.ado/variables/vs2019.yml b/.ado/variables/vs2019.yml
index be12a57e389..e8df840f8f4 100644
--- a/.ado/variables/vs2019.yml
+++ b/.ado/variables/vs2019.yml
@@ -3,3 +3,4 @@ variables:
VsComponents: Microsoft.VisualStudio.Component.VC.v141.x86.x64,Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141
MSBuildVersion: 16.0
GoogleTestAdapterPath: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\pemwd5jw.szc'
+ BaseIntDir: $(BUILD_SOURCESDIRECTORY)\vnext\build
\ No newline at end of file
diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml
index de5704d3f9e..10c1e175744 100644
--- a/.ado/windows-vs-pr.yml
+++ b/.ado/windows-vs-pr.yml
@@ -8,7 +8,7 @@ pr:
variables:
- template: variables/msbuild.yml
- - template: variables/vs2017.yml
+ - template: variables/vs2017.yml # when using vs2019.yml, please remove workaround in e2e-test-job which is forced to use windows-2019 image.
jobs:
- job: Setup
@@ -127,6 +127,7 @@ jobs:
msbuildArguments:
/p:PreferredToolArchitecture=$(MSBuildPreferredToolArchitecture)
/p:PlatformToolset=$(MSBuildPlatformToolset)
+ /p:BaseIntDir=$(BaseIntDir)
clean: true # Optional
condition: and(succeeded(), eq(variables['UseRNFork'], 'true'))
@@ -142,7 +143,7 @@ jobs:
command: restore
restoreSolution: packages/microsoft-reactnative-sampleapps/windows/SampleApps.sln
verbosityRestore: Detailed # Options: quiet, normal, detailed
- condition: and(succeeded(), eq(variables['UseRNFork'], 'true'), False) # Disabled, out of space issues on CI machines
+ condition: and(succeeded(), eq(variables['UseRNFork'], 'true'))
- task: MSBuild@1
displayName: MSBuild - SampleApps
@@ -155,15 +156,35 @@ jobs:
msbuildArguments:
/p:PreferredToolArchitecture=$(MSBuildPreferredToolArchitecture)
/p:PlatformToolset=$(MSBuildPlatformToolset)
+ /p:BaseIntDir=$(BaseIntDir)
clean: true # Optional
- condition: and(succeeded(), eq(variables['UseRNFork'], 'true'), False) # Disabled, out of space issues on CI machines
+ condition: and(succeeded(), eq(variables['UseRNFork'], 'true'), ne(variables['BuildPlatform'], 'x86'), false) # Disabled. issue #3670 Unable to resolve module `warnOnce`
+
+ # Possible related to https://social.msdn.microsoft.com/Forums/vstudio/en-US/23c8df57-9c50-476c-9f56-1fe058e75a9d/uwp-app-builds-on-local-machine-fails-on-build-agent-systemprivatecorelib-not-found
+ # use X86 msbuild to avoid ##[error]...Microsoft.AppXPackage.Targets(1248,5): Error MSB3816: Loading assembly "\runtime.win7-x86.microsoft.netcore.runtime.coreclr\1.0.2\runtimes\win7-x86\lib\netstandard1.0\mscorlib.dll" failed.
+ # System.ArgumentException: A BadImageFormatException has been thrown while parsing the signature.
+ # This is likely due to lack of a generic context. Ensure genericTypeArguments and genericMethodArguments are provided and contain enough context.
+ - task: MSBuild@1
+ displayName: MSBuild - SampleApps
+ inputs:
+ solution: packages/microsoft-reactnative-sampleapps/windows/SampleApps.sln
+ msbuildVersion: $(MSBuildVersion) # Optional. Options: latest, 16.0, 15.0, 14.0, 12.0, 4.0
+ msbuildArchitecture: x86 # Optional. Options: x86, x64
+ platform: $(BuildPlatform) # Optional
+ configuration: $(BuildConfiguration) # Optional
+ msbuildArguments:
+ /p:PreferredToolArchitecture=$(MSBuildPreferredToolArchitecture)
+ /p:PlatformToolset=$(MSBuildPlatformToolset)
+ /p:BaseIntDir=$(BaseIntDir)
+ clean: true # Optional
+ condition: and(succeeded(), eq(variables['UseRNFork'], 'true'), eq(variables['BuildPlatform'], 'x86'), false) # Disabled. [error]vnext\Microsoft.ReactNative.SharedManaged\JSValue.cs(100,36): Error CS8107: Feature 'readonly references' is not available in C# 7.0. Please use language version 7.2 or greater.
- task: CmdLine@2
displayName: Create SampleApp bundle
inputs:
script: node node_modules/react-native/local-cli/cli.js bundle --entry-file index.windows.js --bundle-output SampleApp.bundle
workingDirectory: packages\microsoft-reactnative-sampleapps
- condition: and(succeeded(), eq(variables['UseRNFork'], 'true'), False) # Disabled, out of space issues on CI machines
+ condition: and(succeeded(), eq(variables['UseRNFork'], 'true'))
- task: CmdLine@2
displayName: Create RNTester bundle
@@ -494,6 +515,8 @@ jobs:
/p:PlatformToolset=$(MSBuildPlatformToolset)
/p:TargetPlatformVersion=$(TargetPlatformVersion)
/p:WindowsTargetPlatformVersion=$(TargetPlatformVersion)
+ /p:BaseIntDir=$(BaseIntDir)
+
#clean: true # Optional
#maximumCpuCount: false # Optional
#restoreNugetPackages: false # Optional
@@ -535,11 +558,8 @@ jobs:
- template: templates/e2e-test-job.yml # Template reference
parameters:
name: E2ETest
- pool:
- vmImage: windows-2019
BuildPlatform: x64
UseRNFork: true
- vsComponents: Microsoft.VisualStudio.Component.VC.v141.x86.x64, Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141
- job: RNWNugetPR
displayName: Build and Pack Nuget
diff --git a/change/react-native-windows-2019-12-11-13-44-04-OneFolder.json b/change/react-native-windows-2019-12-11-13-44-04-OneFolder.json
new file mode 100644
index 00000000000..b75dfdc94b7
--- /dev/null
+++ b/change/react-native-windows-2019-12-11-13-44-04-OneFolder.json
@@ -0,0 +1,8 @@
+{
+ "type": "none",
+ "comment": "redirect to C on build machine",
+ "packageName": "react-native-windows",
+ "email": "licanhua@live.com",
+ "commit": "7f3bb66b87d8b38f74129d778b4fe3d7245d4a45",
+ "date": "2019-12-11T21:44:04.212Z"
+}
\ No newline at end of file
diff --git a/packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/SampleApp.vcxproj b/packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/SampleApp.vcxproj
index af355128329..a25a7a1804d 100644
--- a/packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/SampleApp.vcxproj
+++ b/packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/SampleApp.vcxproj
@@ -175,7 +175,6 @@
- cd $(SolutionDir)..
react-native bundle --platform windows --entry-file index.windows.js --bundle-output windows/SampleAppCpp/Bundle/index.windows.bundle --assets-dest windows/SampleAppCpp/Bundle
diff --git a/packages/microsoft-reactnative-sampleapps/windows/SampleAppCS/SampleAppCS.csproj b/packages/microsoft-reactnative-sampleapps/windows/SampleAppCS/SampleAppCS.csproj
index f9970ef4dcb..38bdb65d840 100644
--- a/packages/microsoft-reactnative-sampleapps/windows/SampleAppCS/SampleAppCS.csproj
+++ b/packages/microsoft-reactnative-sampleapps/windows/SampleAppCS/SampleAppCS.csproj
@@ -18,6 +18,7 @@
{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
true
false
+ 7.0
true
@@ -175,8 +176,7 @@
- cd $(SolutionDir)..
- mkdir windows\SampleAppCS\Bundle
+ cd ..
react-native bundle --platform windows --entry-file index.windows.js --bundle-output windows/SampleAppCS/Bundle/index.windows.bundle --assets-dest windows/SampleAppCS/Bundle
diff --git a/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCS/SampleLibraryCS.csproj b/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCS/SampleLibraryCS.csproj
index 74d18950824..450ccdecdc5 100644
--- a/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCS/SampleLibraryCS.csproj
+++ b/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCS/SampleLibraryCS.csproj
@@ -18,6 +18,7 @@
{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
false
false
+ 7.0
x86
diff --git a/vnext/Directory.Build.props b/vnext/Directory.Build.props
index 243a79d8ba0..a8c624935eb 100644
--- a/vnext/Directory.Build.props
+++ b/vnext/Directory.Build.props
@@ -17,7 +17,6 @@
$(MSBuildProjectName)
-
$(ReactNativeWindowsDir)build\$(Platform)\$(Configuration)
$(ReactNativeWindowsDir)build\x86\$(Configuration)
@@ -30,4 +29,4 @@
$(IntDir)Generated Files\
-
\ No newline at end of file
+
diff --git a/vnext/Microsoft.ReactNative.SharedManaged/AttributedViewManager.cs b/vnext/Microsoft.ReactNative.SharedManaged/AttributedViewManager.cs
index e2e9bddfb83..5f2c4f271a1 100644
--- a/vnext/Microsoft.ReactNative.SharedManaged/AttributedViewManager.cs
+++ b/vnext/Microsoft.ReactNative.SharedManaged/AttributedViewManager.cs
@@ -390,9 +390,9 @@ private bool TryMakeBubblingEvent(ViewManagerExportedBubblingEventTypeConstantAt
return true;
}
- constantKey = default;
- constantValue = default;
- memberValue = default;
+ constantKey = default(string);
+ constantValue = default(string);
+ memberValue = default(Delegate);
return false;
}
@@ -445,9 +445,9 @@ private bool TryMakeDirectEvent(ViewManagerExportedDirectEventTypeConstantAttrib
return true;
}
- constantKey = default;
- constantValue = default;
- memberValue = default;
+ constantKey = default(string);
+ constantValue = default(object);
+ memberValue = default(Delegate);
return false;
}
@@ -466,7 +466,7 @@ private bool TryGetEventDataType(Type eventType, out Type eventDataType)
}
}
- eventDataType = default;
+ eventDataType = default(Type);
return false;
}