Giter Site home page Giter Site logo

drizin / codegencs Goto Github PK

View Code? Open in Web Editor NEW
230.0 12.0 32.0 1.31 MB

C# Toolkit for Code Generation (T4 alternative!)

License: MIT License

C# 82.27% PowerShell 3.60% PLpgSQL 14.09% Smalltalk 0.04%
codegenerator codegeneration csharp template-engine metaprogramming template-metaprogramming codesmith codesmith-templates t4 t4-engine

codegencs's Introduction

"You can do anything, but you can't do everything"

Hi there 👋 👋 👋 😎

💻 Principal Software Engineer (20+ yoe), mostly working with Microsoft stack (.NET, C#, SQL Server, Azure, etc).
☀️ - Currently living in sunny South Florida 🌴 ☀️ 🌴 ☀️ 🌴
💭 - My Blog where I write about random coding stuff
☕ - My LinkedIn profile
📧 - How to reach out to me

GitHub stats

Some recent opensource projects:

  • ⭐ - InterpolatedSql (formerly DapperQueryBuilder): Library to dynamically build injection-safe SQL statements using String Interpolation and Fluent API. Dapper is a popular micro ORM for .NET framework
  • ⭐ - CodegenCS: C# Toolkit for Code Generation (for anyone who had love and hate relationship with T4 Templates, and know how difficult it is to get whitespace right). Check-out these samples for generating POCOs/DAL or for generating NSWag Client
  • ⭐ - InterpolatedLogging: Extensions to Logging Libraries (Serilog, NLog, Microsoft ILogger) to write Log Messages using Interpolated Strings without losing Structured Property Names
  • ⭐ - Harbin.DataAccess: library to use distributed databases (with read-replicas) on top of Dapper / DapperQueryBuilder, with an optional Generic Repository Pattern implementation using Dapper SimpleCrud
  • ⭐ - NsisMultiUser: NSIS plugin that allows to choose between "per-user" installations (no admin required) and "per-machine" installations (asks elevation only when necessary)
  • 👀 - What's the next big thing??

Some non-opensource projects which I've built and still maintain:

  • 📺 - TV Map: TV Listings for Brazil and Portugal
    Social TV platform (launched in 2012) for users to share what they are watching, see what others are watching, and connect to people who are watching the same TV shows.
    It’s based on crawler robots, and has more than 3 million monthly page views.
  • ⭐ - Krepost and Castellum are Migration tools to export source code history from Microsoft Visual SourceSafe to Subversion or Git. (This is much more complex than it seems)
  • ⭐ - Servantt is a tool to reverse-engineer your SQL Server objects into scripts, compare database to the scripts, update the scripts, or apply script changes back to the SQL server.
  • 😺 - MemeLab - work in progress - Meme Editor
  • 👀 - What's the next great idea??

codegencs's People

Contributors

dependabot[bot] avatar drizin avatar frankhaugen avatar loop8ack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codegencs's Issues

Visual Studio Extension

Hi there,
I was just wondering if there was ever a consideration to make this tool a visual studio extension?
What would you consider the pro's and cons of the alternative approaches?
Thanks

Dependency on local copies of CommandLine libs

I tried to make my own code-gen project by following "SimplePocos" example, but the project cannot be compiled because the library depends on two local copies of the CommandLine project libraries:

    <PackageReference Include="System.CommandLine" Version="2.0.0-codegencs" />
    <PackageReference Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-codegencs" />

Is it possible maybe to update it to the latest published beta4 version?

VS2022 17.10.1 HRESULT Error

When executing a template in VS2022 17.10.1 I get a HRESULT error when the solution is updated:

Loading 'User1.dll'...
Template entry-point: 'UserTemplate.Main()'...
Generated 1 file: 'D:\Projects\EdiabasLib\Tools\Psdz\AssemblyPatcher\Users1.config'
Successfully executed template 'User1.dll'.
CodegenCS - run template successfully finished. Updating Solution Explorer tree...
CodegenCS - error running template: Falscher Parameter. (Ausnahme von HRESULT: 0x80070057 (E_INVALIDARG))

This problem seems to occur only for .NET Framework projects. With NET8 there is no error.

Null adds an empty line

I have the following method, which contains some conditional logic

        public FormattableString RenderEntityDbSets(Solution solution, Entity entity)
        {
            if (IsEntityModelExists(solution, entity))
            {
                return $$"""

                    public virtual DbSet<Models.{{entity.Name}}> {{entity.Name}} { get; set; }
                    """;
            } 
            else
            {
                return null;
            }


        }

When I return a null, I have noticed that the ICodegenTextWriter adds an empty line.

Is there a better way to get around this?

MSBuild Tooling

Would having MSBuild support be possible? The VS extension is nice but not having to check in the generated code would be nice

Multiline string indent control does not work

Hi there,

First: Nice project, it reduced the code for my CodeGenerator from about 1200 very confusing lines to about 700 clearly readable lines. :)

