Skip to content

Commit

Permalink
Merge pull request #2628 from jeromelaban/dev/jela/uno4
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel authored Dec 2, 2021
2 parents 3ee21f0 + 4845a4d commit 413fdf3
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 106 deletions.
5 changes: 5 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,9 @@

</Target>

<ItemGroup>
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.18362.22" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.22" />
</ItemGroup>

</Project>
36 changes: 17 additions & 19 deletions Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,30 @@

<!-- Uno -->
<ItemGroup>
<PackageReference Update="Uno.UI" Version="3.8.11" />
<PackageReference Update="Uno.WinUI" Version="3.8.11" />
<PackageReference Update="Uno.Core" Version="2.4.0" />
<PackageReference Update="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.3-uno.92" />
<PackageReference Update="Uno.Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.3-uno.92" />
<PackageReference Update="Uno.UI" Version="4.0.8" />
<PackageReference Update="Uno.WinUI" Version="4.0.8" />
<PackageReference Update="Uno.Core" Version="4.0.1" />
<PackageReference Update="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.3.0-uno.12" />
<PackageReference Update="Uno.Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.3.0-uno.12" />
<PackageReference Update="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.1" />
<PackageReference Update="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.4" />
<PackageReference Update="Uno.UI.RemoteControl" Version="3.8.11" />
<PackageReference Update="Uno.WinUI.RemoteControl" Version="3.8.11" />
<PackageReference Update="Uno.UniversalImageLoader" Version="1.9.33" />
<PackageReference Update="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.8" />
<PackageReference Update="Uno.UI.RemoteControl" Version="4.0.8" />
<PackageReference Update="Uno.WinUI.RemoteControl" Version="4.0.8" />
<PackageReference Update="Uno.UniversalImageLoader" Version="1.9.35" />
<PackageReference Update="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Update="Uno.Extensions.Logging.WebAssembly.Console" Version="1.1.0" />
<PackageReference Update="Uno.Extensions.Logging.OSLog " Version="1.1.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
<PackageReference Update="Uno.UI.WebAssembly" Version="3.8.11" />
<PackageReference Update="Uno.WinUI.Skia.Gtk" Version="3.8.11" />
<PackageReference Update="Uno.WinUI.Skia.Wpf" Version="3.8.11" />
<PackageReference Update="Uno.WinUI.WebAssembly" Version="3.8.11" />
<PackageReference Update="Uno.Wasm.Bootstrap" Version="2.1.0" />
<PackageReference Update="Uno.Wasm.Bootstrap.DevServer" Version="2.1.0" />
<PackageReference Update="Uno.UI.WebAssembly" Version="4.0.8" />
<PackageReference Update="Uno.WinUI.Skia.Gtk" Version="4.0.8" />
<PackageReference Update="Uno.WinUI.Skia.Wpf" Version="4.0.8" />
<PackageReference Update="Uno.WinUI.WebAssembly" Version="4.0.8" />
<PackageReference Update="Uno.Wasm.Bootstrap" Version="3.1.2" />
<PackageReference Update="Uno.Wasm.Bootstrap.DevServer" Version="3.1.2" />
<PackageReference Update="Microsoft.Windows.Compatibility" Version="5.0.2" />
<PackageReference Update="Microsoft.ProjectReunion" Version="0.8.0" />
<PackageReference Update="Microsoft.ProjectReunion.Foundation" Version="0.5.0" />
<PackageReference Update="Microsoft.ProjectReunion.WinUI" Version="0.8.0" />

<PackageReference Update="Microsoft.WindowsAppSDK" Version="1.0.0" />
<PackageReference Update="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.196"/>
<PackageReference Update="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.11" />
</ItemGroup>

Expand Down
11 changes: 7 additions & 4 deletions e2e/Uno/HelloUnoWorld.Shared/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,17 @@ protected override UIElement CreateShell()

#if NET5_0 && WINDOWS
_window = new Window();
_window.Activate();
_window.Content = shell;
#endif

#endif
#if HAS_UNO_WINUI || NETCOREAPP
MainXamlRoot = shell.XamlRoot;
shell.Loaded += (s, e) => {
MainXamlRoot = shell.XamlRoot;
};
#endif

_window.Activate();
_window.Content = shell;

return shell;
}

