F# code porting from windows to ubuntu - f#

I am windows developer and trying to write a program on ubuntu in F#
I have ubuntu 16.04 and I am following video https://channel9.msdn.com/Events/Build/2016/T661
I have installed dotnet-dev-1.0.0-preview2.1-003177
Now I am able to do a small hello world program in C#
But when I follow steps from above video I get error when I do 'dotnet run'
"
The specified framework 'Microsoft.NETCore.App', version '1.0.0' was not found.
- Check application dependencies and target a framework version installed at:
/usr/share/dotnet/shared/Microsoft.NETCore.App
- The following versions are installed:
1.1.0
- Alternatively, install the framework version '1.0.0'.
"
Also one thing I observed is I don't have 'Nuget.config' like the video shows.
I have below questions:
How to resolve above query
Is there any tutorial available for development of f# on ubuntu either using .net core or mono as finally I would like to port my Actor model akka.net code from windows to ubuntu.
Regards,
Amit Bhagwat

Related

QuickBooks SDK Installation Stops on Error Code 0x800F081F

I am trying to install the QuickBooks SDK v13 on a windows 10 computer for development and then again on a Windows 2016 Machine for production use.
I am getting stuck in a loop of trying to install old .Net Frameworks.
I am following these instructions:
https://developer.intuit.com/docs/01_quickbooks_desktop/1_get_started/20_download_and__install_the_sdk
Here are some of the screens I am seeing stepping thru the instructions:
I am posting this on Stackoverflow because this is an installation of an SDK problem.
Is there a way to run the installer with .NET Framework 4.x?
Am I using the wrong version of the installer? It seems very strange that is requires such an old version of .NET Framework.
I can try to figure out why the old .NET Framework versions do not install but before I do that I want to determine if I am off track with something related QuickBooks.
At this time I am not going to try to install old versions of .NET. I am going to confirm that the QB SDK actually needs those versions or find out if there are different SDKs that use current technology.
I just clicked "No" on the "Would you like to install it now?" question and it seemed to install fine.
However, I did get this AFTER the install of the sdk:
This leads to the next question: does Quickbooks SDK use .NET Framework 3.5 or does the installer use 3.5?

What's the difference between SDK and Runtime in .NET Core?

I've read many articles, including this one, yet I can't still figure out what's the difference, and they have not explained it either in simple terms or at all.
Can someone please clarify what's the difference between .NET SDK and .NET Runtime?
Update: Using comparisons would be very appreciated. Analogy alongside simple English is highly educational.
According to the .Net Core Guide, .NET Core is composed of the following items
A .NET runtime, which provides a type system, assembly loading, a garbage collector, native interop and other basic services.
A set of framework libraries, which provide primitive data types, app composition types and fundamental utilities.
A set of SDK tools and language compilers that enable the base developer experience, available in the .NET Core SDK.
The 'dotnet' app host, which is used to launch .NET Core apps. It selects the runtime and hosts the runtime, provides an assembly loading policy and launches the app. The same host is also used to launch SDK tools in much the same way.
The SDK is all of the stuff that is needed/makes developing a .NET Core application easier, such as the CLI and a compiler.
The runtime is the "virtual machine" that hosts/runs the application and abstracts all the interaction with the base operating system.
Only the latter is required to run the application, but the former is needed to develop the application.
Runtime: to run apps
SDK (Runtime + Tooling): to build and run apps
I'm not inventing anything here. Just copy-pasting the definitions from https://dotnet.microsoft.com/download
The software development kit (SDK) includes everything you need to build and run .NET Core applications, using command-line tools and any editor (like Visual Studio).
The runtime includes everything you need to run .NET Core applications. The runtime is also included in the SDK.
Sharing from Rick Strahl's post: Which .NET Core Runtime Download do you need?
Only the .NET Core Runtime is required to run an application and provides information about the install.
To develop, build and publish an application will require an SDK.
dotnet.exe installs with a runtime install, but it only provides core features to provide info to run an application and provide info about the install: dotnet mydll.dll and dotnet --info. To build, publish or do anything else you need to install the SDK.
Running the following command will provide information about the install:
dotnet --info
If the command fails it means you do not have the .NET Core runtime installed or available in the system's PATH.
Below is a sample output of the command.
$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.2.101
Commit: 236713b0b7
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.13-x64
Base Path: /usr/local/share/dotnet/sdk/2.2.101/
Host (useful for support):
Version: 2.2.0
Commit: 1249f08fed
.NET Core SDKs installed:
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.302 [/usr/local/share/dotnet/sdk]
2.2.101 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
The output tells you:
The installed SDK version
The active runtime version that's running this dotnet command
A list of all installed runtimes and SDKs
Installing an SDK also installs the runtime.
macOS homebrew specific
Installing the homebrew-cask dotnet will conflict with the dotnet-sdk, so to get both the runtime, and the sdk install dotnet-sdk
brew cask install dotnet-sdk
In short, the runtime will allow your OS to run compiled C-Sharp, C# programs, and the sdk will allow you to compile programs written in C-Sharp, C#.
It's important to understand that you can have multiple runtimes and multiple SDKs installed and each project can use a different one. The runtime is determined by your project's runtime specifier in the .csproj file:
<TargetFramework>netcoreapp2.1</TargetFramework>
The SDK is either the last globally installed SDK which is the default, or you can explicitly override the SDK in a global.json placed in the solution root folder. The following explicitly forces my project to use the last RC SDK, instead of the RTM version:
{
"sdk": {
"version": "2.1.300-rc.31211"
}
}
Generally, there should be no need to use a specific lower SDK version as the SDK is backwards compatible and can compile various versions of .NET Core applicatino back to v1.0. IOW, it's OK to use the latest SDK in almost all cases.
.NET Core Runtimes
The .NET Core Runtimes are the smallest self-contained and specific component and contain the absolute minimum to run just .NET Core on a specific platform.
Note it a runtime install does not include the ASP.NET Core meta package runtime dependencies, so if your application references Microsoft.AspNetCore.App or Microsoft.AspNetCore.All you have to seperately download the ASP.NET Core package. However, if you explicitly reference all ASP.NET Core Nuget packages rather than using the meta packages, those packages are deployed as part of your application and it can run with just the runtime.
Essentially you are trading installation package size vs. a runtime pre-install requirement.
References:
Which .NET Core Runtime Download do you need?
The SDK is all of the stuff that is needed/makes developing a .NET Core application easier, such as the CLI and a compiler.
The runtime is the "virtual machine" that hosts/runs the application and abstracts all the interaction with the base operating system.
As summary:
If you install SDK, you will have everything you need for development and running the app.
adding to stormwild's answer in case you have only the .Net Core Runtime installed you will receive the following output from dotnet --info
>PS C:\Users\Administrator> dotnet --info
>
>Host (useful for support):
> Version: 2.2.3
> Commit: 6b8ad509b6
>
>.NET Core SDKs installed:
> No SDKs were found.
>
>.NET Core runtimes installed:
> Microsoft.NETCore.App 2.2.3 [C:\Program
>Files\dotnet\shared\Microsoft.NETCore.App]
Runtime is enough if we want to run just application on hardware, otherwise to develop and run we need SDK (which includes runtime and tooling).
SDK ==> to build and run .NET apps
Runtime ==> to run .NET apps
Easy! :)
The SDK usually includes documentation and other help files. The runtime contains only the binary files for the installation.
When you install SDK you also get runtime in that. Check this below, this is what gets installed when we install SDK.
The following were installed at C:\Program Files\dotnet
• .NET Core SDK 2.2.100
• .NET Core Runtime 2.2.0
• ASP.NET Core Runtime 2.2.0
SDK is required to compile source code and generate bytecode/Intermediate Language Instruction for a specific target OS/runtime. SDK is not tightly coupled to target OS. For ex - SDK installed on Windows can generate bytecode for Linux.
dotnet build --runtime ubuntu.18.04-x64
Runtime is required to run bytecode on a specific OS. Runtime is specific to OS. Runtime for Ubuntu is different than Windows.
Runtime is what makes .Net Core special. Runtime allows .Net apps to be "Write Once, Run Anywhere" similar to Java.