But I need to write some multiline strings, but they cause problems.
A few examples:

using var stringWriter = new StringWriter();
var codeWriter = new CodegenTextWriter(stringWriter);

var s = @"a
empty:

c
empty:

e";

codeWriter.WriteLine($$"""
    namespace N
    {
        public class A
        {
            {{TestMethod(s, "Test1", StringToCode1)}}
            {{TestMethod(s, "Test2", StringToCode2)}}
            {{TestMethod(s, "Test3", StringToCode3)}}
            {{TestMethod(s, "Test4", StringToCode4)}}
            {{TestMethod(s, "Test5", StringToCode5)}}
            {{TestMethod(s, "Test_Workaround", StringToCode_Workaround)}}
            // All tests end
        }
    }
    """);

codeWriter.Flush();

Console.WriteLine(stringWriter.ToString());

static FormattableString TestMethod(string s, string name, Func<string, object> getStringCode)
{
    return $$"""
        public static string {{name}}()
        {
            return {{getStringCode(s)}};
        }
        // {{name}} end
        """;
}
static object StringToCode1(string s)
    => $"\"{s}\"";
static FormattableString StringToCode2(string s)
    => $$"""
        @"{{s}}"
        """;
static FormattableString StringToCode3(string s)
    => $$"""
        @"{{s.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None)}}"
        """;
static FormattableString StringToCode4(string s)
{
    var lines = s
        .Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None)
        .Select<string, FormattableString>(l => $$"""{{l}}""");

    return $$"""
        @"{{lines}}"
        """;
}
static FormattableString StringToCode5(string s)
{
    var lines = s
        .Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None)
        .Select<string, FormattableString>(l => $$"""{{TTW}}{{l}}""");

    return $$"""
        @"{{lines}}"
        """;
}
static Action<ICodegenTextWriter> StringToCode_Workaround(string s)
    => (ICodegenTextWriter writer) =>
    {
        var lines = s
            .Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);

        var indentLevel = writer.IndentLevel;

        for (int i = 0; i < indentLevel; i++)
            writer.DecreaseIndent();

        writer.Write($"@\"{lines[0]}");

        foreach (var line in lines.Skip(1))
        {
            writer.WriteLine();
            writer.Write(line);
        }

        writer.Write("\"");

        for (int i = 0; i < indentLevel; i++)
            writer.IncreaseIndent();
    };

Das Ergebnis:

namespace N
{
    public class A
    {
        public static string Test1()
        {
            return "a
            return empty:

            return c
            return empty:

            return e";
        }
        // Test1 end
        public static string Test2()
        {
            return @"a
            return @"empty:

            return @"c
            return @"empty:

            return @"e";
        }
        // Test2 end
        public static string Test3()
        {
            return @"a
            return @"empty:
            return @"c
            return @"empty:
            return @"e
            return ";
        }
        // Test3 end
        public static string Test4()
        {
            return @"a
            return @"empty:
            return @"c
            return @"empty:
            return @"e
            return ";
        }
        // Test4 end
        public static string Test5()
        {
            return @"a
return @"empty:
return @"c
return @"empty:
return @"e
            return ";
        }
        // Test5 end
        public static string Test_Workaround()
        {
            return @"a
empty:

c
empty:

e";
    }
    // Test_Workaround end
        // All tests end
    }
}

