Skip to content

Commit

Permalink
remove asmresolver.dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzhongke committed Mar 18, 2022
1 parent 53b450f commit 83aa804
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Zack.DotNetTrimmer/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"配置文件 1": {
"commandName": "Project",
"commandLineArgs": "--file \"E:\\主同步盘\\我的坚果云\\MyCode\\DOTNET\\Zack.DotNetTrimmer\\ProjectsForTest\\WinForm.NET5TeeChart-NET-Pro-Samples\\bin\\publish\\TeeChart Examples.exe\" --urls=http://localhost:5000/"
"commandLineArgs": " --record 1.json --file E:\\temp\\winformFX1\\winformFX1\\bin\\Debug\\winformFX1.exe"
}
}
}
2 changes: 1 addition & 1 deletion Zack.DotNetTrimmer/Zack.DotNetTrimmer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<FileVersion></FileVersion>
<AssemblyVersion>2.0.0.1</AssemblyVersion>
<AssemblyVersion>2.0.0.2</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 4 additions & 2 deletions Zack.DotNetTrimmerLib/PEHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ public static bool IsNetFrameworkApp(string startupFile)
{
return false;
}
var moduleDef = AsmResolver.DotNet.ModuleDefinition.FromFile(startupFile);
return moduleDef.OriginalTargetRuntime.Name == ".NETFramework";
using (var module = ModuleDefMD.Load(startupFile))
{
return module.RuntimeVersion.StartsWith("v4.");
}
}

public static bool IsSelfContainedApp(string startupFile)
Expand Down
1 change: 0 additions & 1 deletion Zack.DotNetTrimmerLib/Zack.DotNetTrimmerLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AsmResolver.DotNet" Version="4.9.0" />
<PackageReference Include="Microsoft.Diagnostics.NETCore.Client" Version="0.2.257301" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="2.0.74" />
<PackageReference Include="System.Reflection.Metadata" Version="6.0.0" />
Expand Down

0 comments on commit 83aa804

Please sign in to comment.