Without Visual Studio - VirtualPhotonics/VTS GitHub Wiki
Build, Test and Run the VTS without Visual Studio
After pulling down the source code from GitHub and installing the prerequisites, there are a few options for building the VTS and MCCL.
Use the included script files
There are several PowerShell scripts (.ps1) in the root of the VTS folder that can also be used to build and test the projects.
- BuildTestRelease.ps1 - This script calls the BuildTestReleaseScripting.ps1, BuildTestReleaseMCCL.ps1 and BuildTestReleaseMATLAB.ps1 scripts to build and test all projects
- BuildTestReleaseScripting.ps1 - Builds and runs tests for the VTS library
- BuildTestReleaseMCCL.ps1 - Builds and runs tests for the the VTS library and the Monte Carlo projects
- BuildTestReleaseMATLAB.ps1 - Builds and runs tests for the VTS library and creates the MATLAB interop files
- RunMATLABUnitTests.ps1 - Runs the unit tests for the MATLAB interop, this script is called by the BuildTestReleaseMATLAB.ps1 script
BuildTestReleaseScripting.ps1, BuildTestReleaseMCCL.ps1 and BuildTestReleaseMATLAB.ps1 scripts create release versions of the Scripting libraries, MCCL application and the MATLAB package, these releases (zip files) can be found in the release folder after the scripts have been run.
To build the entire solution in Debug and Release, right click the BuildTestRelease.ps1 file and select "Run with PowerShell". Note: This script file will delete the publish and release folders.
Each of the script files can be run separately but RunMATLABUnitTests.ps1 does require that BuildTestReleaseMATLAB.ps1 has been run at least once before it can be run successfully.
The MCCL command-line application can be accessed here:
..\VTS\publish\local
and can be executed using:
dotnet mc.dll help
This will bring up the help for the MCCL with of help topics and sample usage.
There are also folders for the 3 main platforms and these files are packaged in the zip files located in the release folder.
..\VTS\publish\win-x64
..\VTS\publish\osx-x64
..\VTS\publish\linux-x64
Build and test from the command line
The main VTS project is a .NET Core library and can be built from the command line (or PowerShell) using dotnet build. Open the command-line window or PowerShell window in the VTS folder.
dotnet build src/Vts/Vts.csproj -c Debug
dotnet build src/Vts/Vts.csproj -c Release
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 src/Vts.MonteCarlo.CommandLineApplication/Vts.MonteCarlo.CommandLineApplication.csproj -c Debug
dotnet build src/Vts.MonteCarlo.CommandLineApplication/Vts.MonteCarlo.CommandLineApplication.csproj -c Release
dotnet build src/Vts.MonteCarlo.PostProcessor/Vts.MonteCarlo.PostProcessor.csproj -c Debug
dotnet build src/Vts.MonteCarlo.PostProcessor/Vts.MonteCarlo.PostProcessor.csproj -c Release
The unit tests can be run using dotnet build and dotnet test on the test projects:
Vts Tests
dotnet build src/Vts.Test/Vts.Test.csproj -c Debug
dotnet build src/Vts.Test/Vts.Test.csproj -c Release
dotnet test src/Vts.Test/Vts.Test.csproj -c Debug
dotnet test src/Vts.Test/Vts.Test.csproj -c Release
MCCL Tests
dotnet build src/Vts.MonteCarlo.CommandLineApplication.Test/Vts.MonteCarlo.CommandLineApplication.Test.csproj -c Debug
dotnet build src/Vts.MonteCarlo.CommandLineApplication.Test/Vts.MonteCarlo.CommandLineApplication.Test.csproj -c Release
dotnet test src/Vts.MonteCarlo.CommandLineApplication.Test/Vts.MonteCarlo.CommandLineApplication.Test.csproj -c Debug
dotnet test src/Vts.MonteCarlo.CommandLineApplication.Test/Vts.MonteCarlo.CommandLineApplication.Test.csproj -c Release
MCPP Tests
dotnet build src/Vts.MonteCarlo.PostProcessor.Test/Vts.MonteCarlo.PostProcessor.Test.csproj -c Debug
dotnet build src/Vts.MonteCarlo.PostProcessor.Test/Vts.MonteCarlo.PostProcessor.Test.csproj -c Release
dotnet test src/Vts.MonteCarlo.PostProcessor.Test/Vts.MonteCarlo.PostProcessor.Test.csproj -c Debug
dotnet test src/Vts.MonteCarlo.PostProcessor.Test/Vts.MonteCarlo.PostProcessor.Test.csproj -c Release