Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .ado/e2e-test.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .ado/templates/build-rnw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -25,7 +25,6 @@ steps:
vsComponents: ${{ parameters.vsComponents }}
yarnBuildCmd: ${{ parameters.yarnBuildCmd }}
debug: ${{ parameters.debug }}
forceVSDependencies: false

- task: NuGetCommand@2
displayName: NuGet restore
Expand All @@ -51,6 +50,7 @@ steps:
/p:PreferredToolArchitecture=${{parameters.preferredToolArchitecture}}
/p:PlatformToolset=${{parameters.platformToolset}}
${{parameters.msbuildArguments}}
/p:BaseIntDir=$(BaseIntDir)

- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
Expand Down
31 changes: 13 additions & 18 deletions .ado/templates/e2e-test-job.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
25 changes: 21 additions & 4 deletions .ado/templates/prepare-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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:
Expand All @@ -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: |
Expand Down
3 changes: 2 additions & 1 deletion .ado/templates/react-native-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -91,6 +91,7 @@ steps:
msbuildArguments:
/p:PreferredToolArchitecture=$(MSBuildPreferredToolArchitecture)
/p:PlatformToolset=$(MSBuildPlatformToolset)
/p:BaseIntDir=$(BaseIntDir)

- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
Expand Down
1 change: 1 addition & 0 deletions .ado/variables/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
1 change: 1 addition & 0 deletions .ado/variables/vs2017.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
1 change: 1 addition & 0 deletions .ado/variables/vs2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
34 changes: 27 additions & 7 deletions .ado/windows-vs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'))

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "none",
"comment": "redirect to C on build machine",
"packageName": "react-native-windows",
"email": "[email protected]",
"commit": "7f3bb66b87d8b38f74129d778b4fe3d7245d4a45",
"date": "2019-12-11T21:44:04.212Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@

<PropertyGroup>
<BundleCommand>
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
</BundleCommand>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -175,8 +176,7 @@

<PropertyGroup>
<BundleCommand>
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
</BundleCommand>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<AllowCrossPlatformRetargeting>false</AllowCrossPlatformRetargeting>
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
<LangVersion>7.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
Expand Down
3 changes: 1 addition & 2 deletions vnext/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

<PropertyGroup Label="Configuration">
<ProjectName Condition="'$(ProjectName)'==''">$(MSBuildProjectName)</ProjectName>

<!-- Visual Studio forces using 'Win32' for the 'x86' platform. -->
<BaseIntDir Condition="'$(Platform)' != 'Win32'">$(ReactNativeWindowsDir)build\$(Platform)\$(Configuration)</BaseIntDir>
<BaseIntDir Condition="'$(Platform)' == 'Win32'">$(ReactNativeWindowsDir)build\x86\$(Configuration)</BaseIntDir>
Expand All @@ -30,4 +29,4 @@
<GeneratedFilesDir>$(IntDir)Generated Files\</GeneratedFilesDir>
</PropertyGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -466,7 +466,7 @@ private bool TryGetEventDataType(Type eventType, out Type eventDataType)
}
}

eventDataType = default;
eventDataType = default(Type);
return false;
}

Expand Down