Skip to content

Commit

Permalink
Merge pull request #151 from andy840119/slave/assembly-pack
Browse files Browse the repository at this point in the history
Fix assembly not found issue in release
  • Loading branch information
andy840119 authored Aug 1, 2020
2 parents 8fe4077 + 76f0f9d commit 9cab521
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./osu.Game.Rulesets.Karaoke/bin/Release/netstandard2.1/osu.Game.Rulesets.Karaoke.dll
asset_path: ./osu.Game.Rulesets.Karaoke/bin/Release/netstandard2.1/osu.Game.Rulesets.Karaoke.Packed.Packed.dll
asset_name: osu.Game.Rulesets.Karaoke.dll
asset_content_type: application/vnd.microsoft.portable-executable
- name: Generate changelog
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Karaoke.Tests/VisualTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static class VisualTestRunner
[STAThread]
public static int Main(string[] args)
{
using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true))
using (DesktopGameHost host = Host.GetSuitableHost(@"karaoke-visual-test-runner", true))
{
host.Run(new OsuTestBrowser());
return 0;
Expand Down
31 changes: 30 additions & 1 deletion osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyTitle>osu.Game.Rulesets.Sample</AssemblyTitle>
<AssemblyTitle>osu.Game.Rulesets.Karaoke</AssemblyTitle>
<OutputType>Library</OutputType>
<PlatformTarget>AnyCPU</PlatformTarget>
<RootNamespace>osu.Game.Rulesets.Karaoke</RootNamespace>
Expand All @@ -10,6 +10,7 @@
<EmbeddedResource Include="Resources\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ILRepack.MSBuild.Task" Version="2.0.13" />
<PackageReference Include="Octokit" Version="0.48.0" />
<PackageReference Include="osu.Framework.Microphone" Version="1.0.10" />
<PackageReference Include="ppy.osu.Game" Version="2020.725.0" />
Expand All @@ -26,4 +27,32 @@
<_Parameter1>$(AssemblyName).Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<!--We need to copy framework assembly to the output, else ILRepack will fail to resolve framework assembly.-->
<PropertyGroup Condition=" '$(Configuration)'=='Release' ">
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<Target Name="ILRepack" AfterTargets="Build" Condition=" '$(Configuration)'=='Release' ">
<PropertyGroup>
<WorkingDirectory>$(MSBuildThisFileDirectory)bin\$(Configuration)\$(TargetFramework)</WorkingDirectory>
</PropertyGroup>

<ItemGroup>
<InputAssemblies Include="LyricMaker.dll" />
<InputAssemblies Include="NicoKaraParser.dll" />
<InputAssemblies Include="NWaves.dll" />
<InputAssemblies Include="Octokit.dll" />
<InputAssemblies Include="osu.Framework.Microphone.dll" />
<InputAssemblies Include="osu.KaraokeFramework.dll" />
</ItemGroup>

<ItemGroup>
<InternalizeExcludeAssemblies Include="osu.Game.dll" />
<InternalizeExcludeAssemblies Include="osu.Framework.dll" />
</ItemGroup>

<ILRepack OutputType="$(OutputType)" MainAssembly="$(AssemblyName).dll" OutputAssembly="$(AssemblyName).Packed.dll" InputAssemblies="@(InputAssemblies)" InternalizeExcludeAssemblies="@(InternalizeExcludeAssemblies)" WorkingDirectory="$(WorkingDirectory)" />

</Target>
</Project>

0 comments on commit 9cab521

Please sign in to comment.