Closed c0d3sling3r closed 3 years ago
I don't know the main reason but I'm sure Roslyn analyzers should be created with the netstandard2.0
and it seems visual studio cannot reference an analyzer class library if there's any third-party dependencies.
Hello everyone. I'm developing a
Source Generator
as anAnalyzer
in with the versionnetstandard2.0
. I decided to employ aYAML
configuration file for my processes. So I needed to useSharpYaml
library. But whenever I import the library into my code, the project will not compile and an exception with the following message raises:Warning CS8785 Generator 'MyGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'SharpYaml, Version=1.6.6.0, Culture=neutral, PublicKeyToken=1ced8108e942bc02' or one of its dependencies. The system cannot find the file specified.'
Can you help me in this situation?