Is there any way to detect .NET version in my custom C# compiler? (with Roslyn)
I want to build my own C# compiler (new csc) and I want to add features that detect .NET version (.NET 4.5 to .NET 8) but it only return fixed value (like “net5.0”) this is my code:
Strange C# behavior of a property with a nullable type
A simple example:
C# detect primary constructor with Roslyn
I’m trying to analyse the primary constructor of a class but I can’t find how. It should be possible to find it in the syntax tree, I don’t want to create the semantic model.
Roslyn compilation fail loading dependencies
I’m opening a C# solution/projetcs (csprj) with Roslyn but the compilation fails when resolving all types coming from nuget dependencies.
How to restore packages and/or tell Roslyn to load all binaries in bin folder ?
The solution/projetcs build and run ok in VisualStudio.
expore use of types with roslyn
I need to detect the use of some types and their properties. Types are in external assemblies always. I need to identify their use on current code.
I’m iterating over projects and documents but only local namespaces and types are available using SemanticModel.
Is there any Tree of Referenced Types available in semanticModel ?