il-repack
il-repack copied to clipboard
Migrate to vanilla 0.10 cecil
Here's my take on the topic. In order to use completely vanilla cecil I've moved Win32 resource handling into a separate step that includes minimal PE reader/writer based on cecil implementation.
When it will be merged? I want to build ILRepack for .NET Core, which allows run ILRepack on Linux without Mono. It requires updated Cecil. @gluck
@epeshk if you wish you can use avostres.ILRepack package as a stopgap solution - it includes this PR
But it's so cool to have latest features and improvements in the mainline, right?
Yup, that's why this pull request exists in the first place :)
With this PR ILRepack fails if output directory was not created with: System.IO.DirectoryNotFoundException: Could not find a part of the path. at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath) at System.IO.File.Move(String sourceFileName, String destFileName) at ILRepacking.ILRepack.MoveTempFile(String tempFile, String outFile) at ILRepacking.ILRepack.Repack() at ILRepacking.Application.Main(String[] args)
AppVeyor builds are now failing even with Previous 2017 version - there's problem with ProjectFileParser component
@Alexx999 Great work! 👍 I have a working .netcoreapp 2.1
, netstandard2.0
, net45
build based of https://github.com/peters/il-repack/tree/netcoreapp2.2 and published at https://www.nuget.org/packages/ILRepack.MSBuild.Task/2.0.0
@Alexx999 Yes, there is a bug that happens with latest VS, there is a fix in progress: https://github.com/Ullink/gradle-msbuild-plugin/pull/105
Maybe it's possible to just drop gradle? Looks like it used only for nuspec generation
A better solution would just to use the new dotnet
tooling and drop gradle. I've already done this here:
https://github.com/peters/ILRepack.MSBuild.Task/blob/master/build.cmd
Most of the "build system" has been moved to ILRepack.csproj
https://github.com/peters/ILRepack.MSBuild.Task/blob/master/src/ILRepack.MSBuild.Task/ILRepack.MSBuild.Task.csproj.
@Alexx999 strongname has this problem https://github.com/peters/ILRepack.MSBuild.Task/issues/37#issuecomment-478199400 , and when cecil 0.11.0 release will supoort linux strongname sign.
A better solution would just to use the new
dotnet
tooling and drop gradle. I've already done this here: https://github.com/peters/ILRepack.MSBuild.Task/blob/master/build.cmdMost of the "build system" has been moved to
ILRepack.csproj
https://github.com/peters/ILRepack.MSBuild.Task/blob/master/src/ILRepack.MSBuild.Task/ILRepack.MSBuild.Task.csproj.
@peters do you have any plan to make a PR for your change ?
I'm sorry guys but I'm caught up in work stuff so unfortunately I will not have the time to upstream any of my changes.
@Alexx999 Can you rebase/merge with latest master, so that the build works properly?
@timotei that's done, I've removed all build-related changes from this PR (except for removed submodule init step).
@abock would this PR remove the need for https://github.com/xamarin/mirepoix/blob/master/tools/ILRepackPatcher/ILRepackPatcher.cs?
@kzu that tool is very weird - it looks like it patches some ancient ILRepack version with fixes included in newer one (and "newer" is quite old, mind you). It even references commits in comments, see here and here. The last spot patches some Mono.Unix stuff - most likely this isn't fixed here yet. I guess when (if?) this repo goes alive and starts actually accepting PRs quicker than "once in few years" it should be properly migrated to .NET Core. I'd probably do it myself but not before this PR is accepted :)
Just to confirm my understanding, will this PR mean that ILRepack supports portable PDB fully on all platforms?
@richard-fine cecil 0.10 does include support for portable PDBs and it's enabled in this PR
@Alexx999 I'm taking a look at this and have found one regression for ikvm'ed dlls and another issue with the memory consumption when we merge 70 dlls. They are both linked here. Otherwise it looks good IMO.
There're some problems with breakpoints in asynchronous code when debugging in Visual Studio with portable pdb created by Mono.Cecil 0.10.1. I tried upgrade Mono.Cecil 0.10.4, it seems to be fixed. So, I think Mono.Cecil should be upgraded.
But there're still problems with local variables when debugging.
@tephe @kkwpsv I've updated Cecil to 0.11.1
Dear All,
Can we use ilrepack on Linux if the PR is merged?
@JongHeonChoi, I'm successfully run it on Linux/CoreCLR when I've merged this, #239 and config from #238 (and "rollForward": "Major", if you will run it on 3.x).
@gluck any chance this will ever get accepted? Just wondering :)
@Alexx999 I will try looking at it next month and merge it if all is good :) (thanks or the PR btw)
I anxiously await this being merged to add portable pdb support. Currently using a build from this branch to support my current scenario.
Update: I'm able to create the pdb file with this solution but unable to debug with it.
Hello, Will this PR fix #273, or do you reckon it may be a different problem? Thanks, Andrei
Using this branch, when I try to validate assembly (produced with /keyfile:...
)with sn -vf
, it fails with "Failed to verify assembly -- Strong name validation failed".
@gluck Please, could you merge this pull request? Maybe you need help with maintenance?