locked
Error when trying to add a reference to a custom static library. "A reference to 'ndtech' cannot be added because it is incompatible with this project." RRS feed

  • Question

  • I have a two projects in a solution.  ndtechSample is an executable.  ndtech is a static library.

    When I try to add a reference from ndtechSample to ndtech, I get the error...

    "One or more errors occurred.

    A reference to 'ndtech' cannot be added because it is incompatible with this project."

    This is not a general problem with all projects I have created, but really just with ndtech.  I have been changing the xml of the project file by hand to support integration with another tool.  I know that is bad but I don't have a lot of options.  None that I really like at the moment.

    What I really need is a way to debug exactly what is incompatible.  Both projects (the executable and the library) are designed to be cross platform.  Built with the typical windows tool chain for UWP and built with a Makefile for Linux.   I use preprocessor variables and #if statements to compile only the code required based on which Platform is selected.

    There is another bit of odd behavior.  When the solution loads, the ouput window shows the following warnings if "Show output from:" is set to Solution.

    C:\Projects\Git\22ndtech\c++\ndtechSample\ndtechSample.vcxproj : warning  : Platform '[ML, 0]' referenced in the project file 'ndtechSample' cannot be found.

    C:\Projects\Git\22ndtech\c++\ndtech\ndtech.vcxproj : warning  : Platform '[ML, 0]' referenced in the project file 'ndtech' cannot be found.

    I'm mentioning this because I thought it might be related.

    I've launched Visual Studio with TRACEDESIGNTIME=true and there are no errors or warnings in the in the designtime.log files created.  I've also launched with /Log and I couldn't find anything related in the ActivityLog.xml file either.

    If anyone has suggestions on how to debug this type of a problem, I would greatly appreciate it.


    jhegedus

    Tuesday, February 5, 2019 4:48 AM

Answers

All replies

  • Hello,

    Thanks for posting here.

    >>What I really need is a way to debug exactly what is incompatible.  Both projects (the executable and the library) are designed to be cross platform.  Built with the typical windows tool chain for UWP and built with a Makefile for Linux. I use preprocessor variables and #if statements to compile only the code required based on which Platform is selected.

    This forum is about c++ development. I think your case which is more related to UWP or MS Build, so I will move this thread to Where is the Forum for...? forum to redirect it. Then you could post your issue on there for better support.

    Best Wishes,

    Jack


    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.

    Thursday, February 7, 2019 5:40 AM

  • What I really need is a way to debug exactly what is incompatible.  

    Might also try asking here.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsdebug

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Thursday, February 7, 2019 1:34 PM
  • The issue is with the .vcxproj and how the IDE interprets it.  It definitely wouldn't belong on the UWP forum because it isn't really a UWP question.  One of the build targets is UWP but the other is Linux.  It isn't really about MSBuild either because the issue isn't with how it builds but rather with how the Visual Studio IDE interprets the .vcxproj.  I can't get to the point of building it because the IDE itself is choking on the XML in the .vcxproj file.


    jhegedus

    Saturday, February 9, 2019 1:40 AM
  • I think this is also incorrect as the issue is not in debugging the code, it is in debugging the Visual Studio IDE.

    jhegedus

    Saturday, February 9, 2019 1:40 AM
  • Might also try here.

    https://github.com/microsoft/vslinux/issues

    or issues with the IDE itself over here.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=visualstudiogeneral

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Saturday, February 9, 2019 1:48 AM
  • Hi Jack,

    Thanks for the response. You can see my response to both of the folks who gave suggestions below.  I took another look through the list of forums and I will try posting it to the Visual Studio General Questions forum.

    I really do think the best forum for it would be the Visual C++ forum.  The issue is with the Visual C++ IDE and how it is parsing and loading the .vcxproj file.  Keep in mind that I edited this file by hand, which is not supported or recommended but is sometimes necessary.  I think the folks who will know the most about this are C++ developers and the folks building the IDE for C++ developers.

    It may not matter, but I wanted to let you know that I am an Engineering Fellow in software at Raytheon and have been using Visual C++ for C++ development for 20+ years - since Visual C++ 6.0.  This is kind of a Visual C++ power user question.  If there is any way you could move it back to the Visual C++ forum I would really appreciate it.

    Thanks,

    Jeff


    jhegedus

    Saturday, February 9, 2019 1:52 AM
  • I'd re-ask it over there then maybe with some modification as they'll likely just toss this one again.

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Saturday, February 9, 2019 1:56 AM
  • Hi Jeff,

    >>Thanks for the response. You can see my response to both of the folks who gave suggestions below.  I took another look through the list of forums and I will try posting it to the Visual Studio General Questions forum.
    I really do think the best forum for it would be the Visual C++ forum.  The issue is with the Visual C++ IDE and how it is parsing and loading the .vcxproj file.  Keep in mind that I edited this file by hand, which is not supported or recommended but is sometimes necessary.  I think the folks who will know the most about this are C++ developers and the folks building the IDE for C++ developers.
    It may not matter, but I wanted to let you know that I am an Engineering Fellow in software at Raytheon and have been using Visual C++ for C++ development for 20+ years - since Visual C++ 6.0.  This is kind of a Visual C++ power user question.  If there is any way you could move it back to the Visual C++ forum I would really appreciate it.

    Sorry for my ignorance. From your description, I just maybe it's more related to the UWP or MS Build, that's why I move it to the Where is the Forum for...? forum to redirect it. I don't have the permission to move it back, if possible, you could post a new one on the VC++ forum again.

    Thanks for your understanding and Cooperation.

    Best Regards,

    Jack


    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.

    Monday, February 18, 2019 3:09 AM