From 17cebfed516738101a98a33772cb65860e901a36 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Wed, 12 Aug 2020 12:10:07 -0400 Subject: [PATCH] fix(reg): [Wasm] Fix default styles not referenced (cherry picked from commit 066928eac45d788c203fc8e363fa0a7bce7b04ba) --- .../XamlGenerator/PlatformHelper.cs | 8 -------- .../XamlGenerator/XamlCodeGenerator.cs | 3 +-- src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.csproj | 14 +++++++++++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/PlatformHelper.cs b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/PlatformHelper.cs index 58493cfc52b9..88d53202f628 100644 --- a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/PlatformHelper.cs +++ b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/PlatformHelper.cs @@ -18,13 +18,5 @@ public static bool IsValidPlatform(SourceGeneratorContext context) return !evaluatedValue.Equals("UAP", StringComparison.OrdinalIgnoreCase); } - - public static bool IsReferenceUnoRuntimeIdentifier(SourceGeneratorContext context) - { - return context - .GetProjectInstance() - .GetProperty("UnoRuntimeIdentifier")?.EvaluatedValue?.Equals("Reference", StringComparison.OrdinalIgnoreCase) ?? false; - } - } } diff --git a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGenerator.cs b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGenerator.cs index 3ed2a7c56128..43a6e4a91ec1 100644 --- a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGenerator.cs +++ b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlCodeGenerator.cs @@ -17,8 +17,7 @@ public override void Execute(SourceGeneratorContext context) context.Project ); - if (PlatformHelper.IsValidPlatform(context) - && !PlatformHelper.IsReferenceUnoRuntimeIdentifier(context)) + if (PlatformHelper.IsValidPlatform(context)) { var genereratedTrees = gen.Generate(); diff --git a/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.csproj b/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.csproj index 6c284dd72dc0..f924d7dc6560 100644 --- a/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.csproj +++ b/src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.csproj @@ -14,12 +14,20 @@ true Uno.UI.FluentTheme Uno.UI.FluentTheme - + false true - + Reference - + + + true + true Uno.UI