This guide provides information on how to setup development environment on local machine.
It assumes no local tools and empty Windows 10 OS.
Windows 10
1703 or laterMicrosoft Visual Studio 2022
or higher, with the following workloads:- .NET desktop development
.NET6 SDK
(may included in vs2022)- Windows 10 SDK 10.0.17763.0
The build task Deps
automates entire installation locally (except OS). More details on running tasks are given bellow.
- Clone repository
- Open solution in Visual Studio 2022
- Restore all NuGet packages
- Build
Now you can build solution.
Build is automated using Invoke-Build PowerShell module which is included in the repository, but can be also installed in the system.
- open
administrative PowerShell
- go to repository root
- run
Set-Alias ib $pwd\Invoke-Build.ps1
(For convenience, set alias to it) - run
ib ?
to get list of available tasks (anywhere in the repository directory hierarchy):
PS C:\Projects\PRemoteM> ib ?
Name Jobs Synopsis
---- ---- --------
Deps {} Ensure local dependencies
Build {} Build the application
BuildInSandbox {} Build in Windows Sandbox
Clean {} Clean generated data
Tasks are defined in the prm.build.ps1 PowerShell script.
For example, to clean any existing builds and then build fresh PRemoteM as portable Win32 application invoke:
ib Clean, Build -aReleaseType Release
# Equivalent without setting alias, must be run in root of the repository
./Invoke-Build.ps1 Clean, Build -aReleaseType Release
# Equivalent with system install of Invoke-Build
Invoke-Build Clean, Build -aReleaseType Release
Please check out invoke-build package notes on how to enable task auto completion and other tips.
Task BuildInSandbox
starts Windows Sandbox and executes ib Deps, Build
tasks. This takes some time (~20 minutes) as all dependencies are downloaded from the Internet and installed, using Chocolatey package manager, but it guaranties pristine environment. Note that when you close the sandbox entire environment is gone.