Black.Beard.Roslyn 1.0.140

dotnet add package Black.Beard.Roslyn --version 1.0.140
                    
NuGet\Install-Package Black.Beard.Roslyn -Version 1.0.140
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Black.Beard.Roslyn" Version="1.0.140" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Black.Beard.Roslyn" Version="1.0.140" />
                    
Directory.Packages.props
<PackageReference Include="Black.Beard.Roslyn" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Black.Beard.Roslyn --version 1.0.140
                    
#r "nuget: Black.Beard.Roslyn, 1.0.140"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Black.Beard.Roslyn@1.0.140
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Black.Beard.Roslyn&version=1.0.140
                    
Install as a Cake Addin
#tool nuget:?package=Black.Beard.Roslyn&version=1.0.140
                    
Install as a Cake Tool

Black.Beard.Roslyn

Build status

Use Roslyn for generate the assembly


    // Use NJsonSchema for generate json schema
    JsonSchema schema = JsonSchema.FromType(typeof(Sample1));

    // Helper for manipulate codeDom object
    var samples = "CodeDOMSample".ToNamespace()
        .Import("System")       // append usings

        .AppendPoco(schema)     // add a poco class from schema

        .ToCSharp(Path.Combine(_dir.FullName, "class1.cs")) // Generate csharp code
        ;

    // compile
    AssemblyResult assembly = GetCsharpBuilder(samples.FullName);

    // consumme the result assembly
    if (assembly.Success)
    {
        var ass = assembly.LoadAssembly();
        var type = ass.GetTypes().First(c => c.Name == "Sample1");
        Assert.NotNull(type);
    
        var property = type.GetProperties().FirstOrDefault(c => nameof(Sample1.Name) == c.Name);
        Assert.NotNull(property);
    
    }
    else
    {
        var payload = File.ReadAllText(samples.FullName);
        throw new Exception();
    }


    private static Bb.Compilers.AssemblyResult GetCsharpBuilder(string filepathCode)
    {

        var fileInfo = new FileInfo(filepathCode);

        // Build assembly

        Action<CSharpCompilationOptions> action = (r) =>
        {

        };

        BuildCSharp builder = new BuildCSharp()
        {
            ResolveAssembliesInCode = true,
            Debug = true,
            LanguageVersion = LanguageVersion.CSharp7,
        }
        .AddSource(fileInfo)
        .Suppress("CS1702", "CS1998")
        ;

        // System.Collections
        builder.References.AddRange(
            typeof(object),
            typeof(RequiredAttribute)
        );

        var assembly = builder.Build();
        return assembly;

    }        

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Black.Beard.Roslyn:

Package Downloads
Black.Beard.Jslt

Implementation of jslt language in DOTNET. Use a template for transform Json document to another json document.

Black.Beard.OpenApi

add helpers for manipulate open api document. provide a visitor pattern.

Black.Beard.OpenApiServices

