Skip to content

Commit 496ed5d

Browse files
committed
🔥 Remove Windows Runtime Component (WRC) target
Fixes #815
1 parent e950084 commit 496ed5d

File tree

431 files changed

+133
-193170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

431 files changed

+133
-193170
lines changed

Build/build-functions.psm1

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function Update-GeneratedCode {
2727
write-host -foreground blue "Generate code...END`n"
2828
}
2929

30-
function Start-Build([boolean] $IncludeWindowsRuntimeComponent = $false, [boolean] $IncludeNanoFramework = $false) {
30+
function Start-Build([boolean] $IncludeNanoFramework = $false) {
3131
write-host -foreground blue "Start-Build...`n---"
3232

3333
$fileLoggerArg = "/logger:FileLogger,Microsoft.Build;logfile=$testReportDir\UnitsNet.msbuild.log"
@@ -39,24 +39,6 @@ function Start-Build([boolean] $IncludeWindowsRuntimeComponent = $false, [boolea
3939
dotnet build --configuration Release "$root\UnitsNet.sln" $fileLoggerArg $appVeyorLoggerArg
4040
if ($lastexitcode -ne 0) { exit 1 }
4141

42-
if (-not $IncludeWindowsRuntimeComponent)
43-
{
44-
write-host -foreground yellow "Skipping WindowsRuntimeComponent build."
45-
}
46-
else
47-
{
48-
write-host -foreground green "Build WindowsRuntimeComponent."
49-
$fileLoggerArg = "/logger:FileLogger,Microsoft.Build;logfile=$testReportDir\UnitsNet.WindowsRuntimeComponent.msbuild.log"
50-
$appVeyorLoggerArg = if (Test-Path "$appVeyorLoggerDll") { "/logger:$appVeyorLoggerDll" } else { "" }
51-
52-
# dontnet CLI does not support WindowsRuntimeComponent project type yet
53-
# msbuild does not auto-restore nugets for this project type
54-
write-host -foreground yellow "WindowsRuntimeComponent project not yet supported by dotnet CLI, using MSBuild15 instead"
55-
& "$msbuild" "$root\UnitsNet.WindowsRuntimeComponent.sln" /verbosity:minimal /p:Configuration=Release /t:restore
56-
& "$msbuild" "$root\UnitsNet.WindowsRuntimeComponent.sln" /verbosity:minimal /p:Configuration=Release $fileLoggerArg $appVeyorLoggerArg
57-
if ($lastexitcode -ne 0) { exit 1 }
58-
}
59-
6042
if (-not $IncludeNanoFramework)
6143
{
6244
write-host -foreground yellow "Skipping .NET nanoFramework build."
@@ -128,21 +110,13 @@ function Start-PackNugets {
128110
if ($lastexitcode -ne 0) { exit 1 }
129111
}
130112

131-
if (-not $IncludeWindowsRuntimeComponent) {
132-
write-host -foreground yellow "Skipping WindowsRuntimeComponent nuget pack."
133-
} else {
134-
write-host -foreground yellow "WindowsRuntimeComponent project not yet supported by dotnet CLI, using nuget.exe instead"
135-
& $nuget pack "$root\UnitsNet.WindowsRuntimeComponent\UnitsNet.WindowsRuntimeComponent.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir"
136-
}
137-
138113
if (-not $IncludeNanoFramework) {
139114
write-host -foreground yellow "Skipping nanoFramework nuget pack."
140115
} else {
141116
write-host -foreground yellow "nanoFramework project not yet supported by dotnet CLI, using nuget.exe instead"
142117
Invoke-BuildNanoNugets
143118
}
144119

145-
146120
write-host -foreground blue "Pack nugets...END`n"
147121
}
148122

Build/build.ps1

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,16 @@
77
88
Publishing nugets is handled by nuget-publish.bat and run by the build server
99
on the master branch.
10-
.PARAMETER skipUWP
11-
If flag is set, will skip the UWP (Windows Runtime Component) build step as this requires
12-
some large, extra Visual Studio features to be installed.
1310
.EXAMPLE
1411
powershell ./build.ps1
15-
powershell ./build.ps1 -IncludeWindowsRuntimeComponent -IncludeNanoFramework
12+
powershell ./build.ps1 -IncludeNanoFramework
1613
1714
.NOTES
1815
Author: Andreas Gullberg Larsen
1916
Last modified: Jan 21, 2018
2017
#>
2118
[CmdletBinding()]
2219
Param(
23-
[switch] $IncludeWindowsRuntimeComponent,
2420
[switch] $IncludeNanoFramework
2521
)
2622

@@ -32,7 +28,7 @@ try {
3228

3329
Remove-ArtifactsDir
3430
Update-GeneratedCode
35-
Start-Build -IncludeWindowsRuntimeComponent $IncludeWindowsRuntimeComponent -IncludeNanoFramework $IncludeNanoFramework
31+
Start-Build -IncludeNanoFramework $IncludeNanoFramework
3632
Start-Tests
3733
Start-PackNugets
3834
Compress-ArtifactsAsZip

Build/set-version-UnitsNet.ps1

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ $projFile = "$root\UnitsNet\UnitsNet.csproj"
5555
$numberExtensionsProjFile = "$root\UnitsNet.NumberExtensions\UnitsNet.NumberExtensions.csproj"
5656
$nanoFrameworkNuspecGeneratorFile = "$root\CodeGen\Generators\NanoFrameworkGen\NuspecGenerator.cs"
5757
$nanoFrameworkAssemblyInfoFile = "$root\UnitsNet.NanoFramework\GeneratedCode\Properties\AssemblyInfo.cs"
58-
$winrtAssemblyInfoFile = "$root\UnitsNet.WindowsRuntimeComponent\Properties\AssemblyInfo.cs"
59-
$winrtNuspecFile = "$root\UnitsNet.WindowsRuntimeComponent\UnitsNet.WindowsRuntimeComponent.nuspec"
6058

6159
# Use UnitsNet.Common.props version as base if bumping major/minor/patch
6260
$newVersion = Get-NewProjectVersion $projFile $paramSet $setVersion $bumpVersion
@@ -68,15 +66,9 @@ $didStash = Invoke-StashPush
6866
Set-ProjectVersion $projFile $newVersion
6967
Set-ProjectVersion $numberExtensionsProjFile $newVersion
7068

71-
# Update AssemblyInfo.cs files
72-
Set-AssemblyInfoVersion $winrtAssemblyInfoFile $newVersion
73-
7469
# Update AssemblyInfo.cs file for .NET nanoFramework
7570
Set-AssemblyInfoVersion $nanoFrameworkAssemblyInfoFile $newVersion
7671

77-
# Update .nuspec files
78-
Set-NuspecVersion $winrtNuspecFile $newVersion
79-
8072
# Update codegen and .nuspec files for nanoFramework
8173
Set-NuspecVersion $nanoFrameworkNuspecGeneratorFile $newVersion
8274
Get-ChildItem -Path "$root\UnitsNet.NanoFramework\GeneratedCode" -Include '*.nuspec' -Recurse |

CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public override string Generate()
3838
</releaseNotes>
3939
<copyright>Copyright 2013 Andreas Gullberg Larsen ([email protected]).</copyright>
4040
<language>en-US</language>
41-
<tags>nanoframework unit units measurement si metric imperial abbreviation abbreviations convert conversion parse c# .net immutable uwp uap winrt win10 windows runtime component {_quantity.Name.ToLower()}</tags>
41+
<tags>nanoframework {_quantity.Name.ToLower()} unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable</tags>
4242
<dependencies>
4343
<dependency id=""nanoFramework.CoreLibrary"" version=""{_mscorlibNuGetVersion}"" />");
4444

CodeGen/Generators/QuantityJsonFilesParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace CodeGen.Generators
1515
/// <summary>
1616
/// Parses JSON files that define quantities and their units.
1717
/// This will later be used to generate source code and can be reused for different targets such as .NET framework,
18-
/// WindowsRuntimeComponent and even other programming languages.
18+
/// .NET Core, .NET nanoFramework and even other programming languages.
1919
/// </summary>
2020
internal static class QuantityJsonFilesParser
2121
{

0 commit comments

Comments
 (0)