Skip to content

Commit e551165

Browse files
committed
build: Add .net 471 reference assemblies so dotnet core can build the project
1 parent 2bb8092 commit e551165

11 files changed

+111
-18
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
*.asset -text
1313
*.unity -text
1414
*.bundle filter=lfs diff=lfs merge=lfs -text
15+
*-custom.nupkg filter=lfs diff=lfs merge=lfs -text

common/libraries.props

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
15-
<PackageReference Include="Unity.NETFramework.ReferenceAssemblies.net35" Version="1.0.0" IncludeAssets="runtime; build; native; contentfiles; analyzers" PrivateAssets="All" />
15+
<PackageReference Include="Custom.Unity.NETFramework.ReferenceAssemblies.net35" Version="1.0.1-custom" IncludeAssets="runtime; build; native; contentfiles; analyzers" PrivateAssets="All" />
16+
</ItemGroup>
17+
<ItemGroup Condition=" '$(TargetFramework)' == 'net471' ">
18+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net471" Version="1.0.0-preview.2" IncludeAssets="runtime; build; native; contentfiles; analyzers" PrivateAssets="All" />
1619
</ItemGroup>
1720

1821
</Project>

common/tests.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@
1313
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1414
</None>
1515
</ItemGroup>
16+
<ItemGroup Condition=" '$(TargetFramework)' == 'net471' ">
17+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net471" Version="1.0.0-preview.2" IncludeAssets="runtime; build; native; contentfiles; analyzers" PrivateAssets="All" />
18+
</ItemGroup>
1619
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:92cb52d8cbad9a831d7790b8895f7507779c6db8223988fad97ae7bd5bee22fb
3+
size 22634
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:35898bde9adc35ed39f07da44bf493154ed162b1cd8ae49348fcb78d09899acc
3+
size 4576962
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:9427ea94b8c04236b49797dac00e1f97667f1995da4cead0a336cadde1966931
3+
size 1733790

scripts/Create-Packages.ps1

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,21 @@ if ($Trace) {
5858

5959
$pkgName="com.unity.git.api"
6060
$pkgSrcDir="$packageDir\$pkgName"
61-
$extrasDir=""
6261
$ignorefile="$srcDir\$pkgName\.npmignore"
6362
$baseInstall="Packages\$pkgName"
6463
$outDir=$artifactDir
6564

66-
Write-Verbose "$packagingScriptsDir\run.ps1 $pkgSrcDir $outDir $pkgName $Version $extrasDir $ignorefile $baseInstall"
65+
Write-Verbose "$packagingScriptsDir\run.ps1 -Source $pkgSrcDir -Out $artifactDir -Name $pkgName -Version $Version $extrasDir -Ignore $ignorefile -BaseInstall $baseInstall"
6766
Write-Output "Packaging $pkgName..."
68-
Run-Command -Fatal { & $packagingScriptsDir\run.ps1 $pkgSrcDir $outDir $pkgName $Version $extrasDir $ignorefile $baseInstall -Tmp $tmpDir -SkipUnity:$SkipUnity -SkipPackman:$SkipPackman -SkipUpm:$SkipUpm }
67+
Run-Command -Fatal { & $packagingScriptsDir\run.ps1 -Source $pkgSrcDir -Out $artifactDir -Name $pkgName -Version $Version -Ignore $ignorefile -BaseInstall $baseInstall -Tmp $tmpDir -SkipUnity:$SkipUnity -SkipPackman:$SkipPackman -SkipUpm:$SkipUpm }
6968

7069
$pkgName="com.unity.git.ui"
7170
$pkgSrcDir="$packageDir\$pkgName"
72-
$extrasDir=""
7371
$ignorefile="$srcDir\$pkgName\.npmignore"
7472
$baseInstall="Packages\$pkgName"
7573
$outDir=$artifactDir
7674

77-
Write-Verbose "$packagingScriptsDir\run.ps1 $pkgSrcDir $outDir $pkgName $Version $extrasDir $ignorefile $baseInstall"
75+
Write-Verbose "$packagingScriptsDir\run.ps1 -Source $pkgSrcDir -Out $artifactDir -Name $pkgName -Version $Version $extrasDir -Ignore $ignorefile -BaseInstall $baseInstall"
7876
Write-Output "Packaging $pkgName..."
79-
Run-Command -Fatal { & $packagingScriptsDir\run.ps1 $pkgSrcDir $outDir $pkgName $Version $extrasDir $ignorefile $baseInstall -Tmp $tmpDir -SkipUnity:$SkipUnity -SkipPackman:$SkipPackman -SkipUpm:$SkipUpm }
77+
Run-Command -Fatal { & $packagingScriptsDir\run.ps1 -Source $pkgSrcDir -Out $artifactDir -Name $pkgName -Version $Version -Ignore $ignorefile -BaseInstall $baseInstall -Tmp $tmpDir -SkipUnity:$SkipUnity -SkipPackman:$SkipPackman -SkipUpm:$SkipUpm }
8078
}

