Skip to content

Commit 60a4f2e

Browse files
committed
fix for uwp any cpu builds
1 parent 3f58564 commit 60a4f2e

File tree

8 files changed

+50
-42
lines changed

8 files changed

+50
-42
lines changed

Sample/ShadowsSample.UWP/App.xaml.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
using System;
2+
using System.Reflection;
3+
24
using Windows.ApplicationModel;
35
using Windows.ApplicationModel.Activation;
46
using Windows.UI.Xaml;
57
using Windows.UI.Xaml.Controls;
68
using Windows.UI.Xaml.Navigation;
79

10+
using Sharpnado.Shades.UWP;
11+
812
namespace Sharpnado.Acrylic.UWP
913
{
1014
/// <summary>
@@ -39,7 +43,10 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
3943
rootFrame = new Frame();
4044

4145
rootFrame.NavigationFailed += OnNavigationFailed;
42-
Xamarin.Forms.Forms.Init(e);
46+
47+
var rendererAssemblies = new[] { typeof(UWPShadowsRenderer).GetTypeInfo().Assembly, };
48+
49+
Xamarin.Forms.Forms.Init(e, rendererAssemblies);
4350

4451
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
4552
{

Sample/ShadowsSample.sln

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,10 @@ Global
416416
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|iPhone.Build.0 = Release|Any CPU
417417
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
418418
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
419-
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|x64.ActiveCfg = Release|x64
420-
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|x64.Build.0 = Release|x64
421-
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|x86.ActiveCfg = Release|x86
422-
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|x86.Build.0 = Release|x86
419+
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|x64.ActiveCfg = Release|Any CPU
420+
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|x64.Build.0 = Release|Any CPU
421+
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|x86.ActiveCfg = Release|Any CPU
422+
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|x86.Build.0 = Release|Any CPU
423423
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.ReleaseAndroid9.0|Any CPU.ActiveCfg = Release|Any CPU
424424
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.ReleaseAndroid9.0|Any CPU.Build.0 = Release|Any CPU
425425
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.ReleaseAndroid9.0|ARM.ActiveCfg = Release|ARM

Shadows/AssemblyInfo.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<PropertyGroup>
55
<Copyright>Copyright © Sharpnado 2020</Copyright>
6-
<Version>1.1.0</Version>
6+
<Version>1.1.1</Version>
77
<Company>Sharpnado</Company>
88
<Product>Shadows</Product>
99
<Description>Add as many custom shadows as you like to any Xamarin.Forms view (Android, iOS, UWP). Set Color, Opacity, Blur, and Offset for each shadow.</Description>

Shadows/Shadows.UWP/Shadows.UWP.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
142142
</PackageReference>
143143
<PackageReference Include="Microsoft.UI.Xaml">
144-
<Version>2.0.181018004</Version>
144+
<Version>2.1.190606001</Version>
145145
</PackageReference>
146146
<PackageReference Include="MSBuildTasks">
147147
<Version>1.5.0.235</Version>

Shadows/Shadows.sln

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shadows.Droid", "Shadows.Dr
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shadows.Tizen", "Shadows.Tizen\Shadows.Tizen.csproj", "{076087F5-4598-402A-9DD5-7D785192EB4C}"
1515
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuspec", "nuspec", "{B79B71CC-50AF-4329-A0FD-1E4B7F46751F}"
17+
ProjectSection(SolutionItems) = preProject
18+
AssemblyInfo.targets = AssemblyInfo.targets
19+
..\make-package.ps1 = ..\make-package.ps1
20+
..\Sharpnado.Shadows.nuspec = ..\Sharpnado.Shadows.nuspec
21+
EndProjectSection
22+
EndProject
1623
Global
1724
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1825
Debug|Any CPU = Debug|Any CPU
@@ -37,8 +44,8 @@ Global
3744
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Debug|x64.Build.0 = Debug|x64
3845
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Debug|x86.ActiveCfg = Debug|x86
3946
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Debug|x86.Build.0 = Debug|x86
40-
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|Any CPU.ActiveCfg = Release|x86
41-
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|Any CPU.Build.0 = Release|x86
47+
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
48+
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|Any CPU.Build.0 = Release|Any CPU
4249
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|ARM.ActiveCfg = Release|ARM
4350
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|ARM.Build.0 = Release|ARM
4451
{29D88300-91B0-4EAD-AA6F-5B7D13E375F6}.Release|ARM64.ActiveCfg = Release|ARM64

Shadows/Shadows/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"WP). Set Color, Opacity, Blur, and Offset for each shadow.")]
1515
[assembly: System.Reflection.AssemblyProduct("Shadows")]
1616
[assembly: System.Reflection.AssemblyCopyright("Copyright © Sharpnado 2020")]
17-
[assembly: System.Reflection.AssemblyVersion("1.1.0")]
18-
[assembly: System.Reflection.AssemblyFileVersion("1.1.0")]
17+
[assembly: System.Reflection.AssemblyVersion("1.1.1")]
18+
[assembly: System.Reflection.AssemblyFileVersion("1.1.1")]
1919

