Once you've installed, open a new command prompt and run the following command:
Once you've installed, open a new terminal and run the following command:
Command prompt
dotnet
If the installation succeeded, you should see an output similar to the following:
Command prompt
Usage: dotnet [options]Usage: dotnet [path-to-application]Options:-h|--help Display help.--info Display .NET information.--list-sdks Display the installed SDKs.--list-runtimes Display the installed runtimes.path-to-application:The path to an application .dll file to execute.
Got an error?
If you receive a 'dotnet' is not recognized as an internal or external command error, make sure you opened a new command prompt. If you can't resolve the issue, use the I ran into an issue button to get help fixing the problem.
Install Prerequisites
Install Java
Apache Spark requires the Java SE Development Kit (JDK) 8.1.
Once you've installed, open a new command prompt and run the following command:
Command prompt
%SPARK_HOME%\bin\spark-submit --version
If the command runs, printing our version information, you're good to go.
If you receive a 'spark-submit' is not recognized as an internal or external command error, make sure you opened a new command prompt. If you can't resolve the issue, use the I ran into an issue button to get help fixing the problem.
In your command prompt, run the following command to create your app:
In your terminal, run the following command to create your app:
Command prompt
dotnet new console -o mySparkApp
Then, navigate to the new directory created by the previous command:
Command prompt
cd mySparkApp
The dotnet command creates a new application of type console for you. The -o parameter creates a directory named mySparkApp where your app is stored, and populates it with the required files. The cd mySparkApp command puts you into the newly created app directory.
Install NuGet package
To use .NET for Apache Spark in an app, you need to install the Microsoft.Spark package.
In your command prompt, run the following command:
You may encounter an error that Spark failed to delete a jar file from a temporary directory. This is a known error and won't affect the output of your app.
Congratulations, you've created your first .NET for Apache Spark application!