Skip to content

Include System.Text.Json dependency in the package#10

Merged
olstakh merged 2 commits intomainfrom
users/olstakh/pack_system_text_json
Sep 2, 2025
Merged

Include System.Text.Json dependency in the package#10
olstakh merged 2 commits intomainfrom
users/olstakh/pack_system_text_json

Conversation

@olstakh
Copy link
Owner

@olstakh olstakh commented Sep 2, 2025

For some reason from visual studio sometimes we observe AD0001 warning:

Analyzer 'ReferenceProtector.Analyzers.ReferenceProtectorAnalyzer' threw an exception of type 'System.IO.FileNotFoundException' with message 'Could not load file or assembly 'System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.'.

Even though this works via command line (i.e. dotnet build). Researching online - it's possible VS is a bit behind in dependency management of the analyzers (potentially, other IDEs might be too). Some suggest including the dependency in the package in dotnet/analyzer/cs folder, that's what's done in this PR

@olstakh olstakh merged commit 80eb143 into main Sep 2, 2025
2 checks passed
@olstakh olstakh deleted the users/olstakh/pack_system_text_json branch September 2, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant