Comments (4)
Hi thiago
Thanks for your quick reply. the code given by you is working fine without any issue.i recreted my class library project and its working now.
from dapper.crud.extension.
Hello @mehar-eng , looks like there are itens in your project/folder which are not compiling correctly.
Please copy and paste the whole error here please too.
- Please first of all check if your solution is building properly.
- Check if there is any files not included in the project which are breaking (the component compiles everything and that's why.
- I also recommend you include all the model files that you use in the project in a separate project to make it easier and less dependant on other components.
Waiting your answer to help you out with the solution
from dapper.crud.extension.
Dear thiago
i have done all the suggestions from your end and project build is successfull but still i am getting the same error.below is the full error text.
MY MODAL
using System;
namespace Epro.Data.Models
{
///
/// Represents a ADP_Category.
/// NOTE: This class is generated from a T4 template - you should not modify it manually.
///
public class ADP_Category
{
public int ID { get; set; }
public string EDESC { get; set; }
public string ADESC { get; set; }
}
}
Compiler Errors
Error during the operation: Compiler Errors :
Line 16,1 : A using clause must precede all other elements defined in the namespace except extern alias declarations
Line 17,1 : A using clause must precede all other elements defined in the namespace except extern alias declarations
Line 18,1 : A using clause must precede all other elements defined in the namespace except extern alias declarations
Line 2862,22 : Invalid token '?' in class, struct, or interface member declaration
Line 2862,46 : Invalid token '{' in class, struct, or interface member declaration
Line 2862,51 : Invalid token ';' in class, struct, or interface member declaration
Line 2862,56 : Invalid token ';' in class, struct, or interface member declaration
Line 3290,21 : A namespace cannot directly contain members such as fields or methods
Line 3290,22 : Type expected
Line 3322,1 : Type or namespace definition, or end-of-file expected
Line 4064,22 : Invalid token '?' in class, struct, or interface member declaration
Line 4064,31 : Invalid token '{' in class, struct, or interface member declaration
Line 4064,36 : Invalid token ';' in class, struct, or interface member declaration
Line 4064,41 : Invalid token ';' in class, struct, or interface member declaration
Line 4068,1 : Type or namespace definition, or end-of-file expected
Line 4208,22 : Invalid token '?' in class, struct, or interface member declaration
Line 4208,39 : Invalid token '{' in class, struct, or interface member declaration
Line 4208,44 : Invalid token ';' in class, struct, or interface member declaration
Line 4208,49 : Invalid token ';' in class, struct, or interface member declaration
Line 4212,21 : A namespace cannot directly contain members such as fields or methods
Line 4212,22 : Type expected
Line 4218,1 : Type or namespace definition, or end-of-file expected
Line 13198,22 : Invalid token '?' in class, struct, or interface member declaration
Line 13198,43 : Invalid token '{' in class, struct, or interface member declaration
Line 13198,48 : Invalid token ';' in class, struct, or interface member declaration
Line 13198,53 : Invalid token ';' in class, struct, or interface member declaration
Line 13200,21 : A namespace cannot directly contain members such as fields or methods
Line 13200,22 : Type expected
Line 13202,1 : Type or namespace definition, or end-of-file expected
InnerException StackTrace at Dapper.Crud.VSExtension.Helpers.AssemblyHelper.BuildAssembly(String code) in C:\Projects\Dapper.Crud.Extension\Dapper.Crud.VSExtension\Helpers\AssemblyHelper.cs:line 46
at Dapper.Crud.VSExtension.Helpers.AssemblyHelper.ExecuteCode(String code, String namespacename, String classname, Boolean isstatic) in C:\Projects\Dapper.Crud.Extension\Dapper.Crud.VSExtension\Helpers\AssemblyHelper.cs:line 57
at Dapper.Crud.VSExtension.Helpers.ModelHelper.Generate(String[] content, String rawContent, String model) in C:\Projects\Dapper.Crud.Extension\Dapper.Crud.VSExtension\Helpers\ModelHelper.cs:line 10
at Dapper.Crud.VSExtension.frmExtension.GetPropertyInfos(String model) in C:\Projects\Dapper.Crud.Extension\Dapper.Crud.VSExtension\frmExtension.cs:line 277
at Dapper.Crud.VSExtension.frmExtension.GenerateCrud() in C:\Projects\Dapper.Crud.Extension\Dapper.Crud.VSExtension\frmExtension.cs:line 73
from dapper.crud.extension.
Hi, thanks for your input. Can you make sure that the file has the same name as the Class?
I have attached also the project that I tested, can you try to run locally in your environment and see what happens, please?
from dapper.crud.extension.
Related Issues (17)
- No code generated HOT 2
- Dapper.Crud.Extension on vs 2019 HOT 1
- Feature 'default literal' is not available in C# 7.0. Please use language version 7.1 or greater. Line 797,21 HOT 2
- Visual Studio 2019 Community Edition Error Message HOT 2
- Projeto foi abandonado? HOT 2
- Erro ao gerar Código HOT 5
- Assembly and module attributes must precede all other elements defined in a file except using clauses and extern alias declarations HOT 3
- Error thrown: 'IDbConnection' does not contain a definition for 'Query' HOT 1
- No tables displayed in list box HOT 8
- Add Support to C# 10 HOT 2
- Don't work with model C# 10 . CORE 6 HOT 2
- Error: Assembly and module attributes must precede all other elements HOT 4
- White box around selected line in dark theme. HOT 1
- ignoring byte type on model HOT 2
- inserted id HOT 2
- Error during the operation: Compiler Errors HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dapper.crud.extension.