dotnet / dotnet/docs

Analyzer tutorial - exception when debugging VSIX project (first time only)

Open
#26,103 1 comment 0 reactions 0 assignees View on GitHub
dotnet-csharp/svc okr-quality roslyn-sdk/subsvc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

I am attempting to follow the tutorial, but when I got to this point:
>MakeConst.Vsix, which is the default startup project that starts a second instance of Visual Studio that has loaded your new analyzer. Press F5 to start the VSIX project.

I receive a NullReferenceException when it tries to start up the experimental instance of VS2019, with the following stack trace:
`at Microsoft.VisualStudio.ExtensionManager.EngineSettings.get_UserSettingsStore()`

I attempted to reproduce it to get more exception details, and now the issue is gone. So apparently this is a first time issue only?

Not sure if this should be filed under [dotnet/roslyn-sdk](https://github.com/dotnet/roslyn-sdk/issues)?

Happening with Visual Studio 2019 Community.
`v16.10.1`

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 6e3fc905-7aa1-7f5e-9bfe-fbcef461ad5e
* Version Independent ID: a286e20b-1e43-dc57-e0fb-5a9dee7ec3f6
* Content: [Tutorial: Write your first analyzer and code fix](https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/tutorials/how-to-write-csharp-analyzer-code-fix)
* Content Source: [docs/csharp/roslyn-sdk/tutorials/how-to-write-csharp-analyzer-code-fix.md](https://github.com/dotnet/docs/blob/main/docs/csharp/roslyn-sdk/tutorials/how-to-write-csharp-analyzer-code-fix.md)
* Product: **dotnet-csharp**
* Technology: **csharp-roslyn**
* GitHub Login: @BillWagner
* Microsoft Alias: **wiwagn**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.