The last method is my workaround, for my purposes it works, but it messes up the indentation of the following lines, as you can see from the comments.
I also had another problem where the string was written without a duplicated return, but the indentation of the new lines was messed up. However, I could not reproduce the problem in the small sample code.

For me this TODO would solve the problem, then I can split the string and put all following lines at the beginning of the line, but this would then no longer be automatic indent control?

Best greetings

Incompatible license in dependency

Hi, I'm getting an incompatible license error on my Open Source validation. This is caused by Newtonsoft.Json.Schema -nuget using AGPL-3.0-only -license. You cannot distribute your nuget with MIT because of this.

I'm trying to clean up my licenses situation, (I'm using fossa.com for this), and I'll either have to stop using your library, or you need to update it to be compliant with MIT

Use System.XML in template fails

When trying to use a reference to System.Xml I get the following error during template generation:

  CS1069: Line 29 Der Typname "XmlDocument" konnte nicht im Namespace "System.Xml" gefunden werden. Dieser Typ wurde an Assembly "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" weitergeleitet. Sie sollten einen Verweis auf die Assembly hinzufügen.
  CS1069: Line 29 Der Typname "XmlDocument" konnte nicht im Namespace "System.Xml" gefunden werden. Dieser Typ wurde an Assembly "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" weitergeleitet. Sie sollten einen Verweis auf die Assembly hinzufügen.
  CS1069: Line 31 Der Typname "XmlNode" konnte nicht im Namespace "System.Xml" gefunden werden. Dieser Typ wurde an Assembly "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" weitergeleitet. Sie sollten einen Verweis auf die Assembly hinzufügen.
  CS1069: Line 34 Der Typname "XmlAttribute" konnte nicht im Namespace "System.Xml" gefunden werden. Dieser Typ wurde an Assembly "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" weitergeleitet. Sie sollten einen Verweis auf die Assembly hinzufügen.
  CS1069: Line 40 Der Typname "XmlAttribute" konnte nicht im Namespace "System.Xml" gefunden werden. Dieser Typ wurde an Assembly "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" weitergeleitet. Sie sollten einen Verweis auf die Assembly hinzufügen.

This is included in the code:

using System.IO;
using System.Xml;
using System;
...
                XmlDocument doc = new XmlDocument();
                doc.Load(fileName);
                XmlNode nodeCtor = doc.SelectSingleNode("/patch_info/ctor");
...

Still having issues with Emptylines

