Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ Copyright (c) .NET Foundation. All rights reserved.
This property affects C# projects targeting 3.0 or later.
-->
<RazorUpToDateReloadFileTypes>.cs;.razor;.resx;.cshtml</RazorUpToDateReloadFileTypes>

<!--
Target used by dotnet-watch to resolve additional items.
-->
<CustomCollectWatchItems>$(CustomCollectWatchItems);_RazorSdkCustomCollectWatchItems</CustomCollectWatchItems>
</PropertyGroup>

<ItemGroup Condition="'$(EnableDefaultItems)' == 'true' And '$(EnableDefaultContentItems)' == 'true'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,6 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<UpToDateCheckBuilt Include="@(RazorIntermediateAssembly)"
Condition="'$(RazorCompileOnBuild)'=='true' AND '@(Content->WithMetadataValue('Extension', '.cshtml'))' != ''" Set="RazorViews" />

<!-- Set up watchers for dotnet-watch -->
<Watch Include="@(Content->WithMetadataValue('Extension', '.razor'))" />

<Watch Include="@(Content->WithMetadataValue('Extension', '.cshtml'))"
Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true' AND '$(AddCshtmlFilesToDotNetWatchList)' != 'false'" />
</ItemGroup>

<!--
Expand Down Expand Up @@ -870,6 +864,15 @@ Copyright (c) .NET Foundation. All rights reserved.
</PropertyGroup>
</Target>

<Target Name="_RazorSdkCustomCollectWatchItems">
<ItemGroup>
<Watch Include="%(Content.FullPath)" Condition="'%(Content.Extension)' == '.razor' AND '%(Content.Watch)' != 'false'" />
<Watch Include="%(Content.FullPath)" Condition="'%(Content.Extension)' == '.razor.css' AND '%(Content.Watch)' != 'false'" />
<Watch Include="%(Content.FullPath)"
Condition="'$(_Targeting30OrNewerRazorLangVersion)' == 'true' AND '$(AddCshtmlFilesToDotNetWatchList)' != 'false' AND '%(Content.Extension)' == '.cshtml' AND '%(Content.Watch)' != 'false'" />
</ItemGroup>
</Target>

<PropertyGroup Condition="'$(RazorDesignTimeTargets)'==''">
<RazorDesignTimeTargets>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Razor\Microsoft.NET.Sdk.Razor.DesignTime.targets</RazorDesignTimeTargets>
<RazorDesignTimeTargets Condition="!Exists('$(RazorDesignTimeTargets)')">$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.Razor.DesignTime.targets</RazorDesignTimeTargets>
Expand Down
1 change: 1 addition & 0 deletions src/Tools/dotnet-watch/src/assets/DotNetWatch.targets
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Returns: @(Watch)
</_CollectWatchItemsDependsOn>
<_CollectWatchItemsDependsOn Condition=" '$(TargetFramework)' != '' ">
_CoreCollectWatchItems;
$(CustomCollectWatchItems);
</_CollectWatchItemsDependsOn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.net