Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

preventing recompilation 03 Aug 2022 13:16 #23207

  • Otto
  • Otto's Avatar
  • Topic Author


  • Posts: 174
  • I am changing unittests (in C#) over XSharp code. I see that XSharp code is recompiling (or at least checking it) every time, even though nothing changed.
    Is there something I can do to prevent this behavior?

    Please Log in or Create an account to join the conversation.

    preventing recompilation 03 Aug 2022 14:18 #23208

    • Chris
    • Chris's Avatar


  • Posts: 3973
  • Hi Otto,

    I think you just need to need to go to Build -> Configuration Manager, and uncheck the "Build" checkbox from the unit test project (and any other you don't want to be automatically recompiled once a change something in a referenced library).
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    preventing recompilation 03 Aug 2022 15:01 #23209

    • Otto
    • Otto's Avatar
    • Topic Author


  • Posts: 174
  • hmm, are we talking about the same thing?
    I don't mind that the unit tests are recompiled when I build the solution as a whole.

    But when I change a unit test and want to run/debug it, then it compiles the source of the whole solution again (including the XSharp code that hasn't been changed).

    So every time I'm running a specific unit test it goes through compiling all the source, resulting at the end in
    ========== Build: 11 succeeded, 0 failed, 12 up-to-date, 0 skipped ==========
    So, the compiler sees that all is up to date.

    Please Log in or Create an account to join the conversation.

    preventing recompilation 03 Aug 2022 16:17 #23210

    • Chris
    • Chris's Avatar


  • Posts: 3973
  • Hi Otto,

    Well, normally VS (MSBuild) builds the projects that depend (directly or indirectly) on the code you changed, so could it be you have a reference to the unit test project
    in any of your regular projects in the solution?
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    preventing recompilation 03 Aug 2022 17:34 #23211

    • robert
    • robert's Avatar


  • Posts: 3585
  • Otto,

    hmm, are we talking about the same thing?
    I don't mind that the unit tests are recompiled when I build the solution as a whole.

    But when I change a unit test and want to run/debug it, then it compiles the source of the whole solution again (including the XSharp code that hasn't been changed).

    So every time I'm running a specific unit test it goes through compiling all the source, resulting at the end in
    ========== Build: 11 succeeded, 0 failed, 12 up-to-date, 0 skipped ==========
    So, the compiler sees that all is up to date.
    Are you sure that they are rebuild, or is this just the message that they are Up to date.
    Does the date/time of the EXE/DLL files change ?

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1