I am still having issues with EmptyLines just upgraded to 3.5

  • I am calling the Render Method using the following code
        public string GenerateOqtaneEntityEdit(CodeGenSchema codeGenSchema)
        {

            ICodegenTextWriter writer = new CodegenTextWriter();
            writer.RemoveWhitespaceFromEmptyLines = false;
            writer.LoadTemplate<OqtaneEntityEditTemplate>().Render(codeGenSchema);
            var contents = writer.GetContents();

            var isClientModuleFolderExists = Directory.Exists(Utilities.PathCombine(codeGenSchema.Solution.Location, $"Client/Modules/{codeGenSchema.Solution.Namespace}.{codeGenSchema.Entity.Name}"));

            if (!isClientModuleFolderExists)
            {
                Directory.CreateDirectory(Utilities.PathCombine(codeGenSchema.Solution.Location, $"Client/Modules/{codeGenSchema.Solution.Namespace}.{codeGenSchema.Entity.Name}"));
            }

            var path = Utilities.PathCombine(codeGenSchema.Solution.Location, $"Client/Modules/{codeGenSchema.Solution.Namespace}.{codeGenSchema.Entity.Name}", $"Edit.razor");
            System.IO.File.WriteAllText(path, contents);

            return writer.GetContents();
        }
  • I have the following Render Method
        public FormattableString Render(CodeGenSchema codeGenSchema)
        {

            var solution = codeGenSchema.Solution;
            var entity = codeGenSchema.Entity;
            var camelEntityName = entity.Name.Camelize();
            var camelPluralEntityName = entity.PluralName.Camelize();

            return $$"""
                    @using Oqtane.Modules.Controls
                    @using {{solution.Namespace}}.Services
                    @using {{solution.Namespace}}.Models
                    @using Oqtane

                    @namespace {{solution.Namespace}}.{{entity.Name}}
                    @inherits ModuleBase
                    @inject I{{entity.Name}}Service {{entity.Name}}Service
                    @inject NavigationManager NavigationManager
                    @inject IStringLocalizer<Index> Localizer
                    @inject IStringLocalizer<SharedResources> SharedLocalizer

                    <form @ref="form" class="@(validated ? " was-validated" : "needs-validation" )" novalidate>
                        <div class="container">
                            {{entity.Properties.Select(p => RenderFormControls(entity, p))}}
                        </div>
                        <button type="button" class="btn btn-success" @onclick="Save">@Localizer["Save"]</button>
                        <NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
                        <br /><br />
                        @if (PageState.Action == "Edit")
                        {
                            <AuditInfo CreatedBy="@_createdby" CreatedOn="@_createdon" ModifiedBy="@_modifiedby" ModifiedOn="@_modifiedon"></AuditInfo>
                        }
                    </form>

                    @code {
                        // uncomment the following line to use Static render mode for this component
                        // public override string RenderMode => RenderModes.Static;
                        // uncomment the following line to Prerender on Server NOTE: This may effect SOE so should only be used in backend pages
                        // public override bool? Prerender => true

                        public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;

                        public override string Actions => "Add,Edit";

                        public override string Title => "Manage {{entity.Name}}";

                        public override List<Resource> Resources => new List<Resource>()
                        {
                            new Resource { ResourceType = ResourceType.Stylesheet, Url = ModulePath() + "Module.css" }
                        };

                        private ElementReference form;
                        private bool validated = false;

                        private int _id;
                        {{entity.Properties.Select(p => RenderProperties(entity, p))}}
                        private string _createdby;
                        private DateTime _createdon;
                        private string _modifiedby;
                        private DateTime _modifiedon;

                        {{RenderOnInitializeAsyncMethod(entity)}}

                        {{RenderSaveMethod(entity)}}

                    }
                    """;

        }
  • The {{entity.Properties.Select(p => RenderProperties(entity, p))}} calls the below method
        public FormattableString RenderProperties(Entity entity, Property property) 
        {

            if (property.ShowOnEditAction || property.ShowOnCreateAction)
            {

                if (property.Type == "DateTime")
                {
                    return $$"""
                        private {{property.Type}}? _{{property.Name.Camelize()}};
                        private {{property.Type}}? _{{property.Name.Camelize()}}Time;
                        """;
                }
                if (property.Type == "bool")
                {
                    return $$"""
                        private string _{{property.Name.Camelize()}} = "True";
                        """;
                }
                else
                {
                    return $$"""
                        private {{property.Type}} _{{property.Name.Camelize()}};
                        """;
                }

            }
            else
            {
                return $$"""{{Symbols.TLW}}""";
            }

        }
  • The result is as follows
    private int _id;
    private string _firstName;

    private string _lastName;

    private string _sex = "True";

    private DateTime? _dOB;
    private DateTime? _dOBTime;

    private int _mRN;

Create my own CLI with Codegencs

There is not a way to pass in runtime variables. There should be a way to pass in variables during runtime and not just using a static file. I want the user to pass in that information. How is this done with this tool?

Unable to make my Template with Custom Model work ... Please Help!

I have made a class following your examples as follows.

using CodegenCS;
using CodegenCS.Models;
using System;
using System.Linq;

namespace Amazing.Module.CodeGen.Templates
{
    public class MyModel : IJsonInputModel
    {
        public string[] Tables { get; set; }
    }

