dotnet / dotnet/project-system
Invalid launchSettings.json shows gold bar
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
_This issue has a corresponding [ticket on Developer Community](https://developercommunity.visualstudio.com/t/Malformed-Launchsettingsjson-crashes-pr/1688292). Please vote and comment there to make sure your voice is heard._
---
Hey if launchsettings.json is malformed (like this) then things crash
```
lau{
"profiles": {
"DasBlog.Tests": {
"commandName": "Project",
"environmentVariables": {
"Hosting:Environment": "Development"
}
}
}
}
```
here's the stack
```
=====================
3/9/2022 4:54:46 PM
LimitedFunctionality
System.AggregateException: One or more errors occurred. ---> System.Exception: Errors in 'C:\github\dasblog-core\source\DasBlog.Tests\UnitTests\Properties\launchSettings.json' need to be corrected before applying changes.
at Microsoft.VisualStudio.ProjectSystem.Debug.LaunchSettingsProvider. d__101.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.Debug.LaunchSettingsProvider.<>c__DisplayClass95_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask. d__76.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.Tasks.SequentialTaskExecutor.<>c__DisplayClass8_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.Tasks.SequentialTaskExecutor.<>c__DisplayClass8_0. <g__JoinTaskAsync|1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler. d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler.<>c__DisplayClass13_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass32_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask. d__76.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler. d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim`1. d__5.MoveNext()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.Exception: Errors in 'C:\github\dasblog-core\source\DasBlog.Tests\UnitTests\Properties\launchSettings.json' need to be corrected before applying changes.
at Microsoft.VisualStudio.ProjectSystem.Debug.LaunchSettingsProvider. d__101.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.Debug.LaunchSettingsProvider.<>c__DisplayClass95_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask. d__76.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.Tasks.SequentialTaskExecutor.<>c__DisplayClass8_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.Tasks.SequentialTaskExecutor.<>c__DisplayClass8_0. <g__JoinTaskAsync|1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler. d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler.<>c__DisplayClass13_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass32_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask. d__76.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler. d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim`1. d__5.MoveNext()<---
===================
3/9/2022 4:55:00 PM
LimitedFunctionality
System.AggregateException: One or more errors occurred. ---> System.Exception: Errors in 'C:\github\dasblog-core\source\DasBlog.Tests\UnitTests\Properties\launchSettings.json' need to be corrected before applying changes.
at Microsoft.VisualStudio.ProjectSystem.Debug.LaunchSettingsProvider. d__101.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.Debug.LaunchSettingsProvider.<>c__DisplayClass95_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask. d__76.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.Tasks.SequentialTaskExecutor.<>c__DisplayClass8_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.Tasks.SequentialTaskExecutor.<>c__DisplayClass8_0. <g__JoinTaskAsync|1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler. d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler.<>c__DisplayClass13_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass32_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask. d__76.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler. d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim`1. d__5.MoveNext()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.Exception: Errors in 'C:\github\dasblog-core\source\DasBlog.Tests\UnitTests\Properties\launchSettings.json' need to be corrected before applying changes.
at Microsoft.VisualStudio.ProjectSystem.Debug.LaunchSettingsProvider. d__101.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ProjectSystem.Debug.LaunchSettingsProvider.<>c__DisplayClass95_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask. d__76.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.Tasks.SequentialTaskExecutor.<>c__DisplayClass8_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.Tasks.SequentialTaskExecutor.<>c__DisplayClass8_0. <g__JoinTaskAsync|1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler. d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler.<>c__DisplayClass13_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass32_0. <b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask. d__76.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.WslDebugging.Package.ProjectInitializerHandler. d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim`1. d__5.MoveNext()<---
===================
```
---
### Original Comments
#### Feedback Bot on 3/10/2022, 02:06 AM:
(private comment, text removed)
#### Peng Ge [MSFT] on 3/13/2022, 08:46 PM:
(private comment, text removed)
#### scott on 3/13/2022, 09:02 PM:
(private comment, text removed)
#### Peng Ge [MSFT] on 3/14/2022, 00:45 AM:
(private comment, text removed)
#### scott on 3/14/2022, 02:05 PM:
(private comment, text removed)
#### Peng Ge [MSFT] on 3/17/2022, 01:41 AM:
(private comment, text removed)
#### errorInCode@hotmail.com on 4/16/2022, 02:20 PM:
(private comment, text removed)
#### Feedback Bot on 7/4/2022, 00:47 AM:
(private comment, text removed)
#### Daniel Liuzzi on 8/10/2022, 05:07 AM:
(private comment, text removed)
#### Valentin André on 8/15/2022, 04:21 AM:
(private comment, text removed)
---
### Original Solutions
#### Valentin André solved on 8/16/2022, 02:32 AM, 0 votes:
I downgraded Visual Studio to 17.2.7 (LTSC) and that fixed the issue for me.
I did try to repair the 17.3 install first, but that did nothing.
Contributor guide
Assessment
This issue has not been assessed yet.