Skip to content

Commit ade53be

Browse files
author
msftbot[bot]
authored
Merge pull request #25393 from dotnet-maestro-bot/merge/release/5.0-to-master
[automated] Merge branch 'release/5.0' => 'master'
2 parents 7e9e03b + f306ab8 commit ade53be

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ Copyright (c) .NET Foundation. All rights reserved.
7878
This property affects C# projects targeting 3.0 or later.
7979
-->
8080
<RazorUpToDateReloadFileTypes>.cs;.razor;.resx;.cshtml</RazorUpToDateReloadFileTypes>
81+
82+
<!--
83+
Target used by dotnet-watch to resolve additional items.
84+
-->
85+
<CustomCollectWatchItems>$(CustomCollectWatchItems);_RazorSdkCustomCollectWatchItems</CustomCollectWatchItems>
8186
</PropertyGroup>
8287

8388
<ItemGroup Condition="'$(EnableDefaultItems)' == 'true' And '$(EnableDefaultContentItems)' == 'true'">

src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,6 @@ Copyright (c) .NET Foundation. All rights reserved.
327327
-->
328328
<UpToDateCheckBuilt Include="@(RazorIntermediateAssembly)"
329329
Condition="'$(RazorCompileOnBuild)'=='true' AND '@(Content->WithMetadataValue('Extension', '.cshtml'))' != ''" Set="RazorViews" />
330-
331-
<!-- Set up watchers for dotnet-watch -->
332-
<Watch Include="@(Content->WithMetadataValue('Extension', '.razor'))" />
333-
334-
<Watch Include="@(Content->WithMetadataValue('Extension', '.cshtml'))"
335-
Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true' AND '$(AddCshtmlFilesToDotNetWatchList)' != 'false'" />
336330
</ItemGroup>
337331

338332
<!--
@@ -870,6 +864,15 @@ Copyright (c) .NET Foundation. All rights reserved.
870864
</PropertyGroup>
871865
</Target>
872866

867+
<Target Name="_RazorSdkCustomCollectWatchItems">
868+
<ItemGroup>
869+
<Watch Include="%(Content.FullPath)" Condition="'%(Content.Extension)' == '.razor' AND '%(Content.Watch)' != 'false'" />
870+
<Watch Include="%(Content.FullPath)" Condition="'%(Content.Extension)' == '.razor.css' AND '%(Content.Watch)' != 'false'" />
871+
<Watch Include="%(Content.FullPath)"
872+
Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true' AND '$(AddCshtmlFilesToDotNetWatchList)' != 'false' AND '%(Content.Extension)' == '.cshtml' AND '%(Content.Watch)' != 'false'" />
873+
</ItemGroup>
874+
</Target>
875+
873876
<PropertyGroup Condition="'$(RazorDesignTimeTargets)'==''">
874877
<RazorDesignTimeTargets>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Razor\Microsoft.NET.Sdk.Razor.DesignTime.targets</RazorDesignTimeTargets>
875878
<RazorDesignTimeTargets Condition="!Exists('$(RazorDesignTimeTargets)')">$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.Razor.DesignTime.targets</RazorDesignTimeTargets>

src/Tools/dotnet-watch/src/assets/DotNetWatch.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Returns: @(Watch)
4141
</_CollectWatchItemsDependsOn>
4242
<_CollectWatchItemsDependsOn Condition=" '$(TargetFramework)' != '' ">
4343
_CoreCollectWatchItems;
44+
$(CustomCollectWatchItems);
4445
</_CollectWatchItemsDependsOn>
4546
</PropertyGroup>
4647

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.net

0 commit comments

Comments
 (0)