Closed leppie closed 2 months ago
any chance you could include a zip with the repro and a cmd file that has the exact command line that you use?
Here you go. I have also include the possible locations where .NET Framework stuff lives on my PC.
Hmm when I try this, it works fine.
I'm running the desktop, 64-bit version of ILRepack.exe (the one we ship). typeof(string).Assembly.Location resolves to C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll
Could you be running the .NET Core version? The .NET Core version is primary for cross-plat support and I don't think it will properly support desktop framework.
Could you be running the .NET Core version? The .NET Core version is primary for cross-plat support and I don't think it will properly support desktop framework.
Yes, I am running the dotnet tool.
And it is unfortunate, because I am specifically working on cross-platform build/packaging support.
Will find some other solution.
Have you tried passing the targetplatform? https://github.com/gluck/il-repack/blob/2c3a69e91943ebcffba49a98a4ba9e547e71ccd3/ILRepack/RepackOptions.cs#L240
maybe if you pass both the desktop directory and v4 it will work then?
Yes, I tried a few things.
In the end, I only needed to indicate the .NETFramework runtime.
Just wrote something quick in cecil (that works for my use case).
https://github.com/IronScheme/IronScheme.BuildTools/blob/master/RuntimeChanger/RuntimeChanger.cs
I am trying to change a .NET 2 exe to .NET 4, but getting the error below. Works with ILMerge.
Seems there is a
TargetPlatformDirectory
option, but not exposed.