Skip to content

Commit

Permalink
Fix mpc run failure at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
mayuki committed Feb 5, 2024
1 parent f218fb5 commit 3668a65
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ on:
- '**.md'
- .github/**
- docs/**
- samples/**
pull_request:
branches:
- main
paths-ignore:
- '**.md'
- .github/**
- docs/**
- samples/**

env:
BUILD_CONFIG: Debug
Expand Down
6 changes: 0 additions & 6 deletions samples/ChatApp/ChatApp.Shared/ChatApp.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<None Remove="**\package.json" />
<None Remove="**\*.asmdef" />
<None Remove="**\*.meta" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\MagicOnion.Abstractions\MagicOnion.Abstractions.csproj" />
</ItemGroup>
Expand Down
20 changes: 11 additions & 9 deletions samples/ChatApp/ChatApp.Shared/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
prior to .NET 8
<BaseIntermediateOutputPath>.artifacts\obj\</BaseIntermediateOutputPath>
<BaseOutputPath>.artifacts\bin\</BaseOutputPath>
-->

<!-- after .NET 8: https://learn.microsoft.com/en-us/dotnet/core/sdk/artifacts-output -->
<!-- Unity ignores . prefix folder -->
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 samples/ChatApp/ChatApp.Shared/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>
7 changes: 7 additions & 0 deletions samples/ChatApp/ChatApp.Shared/Directory.Build.targets.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3668a65

Please sign in to comment.