Error during the compilation in VisualStudio's msbuild.exe #961
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I try to use the library for Roslyn code generation purposes. The code inside the generator:
There is an error during the compilation in Visual Studio or in pwsh via the command "./MSBuild.exe --restore "D:\source\projectName.csproj"" on the line "attribute.AttributeType.Resolve()"
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
2> at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters) in C:\sources\cecil\Mono.Cecil\BaseAssemblyResolver.cs:line 172
2> at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name) in C:\sources\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:line 33
2> at Mono.Cecil.MetadataResolver.Resolve(TypeReference type) in C:\sources\cecil\Mono.Cecil\MetadataResolver.cs:line 111
2> at Mono.Cecil.TypeReference.Resolve() in C:\sources\cecil\Mono.Cecil\TypeReference.cs:line 278
2> at CodeGenerator.Parameters.Parser.ParametersXmlParser.Create() in D:\source\code-generators\sources\CodeGenerator.Parameters\Parser\ParametersXmlParser.cs:line 84
Compilation via the command "dotnet build "D:\source\projectName.csproj"" works smoothly.
The most interesting is that despite the error during the compilation the generator itself works after the build of the solution is finished with error, if I click "re-run" to generate the code.