I am newbie in net core on Linux and i have a question. I installed .net core 5 and wrote hello world app with name "hello". After, I go to the project bin directory and run my app like:
dotnet hello.dll
All fine. But i see "hello" (shared library) file in the bin directory too. I can run it in terminal like:
./hello
All works... But when i copy files in another location (away from project directory), i can't run my app like: ./hello I get message "Segmentation fault (core dumped)" in terminal.
Someone, please, tell me, why after copy files, command "./hello" doesn't work (but dotnet hello.dll works).
Ubuntu 20.04
.NET SDK installed: 5.0.301
.NET runtimes installed: 5.0.7
UPDATE project location:
/RiderProjects/RabbitMq-example/RabbitMq-example/bin/Debug/net5.0
i copy only net5.0 folder to:
/RiderProjects/RMQ/net5.0
And I get Segmentation fault.
If i copy full bin folder (like:
/RiderProjects/RMQ/bin/Debug/net5.0
All fine.
Steps:
If you installed the dotnet runtime via snap install you can access it via "sudo dotnet ..." only. I had the same problem in VS Code, it runs the dotnet commands without sudo and I recived the "Segmentation fault (core dumped)" error. I solved by installing the dotnet runtime via apt-get (now is installed in "/usr/bin ..." and works without sudo (see: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004- ))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.