ASP.NET OmniSharp server is not running on Ubuntu Mono

After setting up VS Code, I'm trying to run an ASP.NET 5 project using Visual studio code's command palette on Ubuntu Linux 14.4.
The DNVM installed is for Mono. Following the steps given on VS code's official docs, the project is created with Yeoman scaffolder.
Whenever trying to start the project, I get the following error:
OmniSharp server is not running.
I found some posts when trying to solve this but most seems to be addressing either Console project or are given for OS x:
For a Console App
This is for debugging not running
The output of mono --version shows that it is >3.12:
My dnvm is already the latest
I can run the project by using dnx web command from Terminal.
However, my simple question:
How do I run ASP.NET 5 on Ubuntu using VS Code?
Side question : Not sure by when the debugging will be supported. Any rumours about the extension will be appreciated.
This seems to be a bug with OmniSharp and not specifically with VSCode

Install lejos eclipse windows 8.1 new project has errors

I was trying to install lejos on my laptop which has windows 8.1.
I downloaded eclipse 32bit.
I installed lejos plug in in eclipse.
I installed leJOS_EV3_0.9.0-beta_win32_setup.
Now i went to eclipse and created lejos nxt project. The problem that the project has red (!) and when i create a class it has error:
Description Resource Path Location Type
Unbound classpath container: 'org.lejos.nxt.ldt.LEJOS_LIBRARY_CONTAINER/nxt' in project 'test' test Build path Build Path Problem
What did i do wrong?
Ok after some more research I found a good video which explain how to install lejos on pc correct way. So after combining this video and eclipse install tutorial i was able to create class and run my first program.
Video: https://www.youtube.com/watch?v=hEFA0DdFhm8.
Tutorial: http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/UsingEclipse.htm

Is OpenCV supported on Python 3 yet?

I already have part of a program running in Python 3 but I need OpenCV (or SimpleCV), for a robotic vehicle, but I haven't found any install commands that seem to work, other than for Python 2.7.
If it is compatible could you please include instructions (/links to) for installation of the module?
I am using Ubuntu 14.
Maybe a little late to answer, but it's actually supported on OpenCV version 3 (in alpha state nowadays). I have successfully managed to install it, on MacOS, but I guess it would be similar on Ubuntu.
Now you have separated options for python2 and python3 when using Cmake. So you'll have to set those to make it work. That's all I needed to set:
BUILD_opencv_python3
PYTHON3_LIBRARY
PYTHON3_INCLUDE_DIR
PYTHON3_INCLUDE_DIR2
PYTHON3_NUMPY_INCLUDE_DIRS
...
Here you can find more detailed description: Link
Luigolas is correct that OpenCV 3.0 supports Python 3.x bindings. It was in release candidate status since April and the production version was released on 4 June 2015. Unfortunately for some reason the downloadable installation program on the OpenCV site does not contain a Python 3.x-compatible cv2.pyd file.
OP asked about Ubuntu but for those requiring a Windows installer, use Christoph Gohlke's site, which maintains Windows binaries for many Python packages, including OpenCV 3.0 with Python 3.x bindings. Visit:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
To install, just download the 64-bit or 32-bit .whl file appropriate for your system, then run pip install [filename]. Then the instruction import cv2 should work in your Python 3.x interpreter.

Resources