getsentry / getsentry/sentry-dotnet

Support `Sentry.SourceGenerators` via Visual Studio 2019 version 16.11

Open
#4,554 11 comments 0 reactions 1 assignee Claimed by @Flash0ver View on GitHub
.NET Improvement
Dominant language
C#
Stars
770
Forks
248
Avg merge
3d 4h
Merged PRs (30d)
49

Description

### Environment

SaaS (https://sentry.io/)

### Steps to Reproduce

When building UWP project using Azure DevOps Pipelines we got this error:

Error CS8032: An instance of analyzer Sentry.SourceGenerators.BuildPropertySourceGenerator cannot be created from C:\Users\svcprd_tfbuild\.nuget\packages\sentry\5.15.1\analyzers\dotnet\cs\Sentry.SourceGenerators.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..

Microsoft.CodeAnalysis Version=4.3.0.0 is not available in Nuget repository.

Sentry Version=5.15.1

EDIT:
TreatWarningAsErrors is set to true, so this error is acutally a warning:
CSC : warning CS8032: An instance of analyzer Sentry.SourceGenerators.BuildPropertySourceGenerator cannot be created from C:\Users\svcprd_tfbuild\.nuget\packages\sentry\5.14.1\analyzers\dotnet\cs\Sentry.SourceGenerators.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..

### Expected Result

Build should finish without problems.

### Actual Result

Build fails with error described above

### Product Area

Unknown

### Link

_No response_

### DSN

_No response_

### Version

_No response_

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.