    public class OqtaneModelTemplate : ICodegenStringTemplate<MyModel>
    {
        public FormattableString Render(MyModel schema) => $$"""
        namespace MyNamespace
        {
            {{schema.Tables.Select(t => RenderTable(t))}}
        }
        """;

        FormattableString RenderTable(string table) => $$"""
        /// <summary>
        /// POCO for Users
        /// </summary>
        public class {{table}}
        {

        }
        """;
    }
}
  • I am calling the above using the following code
        public async Task<FormattableString> GenerateOqtaneModel()
        {

            MyModel model = new MyModel();
            model.Tables = new string[] { "Patient", "Doctor" };
            var entities = (await _entityRepository.GetEntitiesAsync()).ToList();
            //foreach (var entity in entities)
            //{
            //    model.Tables.Append(entity.Name);
            //}

            OqtaneModelTemplate oqtaneModelTemplate = new OqtaneModelTemplate();
            return oqtaneModelTemplate.Render(model);

        }
  • This is the result I get
  namespace MyNamespace
  {{
      {0}
  }}

Why doesn't this work?

Postgres support

Hi Rick, does it support Postgres? Are there any plans to add that feature? Thanks!

Execute extension if output file is missing

At the moment the extension is only execute when source the file is saved.
If the output file is missing, you have to call the extension manually from the VS context menu one time.
Is there is way to execute the extension if the output file is missing?

Command line tools only support Net 5.0

I tried to use the command line tools to get a model from a database schema however it wouldn't run as I only have Net 6 and 7 currently installed, and the command line tools require Net 5 which reached EOL in May of last year.

You must install or update .NET to run this application.

App: /home/jordan/.dotnet/tools/dotnet-codegencs
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '5.0.0' (x64)
.NET location: /usr/share/dotnet

The following frameworks were found:
6.0.14 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
6.0.15 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
7.0.3 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
7.0.4 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=opensuse-leap.15.4-x64

CodeGenCs by Importing class attributes Metadata from Excel

Hello this a nice place to keep the meta data of my projects. I used to have an excel spreadsheet with the table names & two Cols for the name and type, I would like to import that into your project - so I can generate the model objects from from here.

Excel Col - ClassName 
Excel Col - AtrributeName
Excel Col - Type

How can I template this excel sheet to a simple C# POCO model class with the name and type

Space in .RenderAsSingleLineCSV after comma dilimeter

I have a situation where I need properties that have a comma , without the space.

  • I have the following code in the Render method which returns FormattableString

<Pager Items="@_{{camelPluralEntityName}}" PageSize="@_pageSize" SearchProperties="{{entity.Properties.Select(p => RenderFilterableProperties(entity, p)).RenderAsSingleLineCSV()}}{{Symbols.TLW}}{{Symbols.TTW}}">

  • The result is

<Pager Items="@_patients" PageSize="@_pageSize" SearchProperties="FirstName, LastName, MRN, DOB, Diabetes">

  • I need the result to be

<Pager Items="@_patients" PageSize="@_pageSize" SearchProperties="FirstName,LastName,MRN,DOB,Diabetes">

Can you please help

Thanking you in advance

Unexpected behavior when rendering multiline items

        List<FormattableString> list = new List<FormattableString>()
        {
            $$"""
            Multi line 1{{IF(true)}}
            Multi line 2{{ENDIF}}
            Multi line 3
            """,

            $"Single line",
        };

        var textWriter = new CodegenTextWriter();
        textWriter.Write($"{list.Select(x => (FormattableString)$"Value start: {x}")}");
        string result = textWriter.ToString();

result:

Value start: Multi line 1
Value start: Multi line 2
Value start: Multi line 3

Value start: Single line

expected result:

Value start: Multi line 1
Multi line 2
Multi line 3

Value start: Single line

Removing the explicit cast to FormattableString results in adding Value start: as expected but the symbols IF and ENDIF are not resolved.

What can I do to generate the expected result?

not found .SaveToFile

