none
order of resolution? RRS feed

  • Question

  • Explain me this please...

    There is a _ResourceCompileDependsOn ... this contains a $(BeforeResourceCompileTargets); and others... and BeforeRecourseCompileTargets contains only ";BeforeResourceCompile;" ...

    Now... I'm adding something (Target ahaa) to the BeforeResourceCompile... but, in the diagnose output I see that _ResourceCompileDependsOn does contain the old value of BeforeResourceCompile. Why?

    When I instead add something to the _ResourceCompileDependsOn, then it is there and is executed.

    What's the thing I'm not understanding here???

    Rudolf

    Thursday, November 14, 2019 10:03 PM

All replies

  • Hi Rudolf Meier,

    Thank you for posting here.

    As far as I know, the compiler first compiles the modules and then links them together. And the general build mode compiles only somewhere that have changed since the most recent build. And it won't cover old caches. So the unchanged _ResourceCompileDependsOn would still link the previous value.

    So we suggest you could use Rebuild mode, it would first clear all generated file and caches, then build all modules. 

    Hope it could help you.

    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

    Friday, November 15, 2019 8:59 AM
  • ... *um* ... what I'm talking about is the execution of targets by MsBuild. Every building rebuildng cleaning or whatever process in Visual Studio is such an execution of targets by MsBuild. And inside this MsBuild execution (which is never ever an incremental 'thing'... alltough it might build a project in an incremental way, but this doesn't make the process itself an incremental 'something'), the variable doesn't have the value I expect it to have when it reaches a certain point in this execution. I'm wondering why this is. But I can (and most likely will have to) find it out myself, because everything I need to find out is installed together with Visual Studio.

    Rudolf

    Friday, November 15, 2019 3:53 PM
  • Hi Rudolf,

    Thank you for reply.

    I found a MS blog about msbuild target introduction , maybe it could explain it:

    --A future version will likely have an extensibility model for up-to-date checking, and that will likely plug in at the target level. Once a target has run once in the context of a project, global properties, toolsversion, and build, it will be immediately skipped next time it is invoked, without even checking timestamps. When you write a target, always check that it skips properly in the incremental build case.--

    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

    Tuesday, November 19, 2019 6:31 AM