scripts/create-packages.sh

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/bin/sh -eu
2+
{ set +x; } 2>/dev/null
3+
4+
SOURCE="${BASH_SOURCE[0]}"
5+
DIR="$( cd -P "$( dirname "$SOURCE" )"/.. >/dev/null 2>&1 && pwd )"
6+
7+
FLAGS=""
8+
PARAMS=""
9+
OUTDIR="$DIR/artifacts"
10+
BUILDDIR="$DIR/build/packages"
11+
SRCDIR="$DIR/src"
12+
SCRIPTDIR="$DIR/packaging/create-unity-packages"
13+
TMPDIR=""
14+
VERSION=""
15+
16+
RM="rm -rf"
17+
18+
while (( "$#" )); do
19+
case "$1" in
20+
-v|--version)
21+
VERSION="$2"
22+
shift 2
23+
;;
24+
-t|--tmp)
25+
TMPDIR="$2"
26+
shift 2
27+
;;
28+
-u|--skipUnity)
29+
FLAGS="$FLAGS $1"
30+
shift 2
31+
;;
32+
-p|--skipPackman)
33+
FLAGS="$FLAGS $1"
34+
shift 2
35+
;;
36+
-m|--skipUpm)
37+
FLAGS="$FLAGS $1"
38+
shift 2
39+
;;
40+
--) # end argument parsing
41+
shift
42+
break
43+
;;
44+
-*|--*=) # unsupported flags
45+
echo "Error: Unsupported flag $1" >&2
46+
exit 1
47+
;;
48+
*) # preserve positional arguments
49+
PARAMS="$PARAMS $1"
50+
shift
51+
;;
52+
esac
53+
done
54+
55+
if [[ x"$VERSION" == x"" ]]; then
56+
echo "-v|--version argument missing"
57+
exit -1
58+
fi
59+
60+
if [[ x"$TMPDIR" == x"" ]]; then
61+
TMPDIR="$DIR/obj"
62+
fi
63+
64+
if [[ -e "$TMPDIR" ]]; then
65+
$RM "$TMPDIR"
66+
fi
67+
68+
# set positional arguments in their proper place
69+
eval set -- "$PARAMS"
70+
71+
PKGNAME="com.unity.git.api"
72+
PKGSRCDIR="$BUILDDIR/$PKGNAME"
73+
IGNOREFILE="$DIR/src/$PKGNAME/.npmignore"
74+
BASEINSTALL="Packages/$PKGNAME"
75+
76+
"$SCRIPTDIR/run.sh" -s "$PKGSRCDIR" -o "$OUTDIR" -n "$PKGNAME" -v "$VERSION" -i "$IGNOREFILE" -t "$BASEINSTALL" --tmp "$TMPDIR" "$FLAGS"
77+
78+
PKGNAME="com.unity.git.ui"
79+
PKGSRCDIR="$BUILDDIR/$PKGNAME"
80+
IGNOREFILE="$DIR/src/$PKGNAME/.npmignore"
81+
BASEINSTALL="Packages/$PKGNAME"
82+
83+
"$SCRIPTDIR/run.sh" -s "$PKGSRCDIR" -o "$OUTDIR" -n "$PKGNAME" -v "$VERSION" -i "$IGNOREFILE" -t "$BASEINSTALL" --tmp "$TMPDIR" "$FLAGS"

src/Localization/Localization.csproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,8 @@
3737
<Reference Include="System.Core" />
3838
<Reference Include="System.Web" />
3939
</ItemGroup>
40-
<ItemGroup>
41-
<PackageReference Include="Unity.NETFramework.ReferenceAssemblies.net35">
42-
<Version>1.0.0</Version>
43-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
44-
<PrivateAssets>all</PrivateAssets>
45-
</PackageReference>
40+
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
41+
<PackageReference Include="Custom.Unity.NETFramework.ReferenceAssemblies.net35" Version="1.0.1-custom" IncludeAssets="runtime; build; native; contentfiles; analyzers" PrivateAssets="All" />
4642
</ItemGroup>
4743
<ItemGroup>
4844
<Compile Include="Localization.Designer.cs">

src/com.unity.git.api/Api/Api.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<Import Project="$(SolutionDir)\common\libraries.props" />
1212

1313
<ItemGroup>
14-
<ProjectReference Include="..\..\Localization\Localization.csproj" Condition="'$(MSBuildRuntimeType)' != 'Core'"/>
14+
<ProjectReference Include="..\..\Localization\Localization.csproj" Condition="'$(MSBuildRuntimeType)' != 'Core'" />
1515
<Reference Include="Unity.VersionControl.Git.Localization.dll" Condition="'$(MSBuildRuntimeType)' == 'Core'">
1616
<HintPath>..\Localization\Unity.VersionControl.Git.Localization.dll</HintPath>
1717
<Private>True</Private>
@@ -30,9 +30,9 @@
3030
</ItemGroup>
3131

3232
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
33-
<PackageReference Include="AsyncBridge.Net35" version="0.2.3333.0" />
33+
<PackageReference Include="AsyncBridge.Net35.Repackaged" version="0.2.4-custom" />
3434
<PackageReference Include="ReadOnlyCollectionInterfaces" version="1.0.0" />
35-
<PackageReference Include="TaskParallelLibrary" version="1.0.3333.0" targetFramework="net35" />
35+
<PackageReference Include="TaskParallelLibrary.Repackaged" version="1.0.4-custom" targetFramework="net35" />
3636
<PackageReference Include="ValueTupleBridge" Version="0.1.5" targetFramework="net35" />
3737
<Reference Include="System.Web" />
3838
</ItemGroup>

0 commit comments

Comments
 (0)