aspnetcore/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj

51 lines
2.2 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<AssemblyName>Microsoft.DotNet.Watcher.Tools.Tests</AssemblyName>
<DefaultItemExcludes>$(DefaultItemExcludes);TestProjects\**\*</DefaultItemExcludes>
<TestGroupName>DotNetWatcherToolsTests</TestGroupName>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(ToolSharedSourceRoot)TestHelpers\**\*.cs" />
<Content Include="TestProjects\**\*" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\dotnet-watch.csproj" />
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>DotnetPath</_Parameter1>
<_Parameter2>$(DotNetTool)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
<Target Name="CleanTestProjects" BeforeTargets="CoreCompile">
<RemoveDir Directories="$(TargetDir)TestProjects" Condition="Exists('$(TargetDir)TestProjects')" />
</Target>
<!-- Do not publish in source build -->
<Target Name="PublishDotNetWatchOnBuild" BeforeTargets="Build" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(ExcludeFromBuild)' != 'true'">
<MSBuild Projects="..\src\dotnet-watch.csproj"
Targets="Publish"
Properties="PublishDir=$(OutputPath)\tool\;Configuration=$(Configuration)" />
<Copy SourceFiles="$(ArtifactsBinDir)Microsoft.AspNetCore.Watch.BrowserRefresh\$(Configuration)\netcoreapp3.1\Microsoft.AspNetCore.Watch.BrowserRefresh.dll"
DestinationFolder="$(OutputPath)\tool\middleware" />
</Target>
<!-- Do not publish in source build -->
<Target Name="PublishDotNetWatchOnPublish" BeforeTargets="Publish" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(ExcludeFromBuild)' != 'true'">
<MSBuild Projects="..\src\dotnet-watch.csproj"
Targets="Publish"
Properties="PublishDir=$(PublishDir)\tool\;Configuration=$(Configuration)" />
<Copy SourceFiles="$(ArtifactsBinDir)Microsoft.AspNetCore.Watch.BrowserRefresh\$(Configuration)\netcoreapp3.1\Microsoft.AspNetCore.Watch.BrowserRefresh.dll"
DestinationFolder="$(PublishDir)\tool\middleware" />
</Target>
</Project>