Giter Site home page Giter Site logo

Comments (10)

CyrusNajmabadi avatar CyrusNajmabadi commented on August 17, 2024

but if the entity is from the other reference item, it prompts an exception

What exception do you get?

from roslyn.

zy97 avatar zy97 commented on August 17, 2024

@CyrusNajmabadi no exception,Code can also be generated,but the project cannot be compiled,prompt not to find a suitable way to rewrite

from roslyn.

CyrusNajmabadi avatar CyrusNajmabadi commented on August 17, 2024

You said: > but if the entity is from the other reference item, it prompts an exception

from roslyn.

zy97 avatar zy97 commented on August 17, 2024

@CyrusNajmabadi yes, but the code has also been generated,project cannot be compiled,this is demo

from roslyn.

CyrusNajmabadi avatar CyrusNajmabadi commented on August 17, 2024

@CyrusNajmabadi yes,

Ok. So what is the exception you get?

Can you clarify what you mean by 'it prompts an exception'?

from roslyn.

zy97 avatar zy97 commented on August 17, 2024

@CyrusNajmabadi yes,

Ok. So what is the exception you get?

Can you clarify what you mean by 'it prompts an exception'?

The code generated by the source generator inherits a class, I implemented it manually, but the compiler says that the method cannot be found and cannot be overridden.

from roslyn.

zy97 avatar zy97 commented on August 17, 2024

@CyrusNajmabadi I may not be describing it very well, but the phenomenon I'm seeing is that I can't find the method rewrite, even though I've manually rewritten the method

from roslyn.

zy97 avatar zy97 commented on August 17, 2024

@CyrusNajmabadi That's the exception
image

from roslyn.

jjonescz avatar jjonescz commented on August 17, 2024

In that screenshot I see warning CS8785 which says your source generator is crashing with NullReferenceException - hence it is not generating any sources during the build.

from roslyn.

zy97 avatar zy97 commented on August 17, 2024

@jjonescz thx, I thought the exception didn't matter because the source code was already generated. When I fixed this exception, everything was sideways normal. But I never know why, the generated code is complete, but the compilation reports an error.

from roslyn.

Related Issues (20)

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.