Closed ThePlay3r closed 2 months ago
Hi, thanks for the detailed report. Unfortunately I will only have time to look into this next week.
I managed to build your reproduction without any errors. Can you check if this project works on your machine? LombokTest.zip
I will need to investigate some more as to how this error could occur, but like I said that will most likely happen next week.
I managed to build your reproduction without any errors. Can you check if this project works on your machine? LombokTest.zip
I will need to investigate some more as to how this error could occur, but like I said that will most likely happen next week.
Unfortunately, I get the same error.
Logs:
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.ConstructorGenerators.AllArgsConstructorGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.ConstructorGenerators.NoArgsConstructorGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.ConstructorGenerators.RequiredArgsConstructorGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.DecoratorGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.MethodGenerators.AsyncGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.MethodGenerators.AsyncOverloadsGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.MethodGenerators.FreezablePatternGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.MethodGenerators.SerializationGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.MethodGenerators.ToStringGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.MethodGenerators.ToTextGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.MethodGenerators.WithMethodsGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.PropertyGenerators.EnumValuesGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.PropertyGenerators.LazyGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.PropertyGenerators.NotifyPropertyChangedGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.PropertyGenerators.NotifyPropertyChangingGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.PropertyGenerators.PropertyGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>CSC: Warning CS8032 : An instance of analyzer Lombok.NET.PropertyGenerators.SingletonGenerator cannot be created from /home/raj/.nuget/packages/lombok.net/2.4.0/analyzers/dotnet/cs/Lombok.NET.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
0>Program.cs(7,13): Error CS1729 : 'AddPlayerToGameCallback' does not contain a constructor that takes 1 arguments
0>AddPlayerToGameCallback.cs(10,34): Warning CS8618 : Non-nullable field '_gameManager' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.
0>AddPlayerToGameCallback.cs(10,34): Warning CS0649 : Field 'AddPlayerToGameCallback._gameManager' is never assigned to, and will always have its default value null
Upon further investigation, I've probably found the reason.
Using .NET SDK 6.0.132
for build causes the error for me.
When I build it using .NET SDK 8.0.107
it builds successfully. (Even when targeting net6.0
)
For me, this solves the issue, but I don't really understand the reason for the failure.
That's very interesting. But I'm glad it works now.
Describe the bug I've just found out about this project and was exited to use it, coming from Java, this is something I would really appreciate having in C# as well.
To my issue now, it seems I can't build my project, if I'm using the generated constructors (I'm using the [RequiredArgsConstructor] one), weirdly enough, Intellisense itself doesn't give any error, and even navigates me to the generated constructor in
/tmp/JetBrains..
, only the build itself fails.To Reproduce Steps to reproduce the behavior:
Expected behavior I expect the project to build successfully.
Screenshots This is the code:
This is the .csproj, if its of any significance:
Environment info
Additional context I'm also getting these errors in the build log:
Seems to be issue with all analyzers. I'm using the latest JetBrains Rider.