Skip to content

Commit

Permalink
Merge pull request #3792 from unoplatform/mergify/bp/release/stable/3…
Browse files Browse the repository at this point in the history
….0/pr-3790

fix(reg): [Wasm] Fix default styles not referenced (bp #3790)
  • Loading branch information
jeromelaban authored Aug 12, 2020
2 parents b5b40df + 17cebfe commit 0a2692c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
14 changes: 11 additions & 3 deletions src/Uno.UI.FluentTheme/Uno.UI.FluentTheme.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>Uno.UI.FluentTheme</AssemblyName>
<RootNamespace>Uno.UI.FluentTheme</RootNamespace>

<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<Deterministic>true</Deterministic>

<UnoRuntimeIdentifier Condition="'$(TargetFramework)'=='netstandard2.0'">Reference</UnoRuntimeIdentifier>


<!--
Disable source generation for Uno.UI.Fluent for netstandard2.0 so
that we don't generate the global static resources for the reference target.
This will allow for the Uno.UI.Fluent to be linked out if XamlControlsResources
is not referenced in the app.
-->
<BuildingInsideUnoSourceGenerator Condition="'$(UnoRuntimeIdentifier)'=='Reference'">true</BuildingInsideUnoSourceGenerator>

<UseCommonOverridePackage>true</UseCommonOverridePackage>
<CommonOverridePackageId>Uno.UI</CommonOverridePackageId>
</PropertyGroup>
Expand Down

0 comments on commit 0a2692c

Please sign in to comment.