Skip to content

Commit b9e9500

Browse files
committed
add nuget package for cleaning unused dependencies dll
1 parent f46b050 commit b9e9500

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

LyricsDisplayerPlugin/LyricsDisplayerPlugin.csproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1414
<Deterministic>true</Deterministic>
15+
<NuGetPackageImportStamp>
16+
</NuGetPackageImportStamp>
1517
</PropertyGroup>
1618
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1719
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -26,8 +28,9 @@
2628
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2729
<PlatformTarget>AnyCPU</PlatformTarget>
2830
<DebugType>pdbonly</DebugType>
31+
<TrimUnusedDependencies>true</TrimUnusedDependencies>
2932
<Optimize>true</Optimize>
30-
<OutputPath>bin\Release\</OutputPath>
33+
<OutputPath>..\..\Sync\Release\Plugins\</OutputPath>
3134
<DefineConstants>TRACE</DefineConstants>
3235
<ErrorReport>prompt</ErrorReport>
3336
<WarningLevel>4</WarningLevel>
@@ -82,4 +85,11 @@
8285
</ProjectReference>
8386
</ItemGroup>
8487
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
88+
<Import Project="..\..\Sync\OfficalPlugins\ExtraWorkspace\My_Sync_Plugin\packages\Microsoft.Packaging.Tools.Trimming.1.1.0-preview1-26619-01\build\Microsoft.Packaging.Tools.Trimming.targets" Condition="Exists('..\..\Sync\OfficalPlugins\ExtraWorkspace\My_Sync_Plugin\packages\Microsoft.Packaging.Tools.Trimming.1.1.0-preview1-26619-01\build\Microsoft.Packaging.Tools.Trimming.targets')" />
89+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
90+
<PropertyGroup>
91+
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
92+
</PropertyGroup>
93+
<Error Condition="!Exists('..\..\Sync\OfficalPlugins\ExtraWorkspace\My_Sync_Plugin\packages\Microsoft.Packaging.Tools.Trimming.1.1.0-preview1-26619-01\build\Microsoft.Packaging.Tools.Trimming.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Sync\OfficalPlugins\ExtraWorkspace\My_Sync_Plugin\packages\Microsoft.Packaging.Tools.Trimming.1.1.0-preview1-26619-01\build\Microsoft.Packaging.Tools.Trimming.targets'))" />
94+
</Target>
8595
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3+
<package id="Microsoft.Packaging.Tools.Trimming" version="1.1.0-preview1-26619-01" targetFramework="net461" />
34
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
45
</packages>

LyricsFinder/LyricsFinder.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
<Company>OsuSync</Company>
1010
</PropertyGroup>
1111

12+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
13+
<OutputPath></OutputPath>
14+
</PropertyGroup>
15+
1216
<ItemGroup>
1317
<Reference Include="Newtonsoft.Json">
1418
<HintPath>..\..\Sync\Sync\bin\Debug\Newtonsoft.Json.dll</HintPath>

0 commit comments

Comments
 (0)