You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Sentry.SourceGenerators via Visual Studio 2019 version 16.11 #4554
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..
One aspect that catches my eye is that you mentioned using v5.15.1 of the SDK,
but the error contains \5.14.1\.
Not sure if there is a restore issue, or just a message from a build before the version update.
Anyway, we need a bit more info about the environment to reproduce the error:
which version of the .NET SDK / Visual Studio / MSBuild is used on your Azure Pipelines agent?
I have the feeling that this is less of an UWP problem, but more of an issue related to compatibility with MSBuild and the available Roslyn Compiler version.
@Flash0ver yeah, issue exists in 5.14.1 and then I upgraded the package to see if this resolves anything, but no luck.
MSBuild version: 16.0
Visual Studio 2019
We excluded this warning and build seems to run just fine.
We can close this issue, we did a workaround and it will probably resolve itself in the future. Thanks!
I'd like to keep it open, at least for now, as we do indeed need to support building supported Projects from Visual Studio 16.11. May merge later into #4305.
changed the title [-]UWP (.netstandard 2.0) fails to build[/-][+]`Sentry.SourceGenerators` is not supported via Visual Studio 2019 version 16.11[/+]on Sep 23, 2025
changed the title [-]`Sentry.SourceGenerators` is not supported via Visual Studio 2019 version 16.11[/-][+]Support `Sentry.SourceGenerators` via Visual Studio 2019 version 16.11[/+]on Sep 23, 2025
Activity
linear commentedon Sep 23, 2025
ENG-5586 UWP (.netstandard 2.0) fails to build
getsantry commentedon Sep 23, 2025
Assigning to @getsentry/support for routing ⏲️
linear commentedon Sep 23, 2025
NET-461 UWP (.netstandard 2.0) fails to build
Flash0ver commentedon Sep 23, 2025
Thanks @KrzysztofFryzlewicz for reporting this issue.
One aspect that catches my eye is that you mentioned using
v5.15.1of the SDK,but the error contains
\5.14.1\.Not sure if there is a restore issue, or just a message from a build before the version update.
Anyway, we need a bit more info about the environment to reproduce the error:
I have the feeling that this is less of an UWP problem, but more of an issue related to compatibility with MSBuild and the available Roslyn Compiler version.
KrzysztofFryzlewicz commentedon Sep 23, 2025
@Flash0ver yeah, issue exists in 5.14.1 and then I upgraded the package to see if this resolves anything, but no luck.
MSBuild version: 16.0
Visual Studio 2019
We excluded this warning and build seems to run just fine.
8 remaining items
KrzysztofFryzlewicz commentedon Sep 23, 2025
I like the latter one, perfect!
Flash0ver commentedon Sep 23, 2025
I'd like to keep it open, at least for now, as we do indeed need to support building supported Projects from Visual Studio 16.11. May merge later into #4305.
[-]UWP (.netstandard 2.0) fails to build[/-][+]`Sentry.SourceGenerators` is not supported via Visual Studio 2019 version 16.11[/+][-]`Sentry.SourceGenerators` is not supported via Visual Studio 2019 version 16.11[/-][+]Support `Sentry.SourceGenerators` via Visual Studio 2019 version 16.11[/+]Flash0ver commentedon Sep 30, 2025
#4569 is now reporting this issue in CI