After adding ilasm (or ildasm) package to an app and publishing the app as runtime-dependent; running ilasm (or ildasm) fails with:
Error: Fail to load /home/ivan/Projects/test/bin/Release/netcoreapp3.1/linux-x64/publish/libcoreclr.so
Failed to initialize Assembler
OS: Ubuntu 18.04 x64
dotnet: 3.1.301
ilasm (ildasm) package: 2.0.8
In a new terminal execute the following sequence:
This might be related to previously reported issue #38701
@janvorli, we suspect that this might be related to SDK issue. You appear as "area-SDK" owner. However, I don't see area-SDK anymore from our labels, but who would be the proper owner for SDK related issue? I also reported this to dotnet/sdk.
The problem is that libcoreclr.so needs to be side by side with the ilasm and the steps above don't put it there. The folder ./bin/Release/netcoreapp3.1/linux-x64/publish created by the above mentioned commands contains just these files:
libsosplugin.so
libsos.so
sosdocsunix.txt
SOS.NETCore.dll
test
test.deps.json
test.dll
test.pdb
test.runtimeconfig.json
Removing the false after the --self-contained fixes the problem since the whole runtime is copied into the target folder.
You appear as "area-SDK" owner.
I am not an owner of the SDK area, I'm not sure how I got it assigned to myself. In fact, I have no idea what that area is supposed to mean in the runtime repo. I believe that dotnet/sdk repo is an appropriate repo for this issue.
Closing this bug and tracking from dotnet/sdk #12928.
This was fixed by https://github.com/dotnet/coreclr/pull/25930 and related PRs that made ilasm/ildasm SDK standalone. It does not reproduce for me with the .NET 5 preview packages.
BTW: dotnet/runtime is the right repo to track this if this is still a problem. dotnet/sdk repo is not responsible to ilasm/ildasm packages.
Most helpful comment
This was fixed by https://github.com/dotnet/coreclr/pull/25930 and related PRs that made ilasm/ildasm SDK standalone. It does not reproduce for me with the .NET 5 preview packages.
BTW: dotnet/runtime is the right repo to track this if this is still a problem. dotnet/sdk repo is not responsible to ilasm/ildasm packages.