locked
IBuildUpToDateCheckProvider or similar functionality for VC++ projects RRS feed

  • Question

  • My extension is integrating an ARM toolchain using a VC++ makefile project.  I can get it to build just fine, but when I hit F5 to debug, it says my project is out of date and needs to be built.  I can dismiss that dialog but it's very annoying.  I know VC++ and msbuild have some notion of if a project is up to date or not, but in my case, make needs to decide this.  I tried implementing the CPS IBuildUpToDateCheckProvider, which looks to be what I need to override this check, but it never gets called.  Apparently it only works for VB and C# projects, not VC++.  Search for "wapawapa" on https://gitter.im/Microsoft/VSProjectSystem for conversation for CPS folks about it.  Apparently VC++ projects don't use all of the project system that VB/C# projects use.

    Is there some way I can tell VC++ that the project is never up-to-date so it just builds when I hit F5?  In this case make would quickly determine that it's up-to-date.

    Thanks,

    Warren


    Monday, January 23, 2017 5:54 PM

Answers

  • FYI - you need to add the NoVCDefaultBuildUpToDateCheckProvider capability to your project.  Adding that allows my IBuildUpToDateCheckProvider to be invoked.

    Thanks,

    Warren

    Friday, February 24, 2017 10:39 PM

All replies

  • Hi boonedogsoftware,

    >>Is there some way I can tell VC++ that the project is never up-to-date so it just builds when I hit F5?  In this case make would quickly determine that it's up-to-date.

    I would suggest that you could write custom task, which write a line of word to a special file after you build the project.

    For more information about Add a Custom Build Step to MSBuild Projects, please refer to:

    https://msdn.microsoft.com/en-us/library/dd293663.aspx

    Best regards,

    Cole Wu


    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, January 24, 2017 7:28 AM
  • Hi Cole,

    I think you may have misunderstood my question.  I'm not sure how writing some value to some file would help, unless the VC++ project model is reading the value from that file.  It's the project model that I need to tap into somehow.  I basically need to set this value to false:

    VCConfiguration.UpToDate (see https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.vcprojectengine.vcconfiguration.uptodate.aspx)

    Somewhere inside of the VC++ project engine there's some logic which updates this flag.  I need to tap into that logic somehow to override its default behavior.  It seemed that IBuildUpToDateCheckProvider would do that, and it does for VB/C#, but it's not called for VC++ projects.

    Is there some way to get that to work with VC++ projects, or some other way to tap into the VC++ project engine to override this check?

    Thanks,

    Warren

    Thursday, January 26, 2017 5:40 PM
  • Hi boonedogsoftware,

    >>I basically need to set this value to false:

    Based on your document, it only has a get property, we could not set the

    >>Is there some way to get that to work with VC++ projects, or some other way to tap into the VC++ project engine to override this check?

    From the document, it say that Gets a value indicating whether the current configuration's build state is up to date. I think it could be called for C++ language. I can see that it has c++ syntax in the document.

    In addition, if want to get related sample. I would suggest that you could post a code request on the following link.

     http://code.msdn.microsoft.com/windowsapps/site/requests

    Best regards,

    Cole Wu


    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.

    Wednesday, February 8, 2017 5:26 AM
  • FYI - you need to add the NoVCDefaultBuildUpToDateCheckProvider capability to your project.  Adding that allows my IBuildUpToDateCheckProvider to be invoked.

    Thanks,

    Warren

    Friday, February 24, 2017 10:39 PM