Dotnet list-sdks does not list the installed SDKs - macos

I am on Mac and the new .NET 5.0 just got released. I have installed it with dotnet-install.sh
dotnet-install.sh --version 5.0.100
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: .NET Core SDK version 5.0.100 is already installed.
dotnet-install: Adding to current process PATH: `/Users/l1x/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
However I cannot see the installed SDK.
dotnet --list-sdks
2.2.402 [/usr/local/share/dotnet/sdk]
3.1.101 [/usr/local/share/dotnet/sdk]
What is the recommended way of installing .NET SDKs from the command line on Mac?

Installing the SDK with Brew solves this problem:
brew install --cask dotnet-sdk
==> Downloading https://download.visualstudio.microsoft.com/download/pr/3bdcd7d2-1444-4f7d-a254-504a994ffe39/e4f42b83604673f971748c722aa20bec/dotnet-sdk-5.0.100-osx-x64.pkg
Already downloaded: /Users/l1x/Library/Caches/Homebrew/downloads/29dc1169ad824e06e4077148811a2555d7aa0f27737f8c0ea8e5858044e67a8a--dotnet-sdk-5.0.100-osx-x64.pkg
==> Verifying SHA-256 checksum for Cask 'dotnet-sdk'.
==> Installing Cask dotnet-sdk
==> Running installer for dotnet-sdk; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
Password:
installer: Package name is Microsoft .NET SDK 5.0.100 (x64)
installer: Upgrading at base path /
installer: The upgrade was successful.
==> Purging files for version 5.0.100,3bdcd7d2-1444-4f7d-a254-504a994ffe39:e4f42b83604673f971748c722aa20bec of Cask dotnet-sdk
Error: It seems there is already a Binary at '/usr/local/bin/dotnet'.
The new SDK appears:
dotnet --list-sdks
2.2.402 [/usr/local/share/dotnet/sdk]
3.1.101 [/usr/local/share/dotnet/sdk]
5.0.100 [/usr/local/share/dotnet/sdk]

Related

Getting F# working in VSCode when "dotnet" is not found on MacOSX?

I'm completely new to dotnet and vscode so I might be missing something trivial. I just want to get F# running in VSCode on my Mac. I first tried installing dotnet from brew:
brew cask install dotnet-sdk
This seems to be working fine from the command line since I could do both dotnet new and dotnet build:
dotnet new console -lang F# -o myproj
Now I installed Visual Studio Code, also from brew:
brew cask install visual-studio-code
I then installed the Ionide-fsharp plugin, opened the myproj folder from vscode and restarted it. I'm then greeted with:
I then searched for FSharp.dotnetRoot in the settings and tried to configure this:
But it didn't help (I also tried setting the folder to /usr/local/share/dotnet and /usr/local/share/dotnet/sdk/3.1.100 but nothing worked).
So I completely uninstalled everything (including wiping my ~/.vscode folder) from brew and re-installed everything from the official Microsoft documentation. In the docs it says that the F# support should be built-in to vscode on macosx, but it still recommended me to install Ionide-fsharp when I opened the folder again, so I obeyed. But I just ran into exactly the same problem again.
So my question is: How can I install vscode with working F# support on MacOSX?
Here's my output from vscode "about":
Version: 1.41.0
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T17:58:38.338Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.2.0
and this is from dotnet --info:
.NET Core SDK (reflecting any global.json):
Version: 3.1.100
Commit: cd82f021f4
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.100/
Host (useful for support):
Version: 3.1.0
Commit: 65f04fb6db
.NET Core SDKs installed:
3.1.100 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Is there an OpenSSL for windows?

I'm trying to generate OpenSSL certificates on Windows OS. But I find most of the commands related to OpenSSL are for *nix OS.
Is there an OpenSSL for Windows OS? If yes, from where can I get it? Is this official OpenSSL build for Windows?
Search openssl shining light production in google and download from the first link
Yes. You can do one of two things:
1) Build it yourself
You'll need a build environment (either Visual Studio or msys2 based), and a few other pre-requisites. Download the source from here:
https://www.openssl.org/source/
And (assuming you downloaded the 1.1.0 version), read the INSTALL notes here:
https://github.com/openssl/openssl/blob/OpenSSL_1_1_0-stable/INSTALL
There are also some Windows specific notes here:
https://github.com/openssl/openssl/blob/OpenSSL_1_1_0-stable/NOTES.WIN
2) Download a pre-compiled version
The OpenSSL project doesn't distribute pre-compiled binaries, but they do maintain a list of third-party provided binaries. The list is here:
https://wiki.openssl.org/index.php/Binaries
If you're using Chocolatey, you can also install with
choco install openssl
More details in here and for me it also installed some other stuff, like VC Redist:
Installed:
- kb2919355 v1.0.20160915
- kb3033929 v1.0.5
- kb2999226 v1.0.20181019
- openssl v1.1.1.1900
- vcredist2015 v14.0.24215.20170201
- kb2919442 v1.0.20160915
- vcredist140 v14.34.31931
- kb3035131 v1.0.3
- chocolatey-windowsupdate.extension v1.0.5
Packages requiring reboot:
- vcredist140 (exit code 3010)
This was done on Windows 10.
Both Cygwin and MSYS distribute pre-compiled openssl binaries, which I use everyday.
If you don't like a *nix like style, please refer this official page for standalone distrbutions.
https://wiki.openssl.org/index.php/Binaries
Disclaim: I have not tested the software listed on the page.
I am using this version https://slproweb.com/products/Win32OpenSSL.html and install it with
Essentials
winget install -e ShiningLight.OpenSSL.Light
Full
winget install -e ShiningLight.OpenSSL

I cannot install the IBM Cloud CLI

I am trying to get started building a voice interface with Watson Assistant, and following the docs I need to install the IBM Cloud CLI. I have downloaded the three latest versions from here (https://console.bluemix.net/docs/cli/reference/bluemix_cli/all_versions.html) but the installs all fail. I tried running the command line install as well, but that fails too:
Download complete. Executing installer...
installer: Package name is IBM Cloud Command Line Interface
installer: Installing at base path /
installer: The install failed (The Installer encountered an error that
caused the installation to fail. Contact the software manufacturer for
assistance.)
Install failed.
I tried installing on Macintosh HD disk and in a project folder, but it all fails! Help?
I tried versions 0.6.6, 0.6.5, and 0.6.4. I am running macOS High Sierra 10.13.3.
pls see if there is /usr/local/bin directory in your OS. If not, create the directory and install again.
This will be fixed in next release v0.6.7.

netcore web app - It was not possible to find any compatible framework version

I'm trying to use VSCode with .Net Core web applications but I'm stuck at the begining. I installed dotnet sdk 2.0.2 and I created a web application by using yeoman.
I used dotnet restore command and after that I used dotnet run command. But on dotnet run command it keeps saying 'can't find any compatible framework version'. Check the error below.
So how can I run my web app? I tried to change version too but I had same results.
Using launch settings from /Users/kadir/Documents/Development/WebApplications/firstMvcTutorial/firstMvcCoreWebApp/Properties/launchSettings.json...
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '1.0.5' was not found.
- Check application dependencies and target a framework version installed at:
/
- Alternatively, install the framework version '1.0.5'.
Solved it.
I downloaded and installed Microsoft.NETCore.App 1.0.5 from this link.
After that I changed version to 2.0.0 on global.json. Then I restored dotnet with dotnet restore and I run app with dotnet run.
But this time I had a problem with System.Security.Cryptography.Native.
.
I applied commands below and fixed my problem. Now I can run my web application.
brew update
brew install openssl
mkdir -p /usr/local/lib
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

First Setting up Phonegap on MacBook

I've bought my first ever MacBook having never used a Mac before and need to know how to set up pretty much the same tools or learn whatever the Mac version of these tools are, heres a guide I wrote for getting started with Phonegap on Windows, if I follow it as close as I can, will everything work?
• Download/ Install Node.JS
• Download/ Install GIT for windows
• Download/ Install Phonegap by opening NODE.JS command line and
typing: npm install -g phonegap
• Download/ Install Apache 2.4
• Download/ Install Apache Ant
• Add Variable name: ANT_HOME with filepath to User/ System variables
(e.g. C:\apache-ant-1.9.4 )
• Add %ANT_HOME%/bin to PATH under user variables
• Download/ Install JRE ( select applicable version number (if in
doubt then most recent))
• Download/ Install JDK (Select applicable version number (if in doubt
then most recent))
• Add Variable name: JAVA_HOME with filepath to User/ System variables
(e.g. C:\Program Files\Java\jdk1.7.0_60 )
• Add %JAVA_HOME%/bin to PATH under user variables
• Download / Extract Android SDK ( select "download for other
platforms" and select version to avoid downloading their bundle)
• Add Android SDK Tools folder eg: C:\android-sdk-windows\tools to the
PATH variable
• Add Android SDK Platform tools eg:
C:\android-sdk-windows\platform-tools to the PATH variable
Thankyou in advance for your help!
Lewis
The mac is build on a unix platform.
This means it comes with a lot of tools that are Linux like.
To install application on the mac you can use brew ( http://www.brew.sh ). Brew is a package management system similar to the ones from linux world (yum for RedHat or apt-get for Ubuntu).
To install brew run this command in the Terminal:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
After you have brew installed on your machine, you can add your packages with:
brew install [packagename]
Your installation flow would look like this:
brew install node
brew install git
npm install -g phonegap
For apache and ant check the existing answers on stackoverflow.
To add environment variable on mac use the Terminal and edit your “.profile” or “.bash_profile”. There are detailed answear on stackoverflow regarding this subject.
Java will need to be installed from the Oracle website (download the .dmg file and execute it)
brew install android-sdk

Resources