none
Visual Studio 2019 not picking up CS generated files RRS feed

  • Question

  • Hi,

    I have created dot net core dll project. CS files for this project will be files generated by tool (Apache Thrift compiler) but output dll is not picking up generated file. I have added the pre build set to generate the file.

    Repro Steps:

    1. Build solution

    2. Open the ThriftSample.dll with object brower. (Delete the generated cs files and bin, com and obj folder.)

    Actual: Nothing is there in ThriftSample.dll

    Expected: Generated CS code should be there.

    Note: I have checked CS file is generated. Attached is the sample project. 

    SampleProject

    Tuesday, December 24, 2019 11:46 AM

Answers

  • Hi xyzam,

    Welcome to MSDN forum.

    According to your steps, I could reproduce this situation on my side. It is the normal phenomenon. The build event is a component in project structure. When we build the specified project, the compiler will read the csproj at first, then run specified module in it. So the generated dll will be empty.

    Any feedback will be expected.

    Best Regards,

    Dylan



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by xyzam Thursday, December 26, 2019 3:06 PM
    Wednesday, December 25, 2019 7:22 AM