To run most CLI tools, you need a couple of environment variables to be set. These can be found in .env.dist. Ensure these are loaded in your environment. There are a couple of ways to do that:
- Export the variables in
.env.distmanually:- Using
$env:FOO = 'Bar'(PowerShell only) - Using
SET FOO=Bar(Windows Command Prompt only) - Using
export FOO=BAR(Bash and compatible shells only).- With Bash, you can also put these in your
.bashrcto not have to do this every time, if desired.
- With Bash, you can also put these in your
- Prepend the variables in
.env.distto the command usingFOO=BAR BAZ=CUX dotnet ...(Bash and compatible shells only).
- Using
- Copy
.env.distto.env, fill in the variables to your liking, and use something like direnv to automatically load them into your environment. (That way you can use the same configuration for native and container builds.)
After all necessary variables are in your environment, in the project root folder:
dotnet msbuild -target:PostProcessDotNetPackagesForUnity -restore NuGetDependencies/Unity/After post-processing finishes, you can start or focus the Unity window of your project and let Unity import the dependencies.
If you want to check for analyzer errors across the codebase in one go, run:
dotnet build