Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
22 views

I've been trying to setup roslyn.nvim with rzls.nvim on my neovim for a while to work with .NET, C# and Blazor. But I've been facing some frustrating problems, I'm using WSL Ubuntu 24.04, a neovim ...
Carlos Saraiva's user avatar
2 votes
0 answers
50 views

Here is my code: var compilation = CSharpCompilation.Create(asmProps.AssemblyName, syntaxTrees, references, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, ...
mark's user avatar
  • 63.6k
0 votes
2 answers
94 views

I am working on a Roslyn Diagnostic Analyzer and Code Fix Provider. Part of this entails an attribute, which takes a parameter of a method name, to override some validation logic. One of the ...
Dominick's user avatar
  • 496
0 votes
0 answers
75 views

Use Case Given a class with a specific attribute, during compilation, look for classes with that attribute, evaluate all the properties for the class, add [Display(Name = "some value")] to ...
Ron O's user avatar
  • 107
2 votes
1 answer
102 views

Using the Roslyn API I tried to retrieve the namespace of a nullable struct type (using ISymbol.ContainingNamespace) and was suprised when it returned the System namespace instead. This only happens ...
Doodelusion's user avatar
1 vote
1 answer
123 views

I want to dynamically compile model classes for my EF Core app. For that I use Roslyn, but I'm facing problems when trying to compile. One of my model classes looks like this: using head.de; using ...
DevEV's user avatar
  • 21
0 votes
0 answers
106 views

Json and JsonSubTypes in a C# / .NET 9 project with AOT-publishing enabled. These 2 libs are not trimming/AOT ready yet, but I'm sure the types that involved in my project are all reserved and working ...
Aries's user avatar
  • 219
3 votes
1 answer
86 views

I had an issue where a Roslyn source generator was not being called at all in a .NET project, the breakpoint of the Initialize method did not hit, while the launchSettings.json was correct and it did ...
Rubenisme's user avatar
  • 906
-3 votes
1 answer
100 views

When my code is missing a namespace, I can use the "usings quickfix" (ctrl + .) to recommend applicable namespaces. I use a library which has many types that are identically-named to those ...
lonix's user avatar
  • 22.4k
0 votes
1 answer
28 views

I am in the process of developing a C# roslyn code analyzer and code fix and am struggling with the proper code to perform the code changes. The analyzer and code fix logic itself does (hopefully) not ...
user1211286's user avatar
0 votes
0 answers
34 views

Hello everyone . Need Help!! I am new to open source and I am trying to create a analyzer for detecting the parameter values used in crypto Algorithm invocations. And I dont know if the current built-...
user29544916's user avatar
0 votes
1 answer
198 views

Download the dotnet 8 SDK binaries (https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-8.0.405-windows-x64-binaries) Locate dotnet.exe (dotnet-sdk-8.0.405-win-x64\dotnet.exe) Locate the ...
Niebieski's user avatar
0 votes
1 answer
275 views

I need to write a source generator that scans the project for one or another set of classes (marked with different attributes), then generates the same code from them (the second set of attributes is ...
MaxEd's user avatar
  • 372
0 votes
1 answer
66 views

I have developed my first diagnostic analyzer and installed it into a test project via NuGet. Everything works find, except that no red line is shown under the issue. I am using context.Node....
Dominick's user avatar
  • 496
0 votes
0 answers
35 views

I am trying to learn how to create a Roslyn diagnostic analyzer and decided to try to develop it against a library I recently created; specifically, for one of the attributes. The attribute is called ...
Dominick's user avatar
  • 496
0 votes
1 answer
120 views

I'm working on a C# application where I need to execute C# code provided as a string input using Roslyn. The challenge is to execute this code and access global variables stored in a Dictionary<...
Youchenn's user avatar
0 votes
1 answer
148 views

I am struggling with dotnet jb cleanupcode changing UserEntity[] users = [ new() { Name = "Example User 1", }, new() { Name = "...
allinonemovie's user avatar
1 vote
0 answers
63 views

Consider the following trivial C# code: public class Type1 { public const int I = 1; public static void f(){} } and using static Type1; public class Type2 { public static string X = ...
mark's user avatar
  • 63.6k
1 vote
1 answer
64 views

In a source generator, I'd like to determine if a member is IEnumerable or IDictionary. In the sample below, the array member returns IEnumerable, etc. from AllInterfaces, but I get zero interfaces ...
Jim W's user avatar
  • 483
1 vote
0 answers
265 views

I'd like to create a NuGet package for a WPF library component that I'm writing. As I'm using WPF classes, I cannot use .NET Standard. So, I need to target .NET 9 and .NET Framework 4.8.1 at the same ...
AxD's user avatar
  • 3,262
1 vote
1 answer
282 views

I'm creating custom roslyn analyzers in order to enforce custom code style rules in my project. So far it's been going well with the help of AI generators for .cs files. However I cannot get an ...
Alex's user avatar
  • 913
1 vote
1 answer
228 views

I have many commits described as some variation of "fixed error in SQL statement". Too many dumb mistakes like modifying a WHERE clause and leaving an extra AND keyword in it, things like ...
user71030's user avatar
  • 447
3 votes
2 answers
2k views

Beginner to Roslyn Source Generators here. I'm following the documentation on Source Generators by Microsoft. I have created a .NET Standard 2.0 Class Library, and set the following as the contents of ...
winscripter's user avatar
1 vote
1 answer
53 views

I'm new to Roslyn code fixes and try to create a properly formatted (indentation, line breaks) empty method with just a single-line comment: BEFORE: public class Bla { public void Blub() { ...
mu88's user avatar
  • 5,699
0 votes
1 answer
53 views

I need an exhaustive list of SyntaxKind that belongs to SyntaxToken, and list of SyntaxKind that belongs to SyntaxNode. The reason is because SyntaxKind contain not only kind that belongs to ...
user27520763's user avatar

1
2 3 4 5
59