From f601b6d3d218ae7fdf25379988b465ca311dbe9f Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Thu, 20 Sep 2018 13:22:59 -0700 Subject: [PATCH] Fix #1450 Skip compilation on non-C# projects This change skips our 'temp' compilation that we do to implement 2-phase build for defining components in .cshtml when the project is not C# OR when the project has no .cshtml files. This should make the rest of the build-time Blazor functionality work for non-C# projects. This should also make the build faster when you have the Blazor targets imported in a C# project with no .cshtml files. --- .../targets/RazorCompilation.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Blazor.Build/targets/RazorCompilation.targets b/src/Microsoft.AspNetCore.Blazor.Build/targets/RazorCompilation.targets index bd51431962..dfca65945b 100644 --- a/src/Microsoft.AspNetCore.Blazor.Build/targets/RazorCompilation.targets +++ b/src/Microsoft.AspNetCore.Blazor.Build/targets/RazorCompilation.targets @@ -315,7 +315,7 @@ $(ResolvedCodeAnalysisRuleSet); @(AdditionalFiles)" Outputs="@(_BlazorTempAssembly);$(NonExistentFile)" - Condition="'$(DesignTimeBuild)'!='true'"> + Condition="'$(DesignTimeBuild)'!='true' AND '$(Language)'=='C#' AND '@(BlazorDeclaration)' != ''">