Expand Down
6 changes: 4 additions & 2 deletions e2e/Uno/HelloWorld.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29403.142
# Visual Studio Version 17
VisualStudioVersion = 17.1.31903.286
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Prism.Uno", "..\..\src\Uno\Prism.Uno\Prism.Uno.csproj", "{B2A9C972-BD7A-4A95-B62C-F8385B819900}"
EndProject
Expand Down Expand Up @@ -1075,6 +1075,7 @@ Global
{19A48274-D9E3-4855-8900-C9C32198B509}.AppStore|x86.Deploy.0 = Debug|x86
{19A48274-D9E3-4855-8900-C9C32198B509}.Debug|Any CPU.ActiveCfg = Debug|x86
{19A48274-D9E3-4855-8900-C9C32198B509}.Debug|Any CPU.Build.0 = Debug|x86
{19A48274-D9E3-4855-8900-C9C32198B509}.Debug|Any CPU.Deploy.0 = Debug|x86
{19A48274-D9E3-4855-8900-C9C32198B509}.Debug|ARM.ActiveCfg = Debug|x86
{19A48274-D9E3-4855-8900-C9C32198B509}.Debug|arm64.ActiveCfg = Debug|arm64
{19A48274-D9E3-4855-8900-C9C32198B509}.Debug|arm64.Build.0 = Debug|arm64
Expand Down Expand Up @@ -1253,6 +1254,7 @@ Global
{7DC51F24-0117-48FE-A07E-11773E6C4A0C}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
{7DC51F24-0117-48FE-A07E-11773E6C4A0C}.Debug|arm64.ActiveCfg = Debug|iPhoneSimulator
{7DC51F24-0117-48FE-A07E-11773E6C4A0C}.Debug|iPhone.ActiveCfg = Debug|iPhoneSimulator
{7DC51F24-0117-48FE-A07E-11773E6C4A0C}.Debug|iPhone.Build.0 = Debug|iPhoneSimulator
{7DC51F24-0117-48FE-A07E-11773E6C4A0C}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{7DC51F24-0117-48FE-A07E-11773E6C4A0C}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{7DC51F24-0117-48FE-A07E-11773E6C4A0C}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
Expand Down
8 changes: 7 additions & 1 deletion e2e/Uno/ModuleA/ModuleA.WinUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@
<GenerateLibraryLayout>true</GenerateLibraryLayout>
<DefineConstants>$(DefineConstants);HAS_WINUI</DefineConstants>
<AssemblyName>ModuleA</AssemblyName>
<UseWinUI>true</UseWinUI>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<DefineConstants>$(DefineConstants);__WASM__</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('xamarinios')) or $(TargetFramework.StartsWith('xamarinmac')) or $(TargetFramework.StartsWith('MonoAndroid')) or $(TargetFramework.StartsWith('netstandard'))">
<PackageReference Include="Uno.WinUI" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net5.0-windows10.0.18362'">
<PackageReference Include="Microsoft.WindowsAppSDK" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'!='net5.0-windows10.0.18362'">
<Page Include="**\*.xaml" Exclude="bin\**\*.xaml;obj\**\*.xaml" />
<Page Include="**\*.xaml" Exclude="bin\**\*.xaml;obj\**\*.xaml">
<XamlRuntime>WinUI</XamlRuntime>
</Page>
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.ProjectReunion" />
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
<PackageReference Include="Uno.Core" />
<Manifest Include="$(ApplicationManifest)" />
Expand All @@ -27,8 +27,8 @@

<ItemGroup>
<!-- CI Isn't picking up 5.0.6 or later -->
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.18362.16" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.16" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.18362.22" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.22" />
</ItemGroup>