2020

Sharpnado.Shadows.nuspec

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
<repository type="git" branch="master" url="https://github.com/roubachof/Sharpnado.Shadows" />
1616
<summary>Add as many custom shadows as you like to any Xamarin.Forms view (Android, iOS, UWP, Tizen). You can set Color, Opacity, Blur, Offset and CornerRadius. Easily achieve neumorphism.</summary>
1717
<tags>xamarin.forms android ios uwp tizen netstandard shadow blur color shadows neumorphism</tags>
18-
<releaseNotes>Support for Tizen backend by Kangho Hur.
19-
* Add support for older Android
20-
* Fixes BindingContext inheritance for shades
21-
* Support for older windows sdk by Pavlo Lukianets
22-
</releaseNotes>
18+
<releaseNotes>Fix for UWP AnyCPU builds.</releaseNotes>
2319
<description>
2420
Add as many custom shadows as you like to any Xamarin.Forms view (Android, iOS, UWP, Tizen).
2521

@@ -59,7 +55,7 @@ Mandatory initialization on Tizen:
5955

6056
<group targetFramework="uap10.0.16299">
6157
<dependency id="Xamarin.Forms" version="3.6.0.220655" exclude="Build,Analyzers"/>
62-
<dependency id="Microsoft.UI.Xaml" version="2.0.181018004" />
58+
<dependency id="Microsoft.UI.Xaml" version="2.1.190606001" />
6359
</group>
6460

6561
<group targetFramework="tizen40">
@@ -90,10 +86,10 @@ Mandatory initialization on Tizen:
9086
<file src="Shadows\Shadows.iOS\bin\Release\Sharpnado.Shadows.pdb" target="lib\Xamarin.iOS10\Sharpnado.Shadows.pdb" />
9187

9288
<!--Xamarin.UWP-->
93-
<file src="Shadows\Shadows.UWP\bin\x64\Release\Sharpnado.Shadows.UWP.dll" target="lib\uap10.0.16299\Sharpnado.Shadows.UWP.dll" />
94-
<file src="Shadows\Shadows.UWP\bin\x64\Release\Sharpnado.Shadows.UWP.pdb" target="lib\uap10.0.16299\Sharpnado.Shadows.UWP.pdb" />
95-
<file src="Shadows\Shadows.UWP\bin\x64\Release\Sharpnado.Shadows.dll" target="lib\uap10.0.16299\Sharpnado.Shadows.dll" />
96-
<file src="Shadows\Shadows.UWP\bin\x64\Release\Sharpnado.Shadows.pdb" target="lib\uap10.0.16299\Sharpnado.Shadows.pdb" />
89+
<file src="Shadows\Shadows.UWP\bin\Release\Sharpnado.Shadows.UWP.dll" target="lib\uap10.0.16299\Sharpnado.Shadows.UWP.dll" />
90+
<file src="Shadows\Shadows.UWP\bin\Release\Sharpnado.Shadows.UWP.pdb" target="lib\uap10.0.16299\Sharpnado.Shadows.UWP.pdb" />
91+
<file src="Shadows\Shadows.UWP\bin\Release\Sharpnado.Shadows.dll" target="lib\uap10.0.16299\Sharpnado.Shadows.dll" />
92+
<file src="Shadows\Shadows.UWP\bin\Release\Sharpnado.Shadows.pdb" target="lib\uap10.0.16299\Sharpnado.Shadows.pdb" />
9793

