What are Visual Studio project references?

后端 未结 2 557
不知归路
不知归路 2021-01-01 19:01

I came across the Framework and References tab of my project and noticed that I can \"Add New Reference...\" to my project, what is this functionality?

2条回答
  •  北海茫月
    2021-01-01 19:04

    For C/C++ in Visual Studio 2010 Express, adding a project reference (see first image, text in German, but you get the idea) adds a node as follows to the .vcxproj file:

    
      
        {22c9de39-f327-408b-9918-187c0ee63a86}
      
    
    

    This will make the static library produced by the referenced project available to the referencing project and also add a non-removable project dependency (right-click the project and select project dependencies, see second image) to the referencing project.

    (The effect of such click actions on project configuration files become apparent when you put the project configuration files under version control and then look at the diff.)

    To create setup where one or more projects reference a static library project, see this MSDN guide: Walkthrough: Creating and Using a Static Library (C++)

    Project Reference enter image description here

提交回复
热议问题