Comments (6)
This problem is probably caused by the way your c# file is organized.
Did you try another layout ? (See this project / unit tests for examples)
from fluentbuilder.
this is to merely illustrate the problem. Put both namespaces in a separate file and the problem is still there. the compiler doesn't care how things are grouped.
from fluentbuilder.
I think when you use [AutoGenerateBuilder(typeof(namespace1.MyModel))]
, it does work?
from fluentbuilder.
no because it wouldn't matter. the code above compiles since the class is resolved because of the using namespace1
. the source generator doesn't parse the text of the file, but uses the syntax tree of the source and can resolve the class. I don't know what namespace you use to generate the second builder because no file is even generated, but that would be a place to start.
from fluentbuilder.
It fixed in #37
Can you take a look?
from fluentbuilder.
Looks like it worked. thanks!
from fluentbuilder.
Related Issues (15)
- The type or namespace name 'UserBuilder' does not exist in the namespace 'FluentBuilder' (are you missing an assembly reference?) HOT 3
- Wrong initialization is generated for ReadOnlyCollection<> properties HOT 2
- Generating a builder for a property of a type where the ctor with the least parameters expects the property type itself causes a stack overflow HOT 1
- Add WithProperty overloads that accepts the property's builder when available HOT 1
- Builder generation fails if the target type has at least one ctor with parameters HOT 1
- Unable to use `Func` and `Action` with the builder methods HOT 3
- Builder code should handle init setter so that it doesn't generate non-compilable code HOT 14
- [enhancement]: for array `with` methods, consider adding the `params` keyword for easier use HOT 1
- Builder code should handle private setters HOT 2
- Builder could handle classes without default constructor HOT 1
- Bug with a class with CultureInfo HOT 4
- Child builders for properties not generating correct code HOT 5
- Automatic extension method generation for easy updating of existing class instances HOT 6
- Builder method not generated for protobuf collections HOT 1
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 fluentbuilder.