Skip to content

Commit

Permalink
Merge pull request #56 from Cysharp/feature/ArtifactsPath
Browse files Browse the repository at this point in the history
Use ArtifactsPath
  • Loading branch information
mayuki authored Mar 13, 2024
2 parents c074af3 + d8719a9 commit ba1ad44
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/YetAnotherHttpHandler/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BaseIntermediateOutputPath>.output\obj\</BaseIntermediateOutputPath>
<BaseOutputPath>.output\bin\</BaseOutputPath>
</PropertyGroup>
<ItemGroup>
<None Remove=".output\**\**.*" />
<None Remove="obj\**\*.*;bin\**\*.*" />
<Compile Remove=".output\**\**.*" />
<Compile Remove="bin\**\*.*;obj\**\*.*" />
<EmbeddedResource Remove=".output\**\**.*" />
<EmbeddedResource Remove="bin\**\*.*;obj\**\*.*" />
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Override the output path of build artifacts.
This is necessary to change the path to one with a dot(.) prefix to hide generated items from Unity.
-->
<PropertyGroup>
<!-- Using .NET 8 and later, use ArtifactsPath property. -->
<!-- https://learn.microsoft.com/en-us/dotnet/core/sdk/artifacts-output -->
<ArtifactsPath>$(MSBuildThisFileDirectory).artifacts</ArtifactsPath>
<!-- Using .NET 7 and ealier, use BaseIntermediateOutputPath and BaseOutputPath property instead. -->
<!-- NOTE: Currently, even if .NET 8 SDK is installed, MessagePack.Generator still requires these properties to be set. -->
<BaseIntermediateOutputPath>.artifacts\obj\</BaseIntermediateOutputPath>
<BaseOutputPath>.artifacts\bin\</BaseOutputPath>
</PropertyGroup>
</Project>
19 changes: 19 additions & 0 deletions src/YetAnotherHttpHandler/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Hide Unity-specific files from Visual Studio and .NET SDK -->
<ItemGroup>
<None Remove="**\package.json" />
<None Remove="**\*.asmdef" />
<None Remove="**\*.meta" />
</ItemGroup>

<!-- Hide build artifacts from Visual Studio and .NET SDK -->
<ItemGroup>
<None Remove=".artifacts\**\**.*" />
<None Remove="obj\**\*.*;bin\**\*.*" />
<Compile Remove=".artifacts\**\**.*" />
<Compile Remove="bin\**\*.*;obj\**\*.*" />
<EmbeddedResource Remove=".artifacts\**\**.*" />
<EmbeddedResource Remove="bin\**\*.*;obj\**\*.*" />
</ItemGroup>
</Project>

0 comments on commit ba1ad44

Please sign in to comment.