Skip to content

Commit 161b97e

Browse files
Add dotnet watch support to .props/.targets files (#305)
* Initial plan * Add dotnet watch to all .props/.targets files Co-authored-by: TheAngryByrd <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: TheAngryByrd <[email protected]>
1 parent c47c0ec commit 161b97e

14 files changed

+67
-0
lines changed

Content/Console/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ See https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-director
44
-->
55

66
<Project>
7+
<ItemGroup>
8+
<!-- Dotnet Watch to know about this file -->
9+
<Watch Include="$(MSBuildThisFileFullPath)"/>
10+
</ItemGroup>
11+
712
<PropertyGroup>
813
<PackageTags>f#, fsharp</PackageTags>
914
<PackageProjectUrl>https://github.com/MyGithubUsername/MyLib.1</PackageProjectUrl>

Content/Console/Directory.Build.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ See
44
https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets
55
-->
66
<Project>
7+
<ItemGroup>
8+
<!-- Dotnet Watch to know about this file -->
9+
<Watch Include="$(MSBuildThisFileFullPath)"/>
10+
</ItemGroup>
711

812
<PropertyGroup>
913
<_BuildProjBaseIntermediateOutputPath>$(MSBuildThisFileDirectory)build/obj/</_BuildProjBaseIntermediateOutputPath>

Content/Console/Directory.Packages.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<!-- https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management -->
22
<Project>
3+
<ItemGroup>
4+
<!-- Dotnet Watch to know about this file -->
5+
<Watch Include="$(MSBuildThisFileFullPath)"/>
6+
</ItemGroup>
7+
38
<PropertyGroup>
49
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
510
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

Content/Console/src/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<Project>
2+
<ItemGroup>
3+
<!-- Dotnet Watch to know about this file -->
4+
<Watch Include="$(MSBuildThisFileFullPath)"/>
5+
</ItemGroup>
6+
27
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
38
<PropertyGroup>
49
<IsTestProject>false</IsTestProject>

Content/Console/tests/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<Project>
2+
<ItemGroup>
3+
<!-- Dotnet Watch to know about this file -->
4+
<Watch Include="$(MSBuildThisFileFullPath)"/>
5+
</ItemGroup>
6+
27
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
38
<PropertyGroup>
49
<IsTestProject>true</IsTestProject>

Content/Library/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ See https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-director
55
-->
66

77
<Project>
8+
<ItemGroup>
9+
<!-- Dotnet Watch to know about this file -->
10+
<Watch Include="$(MSBuildThisFileFullPath)"/>
11+
</ItemGroup>
12+
813
<PropertyGroup>
914
<PackageTags>f#, fsharp</PackageTags>
1015
<PackageProjectUrl>https://github.com/MyGithubUsername/MyLib.1</PackageProjectUrl>

Content/Library/Directory.Build.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ See
44
https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets
55
-->
66
<Project>
7+
<ItemGroup>
8+
<!-- Dotnet Watch to know about this file -->
9+
<Watch Include="$(MSBuildThisFileFullPath)"/>
10+
</ItemGroup>
711

812
<PropertyGroup>
913
<_BuildProjBaseIntermediateOutputPath>$(MSBuildThisFileDirectory)build/obj/</_BuildProjBaseIntermediateOutputPath>

Content/Library/Directory.Packages.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<!-- https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management -->
22
<Project>
3+
<ItemGroup>
4+
<!-- Dotnet Watch to know about this file -->
5+
<Watch Include="$(MSBuildThisFileFullPath)"/>
6+
</ItemGroup>
7+
38
<PropertyGroup>
49
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
510
<RestoreLockedMode>true</RestoreLockedMode>

Content/Library/src/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<Project>
2+
<ItemGroup>
3+
<!-- Dotnet Watch to know about this file -->
4+
<Watch Include="$(MSBuildThisFileFullPath)"/>
5+
</ItemGroup>
6+
27
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
38
<PropertyGroup>
49
<GenerateDocumentationFile>true</GenerateDocumentationFile>

Content/Library/tests/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<Project>
2+
<ItemGroup>
3+
<!-- Dotnet Watch to know about this file -->
4+
<Watch Include="$(MSBuildThisFileFullPath)"/>
5+
</ItemGroup>
6+
27
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
38
<PropertyGroup>
49
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)