dotnet / dotnet/roslyn-tools

Running build.cmd without VS installed shows "Cannot bind argument to parameter 'Path' because it is null."

Open
#81 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
109
Forks
85
Avg merge
2d 16h
Merged PRs (30d)
1

Description

Not sure if this is projectsystem problem or repo toolset problem, but we used to show a friendly error if you didn't have the right VS installed and you ran build.cmd, now we show:

```
E:\project-system2>build
Cannot bind argument to parameter 'Path' because it is null.
System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Path' because it is null.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at LocateVisualStudio, E:\project-system2\build\Build.ps1: line 96
at Build, E:\project-system2\build\Build.ps1: line 104
at , E:\project-system2\build\Build.ps1: line 155
at , : line 1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with build/Build.ps1, especially LocateVisualStudio at line 96 and the Build entry point at line 104; the stack trace also identifies the invocation around line 155. Run build.cmd without Visual Studio installed and compare the current null-Path failure with the intended friendly missing-Visual-Studio error. Done means the command reports a clear installation or configuration error instead of the PowerShell binding exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
build-system, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.