9894
<!--Tizen-->
9995
<file src="Shadows\Shadows.Tizen\bin\Release\tizen40\Sharpnado.Shadows.Tizen.dll" target="lib\tizen40" />

make-package.ps1

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ $iosProject = ".\Shadows\Shadows.iOS\Shadows.iOS.csproj"
66
$uwpProject = ".\Shadows\Shadows.UWP\Shadows.UWP.csproj"
77
$tizenProject = ".\Shadows\Shadows.Tizen\Shadows.Tizen.csproj"
88

9+
$droidBin = ".\Shadows\Shadows.Droid\bin\Release"
10+
$droidObj = ".\Shadows\Shadows.Droid\obj\Release"
11+
912
rm *.txt
1013

1114
echo " Setting Xamarin.Forms version to $formsVersion"
@@ -19,40 +22,35 @@ $replaceString = "`$1 $formsVersion `$3"
1922
(Get-Content $uwpProject -Raw) -replace $findXFVersion, "$replaceString" | Out-File $uwpProject
2023
(Get-Content $tizenProject -Raw) -replace $findXFVersion, "$replaceString" | Out-File $tizenProject
2124

25+
echo " deleting android bin-obj folders"
26+
rm -Force -Recurse $droidBin
27+
rm -Force -Recurse $droidObj
28+
2229
echo " cleaning Sharpnado.Shadows solution"
23-
$errorCode = msbuild .\Shadows\Shadows.sln /t:Clean > clean.txt
30+
msbuild .\Shadows\Shadows.sln /t:Clean
2431

25-
if ($errorCode -gt 0)
32+
if ($LastExitCode -gt 0)
2633
{
27-
echo " Error while cleaning solution, see clean.txt for infos"
28-
return 1
34+
echo " Error while cleaning solution"
35+
return
2936
}
3037

3138
echo " restoring Sharpnado.Shadows solution packages"
32-
msbuild .\Shadows\Shadows.sln /t:Restore > restore.txt
39+
msbuild .\Shadows\Shadows.sln /t:Restore
3340

34-
if ($errorCode -gt 0)
41+
if ($LastExitCode -gt 0)
3542
{
36-
echo " Error while restoring packages, see restore.txt for infos"
37-
return 2
43+
echo " Error while restoring packages"
44+
return
3845
}
3946

4047
echo " building Sharpnado.Shadows solution"
41-
$errorCode = msbuild .\Shadows\Shadows.sln /t:Build /p:Configuration=Release > build.txt
42-
43-
if ($errorCode -gt 0)
44-
{
45-
echo " Error while building solution, see build.txt for infos"
46-
return 3
47-
}
48-
49-
echo " building Sharpnado.Shadows.UWP x64 solution"
50-
$errorCode = msbuild .\Shadows\Shadows.UWP\Shadows.UWP.csproj /t:Build /p:Configuration=Release /p:Platform=x64 > build.x64.txt
48+
$errorCode = msbuild .\Shadows\Shadows.sln /t:Build /p:Configuration=Release
5149

52-
if ($errorCode -gt 0)
50+
if ($LastExitCode -gt 0)
5351
{
54-
echo " Error while building UWP x64 dll, see build.x64.txt for infos"
55-
return 4
52+
echo " Error while building solution"
53+
return
5654
}
5755

5856
$version = (Get-Item Shadows\Shadows\bin\Release\netstandard2.0\Sharpnado.Shadows.dll).VersionInfo.FileVersion

0 commit comments

Comments
 (0)