You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is a space in the BaseOutputPath and BaseIntermediateOutputPath then creating a Roslyn Component launch profile using "Open debug launch profiles UI" causes a crash.
Steps to Reproduce
Create a .NET standard 2.0 class library with the following .csproj:
Right-click on the project, select Properties > General > Open debug launch profiles UI. It works. Now go back and remove the "-" in "VS-Output" and do it again. Create a Roslyn Component profile. It crashes.
Expected Behavior
Should be able to create a Roslyn Component profile when there is a space in the path.
Actual Behavior
It crashes with an exception saying invalid character.
User Impact
Lost a lot of time figuring this one out!!
The text was updated successfully, but these errors were encountered:
The cause for this issue is because the path will be quoted (wrapped within ") when it contains space when passing as targetArgs. Therefore it raises an ArgumentException in Path.GetFileName because " is an illegal character.
To illustrate with an example, given the path to be C:\Users\xxxx\Documents\VS-Output\yy yy (with a space), it will turn to be /out: \"C:\\Users\\xxxx\\Documents\\VS-Output\\yy yy\" in targetArgs, and fail the internal path check inside Path.GetFileName
Proposed Fix:
properly process the path when it's quoted in GetComponentReferencingProjectsAsync
Visual Studio Version
17.12.4
Summary
If there is a space in the BaseOutputPath and BaseIntermediateOutputPath then creating a Roslyn Component launch profile using "Open debug launch profiles UI" causes a crash.
Steps to Reproduce
Expected Behavior
Should be able to create a Roslyn Component profile when there is a space in the path.
Actual Behavior
It crashes with an exception saying invalid character.
User Impact
Lost a lot of time figuring this one out!!
The text was updated successfully, but these errors were encountered: