Getting Started on Windows - VirtualPhotonics/Vts.MonteCarlo GitHub Wiki
These instructions describe how to clone the source code on windows and build it
- We assume you have Git installed locally (https://git-scm.com/) or any application like SourceTree (https://www.sourcetreeapp.com) for visualizing Git repositories.
- Create a GitHub account if you would like to contribute to the project, click Sign up at the top of this page.
- The solution Vts.MonteCarlo.sln contains multiple .NET 8.0 projects so you will need Visual Studio 2022 or Visual Studio Code and all the latest updates and service packs. If .NET 8.0 is still not recognized install the .NET 8.0 SDK
- The solution requires the .NET Runtime 8.0 if you do not have a version of Visual Studio including this runtime or to build without Visual Studio, download the following:
Clone the source code from GitHub:
- Create a new folder on your machine. Or if you are using an existing folder make sure there is no folder named Vts.MonteCarlo within that folder (This is the name it will use for the Monte Carlo repository).
- Right-click on the folder and select Git Bash Here
- Type
git clone https://github.com/VirtualPhotonics/Vts.MonteCarlo.git
- Once the files are cloned, open the solution file in Visual Studio <clone_root>/Vts.MonteCarlo/Vts.MonteCarlo.sln
- Install PowerShell (https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-7)
The Monte Carlo command-line (MCCL) application and the post processor application are .NET Core and can also be built using dotnet build:
dotnet build .\Vts.MonteCarlo.CommandLineApplication\Vts.MonteCarlo.Application.csproj -c Debug
dotnet build .\Vts.MonteCarlo.CommandLineApplication\Vts.MonteCarlo.Application.csproj -c Release
dotnet build .\Vts.MonteCarlo.PostProcessor\Vts.MonteCarlo.PostProcessor.Application.csproj -c Debug
dotnet build .\Vts.MonteCarlo.PostProcessor\Vts.MonteCarlo.PostProcessor.Application.csproj -c Release
The unit tests can be run using dotnet build and dotnet test on the test projects:
MCCL Tests
dotnet build .\Vts.MonteCarlo.CommandLineApplication.Test\Vts.MonteCarlo.Application.Test.csproj -c Debug
dotnet build .\Vts.MonteCarlo.CommandLineApplication.Test\Vts.MonteCarlo.Application.Test.csproj -c Release
dotnet test .\Vts.MonteCarlo.CommandLineApplication.Test\Vts.MonteCarlo.Application.Test.csproj -c Debug
dotnet test .\Vts.MonteCarlo.CommandLineApplication.Test\Vts.MonteCarlo.Application.Test.csproj -c Release
MCPP Tests
dotnet build .\Vts.MonteCarlo.PostProcessor.Test\Vts.MonteCarlo.PostProcessor.Application.Test.csproj -c Debug
dotnet build .\Vts.MonteCarlo.PostProcessor.Test\Vts.MonteCarlo.PostProcessor.Application.Test.csproj -c Release
dotnet test .\Vts.MonteCarlo.PostProcessor.Test\Vts.MonteCarlo.PostProcessor.Application.Test.csproj -c Debug
dotnet test .\Vts.MonteCarlo.PostProcessor.Test\Vts.MonteCarlo.PostProcessor.Application.Test.csproj -c Release
The MCCL command-line application can be accessed here:
..\Vts.MonteCarlo\Vts.MonteCarlo.CommandLineApplication\bin\Release\net8.0
and can be executed using:
mc help
This will bring up the help for the MCCL with of help topics and sample usage.