add visitor for generate code from open api documentation

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.140 208 4/14/2025
1.0.138 191 4/14/2025
1.0.137 182 4/3/2025
1.0.136 185 4/1/2025
1.0.135 167 4/1/2025
1.0.134 170 4/1/2025
1.0.133 218 1/27/2025
1.0.132 125 12/21/2024
1.0.131 169 12/7/2024
1.0.130 118 11/27/2024
1.0.129 113 11/24/2024
1.0.128 160 11/19/2024
1.0.127 115 11/19/2024
1.0.126 115 11/18/2024
1.0.125 108 11/17/2024
1.0.124 112 11/17/2024
1.0.123 105 11/17/2024
1.0.122 108 11/17/2024
1.0.121 111 11/17/2024
1.0.120 442 10/28/2024
1.0.119 114 5/3/2024
1.0.118 231 5/2/2024
1.0.117 260 4/7/2024
1.0.114 411 4/3/2024
1.0.113 430 3/31/2024
1.0.112 304 3/19/2024
1.0.111 154 3/16/2024
1.0.110 146 3/16/2024
1.0.109 207 3/15/2024
1.0.108 220 3/13/2024
1.0.107 302 3/12/2024
1.0.106 153 3/9/2024
1.0.105 149 3/6/2024
1.0.104 138 3/5/2024
1.0.103 195 3/4/2024
1.0.102 192 3/4/2024
1.0.101 148 3/4/2024
1.0.100 197 3/4/2024
1.0.99 207 3/3/2024
1.0.98 158 2/29/2024
1.0.97 146 2/29/2024
1.0.96 142 2/29/2024
1.0.95 161 2/27/2024
1.0.94 203 2/26/2024
1.0.93 190 2/25/2024
1.0.92 154 2/24/2024
1.0.91 138 2/24/2024
1.0.90 150 2/24/2024
1.0.89 269 2/24/2024
1.0.88 147 2/24/2024
1.0.87 170 2/23/2024
1.0.86 145 2/23/2024
1.0.85 147 2/23/2024
1.0.84 152 2/23/2024
1.0.83 171 2/23/2024
1.0.82 153 2/23/2024
1.0.81 155 2/22/2024
1.0.80 128 2/22/2024
1.0.79 132 2/22/2024
1.0.78 122 2/22/2024
1.0.77 150 2/21/2024
1.0.76 197 2/19/2024
1.0.75 150 2/19/2024
1.0.74 135 2/18/2024
1.0.73 142 2/17/2024
1.0.72 325 12/12/2023
1.0.70 268 10/17/2023
1.0.69 228 10/17/2023
1.0.68 175 10/17/2023
1.0.67 176 10/16/2023
1.0.66 195 10/16/2023
1.0.65 236 10/13/2023
1.0.64 228 10/10/2023
1.0.63 316 9/13/2023
1.0.62 229 7/31/2023
1.0.61 236 7/28/2023
1.0.60 212 7/28/2023
1.0.59 240 7/28/2023
1.0.58 221 7/28/2023
1.0.57 190 7/28/2023
1.0.56 203 7/27/2023
1.0.55 192 7/27/2023
1.0.54 240 7/27/2023
1.0.53 210 7/27/2023
1.0.52 237 7/27/2023
1.0.51 271 7/25/2023
1.0.50 227 7/25/2023
1.0.49 581 7/4/2023
1.0.48 263 6/30/2023
1.0.47 306 6/30/2023
1.0.46 243 6/30/2023
1.0.45 309 6/17/2023
1.0.44 297 6/17/2023
1.0.43 261 6/17/2023
1.0.42 305 6/6/2023
1.0.41 308 6/5/2023
1.0.40 258 6/5/2023
1.0.39 318 6/5/2023
1.0.38 326 5/31/2023
1.0.37 220 5/30/2023
1.0.36 269 5/30/2023
1.0.35 232 5/30/2023
1.0.33 254 5/30/2023
1.0.32 276 5/30/2023
1.0.31 245 5/30/2023
1.0.30 240 5/29/2023
1.0.29 259 5/25/2023
1.0.28 236 5/24/2023
1.0.27 238 5/18/2023
1.0.26 252 5/18/2023
1.0.25 277 5/18/2023
1.0.24 247 5/16/2023
1.0.23 263 5/15/2023
1.0.22 246 5/15/2023
1.0.20 234 5/14/2023
1.0.18 1,397 5/18/2022
1.0.17 1,818 5/17/2022
1.0.16 512 5/17/2022
1.0.15 532 4/3/2022
1.0.13 533 4/3/2022
1.0.12 1,865 3/28/2022
1.0.11 514 3/27/2022
1.0.10 3,885 3/16/2022
1.0.9 530 3/16/2022
1.0.8 519 3/16/2022
1.0.7 532 3/16/2022
1.0.6 562 3/16/2022
1.0.5 530 3/16/2022
1.0.4 519 3/14/2022
1.0.3 533 3/6/2022
1.0.2 11,125 12/19/2021
1.0.1 521 12/18/2021