try
try copied to clipboard
[DEBUG][Vs2019] Adding a startvs.cmd would help
Describe the bug
Can't debug from Visual Studio.
As dotnet-try
was designed during preview
"times", multiple brreaking changes occured.
A perfect example would be this one :
https://devblogs.microsoft.com/aspnet/asp-net-core-and-blazor-updates-in-net-core-3-0-preview-9/
As this repository seems to be built for preview7
, there was some breaking changes.
A file like startvs.cmd
woud be helpfull in order to set variables like DOTNET_ROOT
to the local dotnet
install
Aspnetcore team example is here:
I have no idea if it's supposed to be part of arcade
or not to be honest
@ECHO OFF
SETLOCAL
:: This command launches a Visual Studio solution with environment variables required to use a local version of the .NET Core SDK.
:: This tells .NET Core to use the same dotnet.exe that build scripts use
SET DOTNET_ROOT=%~dp0.dotnet
SET DOTNET_ROOT(x86)=%~dp0.dotnet\x86
:: This tells .NET Core not to go looking for .NET Core in other places
SET DOTNET_MULTILEVEL_LOOKUP=0
:: Put our local dotnet.exe on PATH first so Visual Studio knows which one to use
SET PATH=%DOTNET_ROOT%;%PATH%
SET sln=%1
IF "%sln%"=="" (
echo Error^: Expected argument ^<SLN_FILE^>
echo Usage^: startvs.cmd ^<SLN_FILE^>
exit /b 1
)
IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
echo .NET Core has not yet been installed. Run `%~dp0restore.cmd` to install tools
exit /b 1
)
start %sln%
i'm attempting to actually make a PR with the file but it seems that it trigger other issues, i'll try to investigate latter, but you might go way faster than me on that i guess ^^