![]() |
VOOZH | about |
dotnet add package Black.Beard.Roslyn --version 1.0.140
NuGet\Install-Package Black.Beard.Roslyn -Version 1.0.140
<PackageReference Include="Black.Beard.Roslyn" Version="1.0.140" />
<PackageVersion Include="Black.Beard.Roslyn" Version="1.0.140" />Directory.Packages.props
<PackageReference Include="Black.Beard.Roslyn" />Project file
paket add Black.Beard.Roslyn --version 1.0.140
#r "nuget: Black.Beard.Roslyn, 1.0.140"
#:package Black.Beard.Roslyn@1.0.140
#addin nuget:?package=Black.Beard.Roslyn&version=1.0.140Install as a Cake Addin
#tool nuget:?package=Black.Beard.Roslyn&version=1.0.140Install as a Cake Tool
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
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 |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.140 | 411 | 4/14/2025 |
| 1.0.138 | 344 | 4/14/2025 |
| 1.0.137 | 345 | 4/3/2025 |
| 1.0.136 | 337 | 4/1/2025 |
| 1.0.135 | 318 | 4/1/2025 |
| 1.0.134 | 310 | 4/1/2025 |
| 1.0.133 | 436 | 1/27/2025 |
| 1.0.132 | 277 | 12/21/2024 |
| 1.0.131 | 338 | 12/7/2024 |
| 1.0.130 | 267 | 11/27/2024 |
| 1.0.129 | 261 | 11/24/2024 |
| 1.0.128 | 315 | 11/19/2024 |
| 1.0.127 | 240 | 11/19/2024 |
| 1.0.126 | 263 | 11/18/2024 |
| 1.0.125 | 256 | 11/17/2024 |
| 1.0.124 | 267 | 11/17/2024 |
| 1.0.123 | 254 | 11/17/2024 |
| 1.0.122 | 250 | 11/17/2024 |
| 1.0.121 | 260 | 11/17/2024 |
| 1.0.120 | 752 | 10/28/2024 |