in version 3.1.0 the 'SaveToFile' function is not inside 'CodegenTextWriter', has it been refactored? Where can I find a changelog of the changes?

Support for .net 8

Hi @Drizin ,

Just found CodegenCS interesting for code generation, however my application is built on .net 8 and I have tried to install dotnet-codegencs and then realized that it supports upto .net 7, is there a way to make it compatible with .net 8 or do you have a plan to do so.

Have a great day!

Reference DLL

Hi,
I found this project just yesterday, seemed pretty easy to use. I need to reference a DLL which I will 'parse' to another language.
Using #r to reference it made IntelliSense work, but the generator does not handle it.

CS7011: Line 0 #r is only allowed in scripts

Any advice on how to reference DLL in your Codegen templates (with working IntelliSense if possible)?

Namespace of the generated code depending on the path of the folder location of the .csx file

As I understand it, at the moment the code-generating class does not have any access, so that it becomes possible to orient (generate code depending on) its position in the project. All I can get inside the generator is the name of the resulting file. Not the path, unfortunately, namely that only the name, although it is called "relativePath", but it contains just the name of the output file.

The name of input file, template, is also not available. But the input file name can be output back from the output file name. But not path.

For example, it is impossible to generate the namespace of the generated class depending on the relative position of the file in the project (I mean nested folders, and somewhere at the end there is a .csx file; to get the final .cs file with the namespace corresponding to the breadcrumbs of these nested folders). Maybe I'm wrong and yet somehow it is possible to solve this problem now?

PS. I mean VSExtension. At least I have considered so far only how this part works. But actually, it is only she who is needed.

Unable to run if reference are added

Hi @Drizin !

I've try to replace an old T4 template by a CodegenCS generation.
Our previous T4 query the database to generate some files.
I've try do to the same with CodegenCS but this crash on run command.
Is it possible to do that with CodegenCS ? I'm missing something ?

Have a great day !

dotnet-codegencs.exe version 3.1.5.0 (CodegenCS.Core.dll version 3.3.1.0)
Building 'EnumGenerator.cs'...
Errors:
CS0234: Line 3 Le nom de type ou d'espace de noms 'Data' n'existe pas dans l'espace de noms 'Microsoft' (vous manque-t-il une référence d'assembly ?)
CS0234: Line 4 Le nom de type ou d'espace de noms 'Generator' n'existe pas dans l'espace de noms 'Leo.Entities.Enum' (vous manque-t-il une référence d'assembly ?)
CS0246: Line 148 Le nom de type ou d'espace de noms 'TableEnumInfo' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 164 Le nom de type ou d'espace de noms 'EnumValueItem' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 164 Le nom de type ou d'espace de noms 'TableEnumInfo' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 174 Le nom de type ou d'espace de noms 'TableEnumInfo' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 186 Le nom de type ou d'espace de noms 'TableEnumInfo' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 17 Le nom de type ou d'espace de noms 'TableEnumInfo' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 17 Le nom de type ou d'espace de noms 'TableEnumInfo' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 18 Le nom de type ou d'espace de noms 'SqlConnection' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 18 Le nom de type ou d'espace de noms 'SqlConnection' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 21 Le nom de type ou d'espace de noms 'SqlCommand' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 21 Le nom de type ou d'espace de noms 'SqlCommand' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 24 Le nom de type ou d'espace de noms 'SqlDataReader' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 36 Le nom de type ou d'espace de noms 'TableEnumInfo' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 64 Le nom de type ou d'espace de noms 'SqlDataReader' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
CS0246: Line 68 Le nom de type ou d'espace de noms 'EnumValueItem' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
Error while building 'EnumGenerator.cs'.
TemplateBuilder ('dotnet-codegencs template build') Failed.
ERROR: Could not load or build template: EnumGenerator.cs

Build is not working

Hej, I just downloaded the source, but either your build.cmd nor Visual Studio can compile your source. Package Manager is also giving me an error: The local source '....\CodegenCS\src\packages-local' doesn't exist.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.