<Import Project="..\..\HelloUnoWorld.Shared\HelloUnoWorld.Shared.projitems" Label="Shared" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,92 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0"
DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '15.0'">
<VisualStudioVersion>15.0</VisualStudioVersion>
<VisualStudioVersion>15.0</VisualStudioVersion>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|arm64">
<Configuration>Debug</Configuration>
<Platform>arm64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|arm64">
<Configuration>Release</Configuration>
<Platform>arm64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|arm64">
<Configuration>Debug</Configuration>
<Platform>arm64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|arm64">
<Configuration>Release</Configuration>
<Platform>arm64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
<PathToXAMLWinRTImplementations>HelloUnoWorld.Windows.Desktop\</PathToXAMLWinRTImplementations>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
<PathToXAMLWinRTImplementations>HelloUnoWorld.Windows.Desktop\</PathToXAMLWinRTImplementations>
</PropertyGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
<PropertyGroup>
<ProjectGuid>19a48274-d9e3-4855-8900-c9c32198b509</ProjectGuid>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<AppxTargetsLocation Condition="'$(AppxTargetsLocation)'==''">$(MSBuildThisFileDirectory)build\</AppxTargetsLocation>
<ProjectGuid>19a48274-d9e3-4855-8900-c9c32198b509</ProjectGuid>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<AssetTargetFallback>net5.0-windows$(TargetPlatformVersion);$(AssetTargetFallback)</AssetTargetFallback>
<DefaultLanguage>en-US</DefaultLanguage>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<EntryPointProjectUniqueName>..\HelloUnoWorld.Windows.Desktop\HelloUnoWorld.Windows.Desktop.csproj</EntryPointProjectUniqueName>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Images\SplashScreen.scale-200.png" />
<Content Include="Images\LockScreenLogo.scale-200.png" />
<Content Include="Images\Square150x150Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Images\StoreLogo.png" />
<Content Include="Images\Wide310x150Logo.scale-200.png" />
<Content Include="Images\SplashScreen.scale-200.png" />
<Content Include="Images\LockScreenLogo.scale-200.png" />
<Content Include="Images\Square150x150Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Images\StoreLogo.png" />
<Content Include="Images\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HelloUnoWorld.Windows.Desktop\HelloUnoWorld.Windows.Desktop.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
<PublishProfile>Properties\PublishProfiles\win10-$(Platform).pubxml</PublishProfile>
</ProjectReference>
<ProjectReference Include="..\HelloUnoWorld.Windows.Desktop\HelloUnoWorld.Windows.Desktop.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
<PublishProfile>Properties\PublishProfiles\win10-$(Platform).pubxml</PublishProfile>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<!--PackageReference.GeneratePathProperty does not support NUGET_PACKAGES env var...-->
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)'==''">$(NUGET_PACKAGES)</NuGetPackageRoot>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)'==''">$(UserProfile)\.nuget\packages</NuGetPackageRoot>
<PkgMicrosoft_ProjectReunion Condition="'$(PkgMicrosoft_ProjectReunion)'==''">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'Microsoft.ProjectReunion', '0.5.0'))</PkgMicrosoft_ProjectReunion>
<PkgMicrosoft_ProjectReunion Condition="!Exists($(PkgMicrosoft_ProjectReunion))">$(SolutionDir)packages\Microsoft.ProjectReunion.0.5.0-prerelease\</PkgMicrosoft_ProjectReunion>
<PkgMicrosoft_ProjectReunion_WinUI Condition="'$(PkgMicrosoft_ProjectReunion_WinUI)'==''">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'Microsoft.ProjectReunion.WinUI', '0.5.0'))</PkgMicrosoft_ProjectReunion_WinUI>
<PkgMicrosoft_ProjectReunion_WinUI Condition="!Exists($(PkgMicrosoft_ProjectReunion_WinUI))">$(SolutionDir)packages\Microsoft.ProjectReunion.WinUI.0.5.0\</PkgMicrosoft_ProjectReunion_WinUI>
<Microsoft_ProjectReunion_AppXReference_props>$([MSBuild]::NormalizeDirectory('$(PkgMicrosoft_ProjectReunion)', 'build'))Microsoft.ProjectReunion.AppXReference.props</Microsoft_ProjectReunion_AppXReference_props>
<Microsoft_WinUI_AppX_targets>$([MSBuild]::NormalizeDirectory('$(PkgMicrosoft_ProjectReunion_WinUI)', 'build'))Microsoft.WinUI.AppX.targets</Microsoft_WinUI_AppX_targets>
<EntryPointProjectUniqueName>..\HelloUnoWorld.Windows.Desktop\HelloUnoWorld.Windows.Desktop.csproj</EntryPointProjectUniqueName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ProjectReunion"
GeneratePathProperty="true">
<ExcludeAssets>all</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.ProjectReunion.WinUI"
GeneratePathProperty="true">
<ExcludeAssets>all</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.WindowsAppSDK">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
<Import Project="$(Microsoft_ProjectReunion_AppXReference_props)" />
<Import Project="$(Microsoft_WinUI_AppX_targets)" />
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"allowPrerelease": false
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.23",
"MSBuild.Sdk.Extras": "3.0.38",
"Microsoft.Build.CentralPackageVersions": "2.0.79"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ public static bool CheckAccess(this DependencyObject instance)
{
// Dispatcher queue HasThreadAccess is not yet implemented in Uno, we can fall back on CoreDispatcher
// See https://github.com/unoplatform/uno/issues/5818
#if __ANDROID__ || __IOS__ || __MACOS__
if(ApiInformation.IsPropertyPresent("Microsoft.System.DispatcherQueue", nameof(Microsoft.System.DispatcherQueue.HasThreadAccess)))
#else
if(ApiInformation.IsPropertyPresent("Microsoft.UI.Dispatching.DispatcherQueue", nameof(Microsoft.UI.Dispatching.DispatcherQueue.HasThreadAccess)))
#endif
{
return instance.DispatcherQueue.HasThreadAccess;
}
Expand Down

0 comments on commit 413fdf3

Please sign in to comment.