Description
Issue Description
You guys haven't properly escaped/enclosed the strings you're using in the following build targets:
Microsoft.NET.Sdk.Razor.StaticWebAssets.targets
Deleting/renaming the user folder is not possible as the folder was created when the Azure Active Directory user was added to the computer.
Steps to Reproduce
- Login to a computer using a user account that contains an apostrophe in the name
- Open a .net core 3.1 project, or any other project that uses the Microsoft.NET.Sdk.Razor.StaticWebAssets.targets build target
- Try to build the project and/or run the project
- An error will be thrown similar to the error added to the "Actual Behavior" section below
This is where the error is initially thrown in the build target:
Expected Behavior
The project should properly reference the file and the project will build
Actual Behavior
The file can't be referenced because the file path contains an apostrophe (') within the user's folder name. This can be seen by the bolded folder name in the error below:
MSB4113 Specified condition "$([System.String]::Copy('%(Identity)').Replace('','/').StartsWith('wwwroot/'))" evaluates to "$([System.String]::Copy('C:\Users*BillO'Malley*.nuget\packages\wkhtmlwrapper.image\1.0.89\contentFiles\any\netstandard2.0\Executables\image.win.exe').Replace('','/').StartsWith('wwwroot/'))" instead of a boolean.
Analysis
Folder and file paths must allow for special characters and the Microsoft.NET.Sdk.Razor.StaticWebAssets.targets build target should escape these characters.
Versions & Configurations
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
16.8.3.61104