Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Utilize the Core CLI tool #16

Open
QuinnBast opened this issue Apr 16, 2020 · 5 comments
Open

Utilize the Core CLI tool #16

QuinnBast opened this issue Apr 16, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@QuinnBast
Copy link
Contributor

To verify and validate incoming events we will need to install dotnet & be able to run the cli tool. This will probably need to be added to the DockerFile. These are the steps I took to do so on my raspberry pi:

  1. Get the latest link for dot net core 3.1 from the microsoft website https://dotnet.microsoft.com/download/dotnet-core/3.1

  2. Select version 3.1 and copy the "Direct Link" URL. Replace future occurances of {directLink} with this link.

  3. Navigate to a folder of your choice where you would like to download dotnet to. Make note of the current folder path at this point. Replace future occurances of {path} with your current path.

  4. Download dotnet: wget {directLink}

  5. Create a directory to extract the tar: mkdir dotnet-arm32

  6. Unzip to the directory: tar zxf dotnet-sdk-3.1.102-linux-arm.tar.gz -C dotnet-arm32/

  7. Allow using the dotnet command globally by setting the PATH:
    export DOTNET_ROOT={path}/dotnet-arm32/
    export PATH=$PATH:{path}/dotnet-arm32/

  8. Verify the installation worked: dotnet --info

  9. Run the Core CLI with dotnet <cli.dll> <arguments>

A download for the Cli tool can be found in the Core repositories's Releases

@QuinnBast QuinnBast added the enhancement New feature or request label Apr 16, 2020
@griendt
Copy link
Contributor

griendt commented Apr 17, 2020

I installed .NET from within the current Docker container. First I did it the way Microsoft recommended, namely:

wget https://packages.microsoft.com/config/ubuntu/19.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
apt-get update
apt-get install apt-transport-https
apt-get update
apt-get install dotnet-sdk-3.1

I could confirm that the installation was successful:

root@4638a1db4806:/var/www# dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.201
 Commit:    b1768b4ae7

Runtime Environment:
 OS Name:     debian
 OS Version:  10
 OS Platform: Linux
 RID:         debian.10-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.201/

Host (useful for support):
  Version: 3.1.3
  Commit:  4a9f85e9f8

.NET Core SDKs installed:
  3.1.201 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

However, when downloading the CLI DLL and trying to run it, I get the following error:

root@4638a1db4806:/var/www/Remake-Core-0.1.0# dotnet SubterfugeCoreCLI.dll
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/var/www/Remake-Core-0.1.0/'.
Failed to run as a self-contained app. If this should be a framework-dependent app, add the /var/www/Remake-Core-0.1.0/SubterfugeCoreCLI.runtimeconfig.json file specifying the appropriate framework.

I did a quick Google search but the only thing I can find is something about project files. I assume (and hope) I would not need to have the source code of the Core present in my container to use the DLL?

@QuinnBast
Copy link
Contributor Author

Oh right, you will also need to download the SubterfugeCore.dll as well. The Cli references that dll. As long as both are in the same directory I think it should work

@QuinnBast
Copy link
Contributor Author

Update on this. It appears that with the creation of the DLL there are some dependency files that get output along with the dll. I didn't realize these were required. On the next Core release, I will add these files to it.

image

Additionally, after exeucting with all the dependencies I got the following error, which says "framework version 2.1 was not found."

image

It appears the link I provided above is the wrong version of dotnet and they aren't backwards compatible. Here's a link to version 2.1 which is the correct version of dotnet to be compatible.

@griendt
Copy link
Contributor

griendt commented Apr 22, 2020

Great work!

As soon as there is a suitable Core release available I'll be sure to give it another go.

@QuinnBast
Copy link
Contributor Author

New release here. Download Release.zip to get all the files you need.

QuinnBast pushed a commit that referenced this issue May 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants