Framework and references vs project dependencies
2012-04-09 15:24
288 查看
Function "framework and references" can reference assembly generated by another project in same or separate solution, or contained in another team project and third-part assembly.
Function "project dependencies" . makes it possible for you to determine which projects in the selected solution must be built first. Setting project dependencies stipulates the desired build order for projects.
Project dependency isn't a property of the linker, but rather the build chain as a whole. Say project A is a stand alone binary that compresses a file.
Project B executes this binary. Project B wants to make sure it has the most up to date binary of Project A available, so the developer says B is dependent on A. Say the developer is working on Project B fixing a bug in some file, and this file happens to
be shared with Project A. Now when the developer builds their Project B, they will also rebuild Project A, getting the updated (corrected) version of Project A. In this manner, a dependency exists, but it is not a linker based dependency.
As described here (see
"Solution Dependencies into Project to project reference section") ,
the intent was to take linker level dependency out of the solution and push it into the project.
So If project A need use project B, in project A, we need (1) #pragma comment(lib,"B.lib") or in project properties--->linker--->input--->additional dependencies--->add
"B.lib" (2) properties--->Framework and references--->Add new reference---->select project B, then in project dependencies, B is checked for A, and the build order is also sorted automatically (B build before A). (3) If A need include some new header files,
you need add new include directory in A properties--->C/C++--->Additional include directories if necessary.
Function "project dependencies" . makes it possible for you to determine which projects in the selected solution must be built first. Setting project dependencies stipulates the desired build order for projects.
Project dependency isn't a property of the linker, but rather the build chain as a whole. Say project A is a stand alone binary that compresses a file.
Project B executes this binary. Project B wants to make sure it has the most up to date binary of Project A available, so the developer says B is dependent on A. Say the developer is working on Project B fixing a bug in some file, and this file happens to
be shared with Project A. Now when the developer builds their Project B, they will also rebuild Project A, getting the updated (corrected) version of Project A. In this manner, a dependency exists, but it is not a linker based dependency.
As described here (see
"Solution Dependencies into Project to project reference section") ,
the intent was to take linker level dependency out of the solution and push it into the project.
So If project A need use project B, in project A, we need (1) #pragma comment(lib,"B.lib") or in project properties--->linker--->input--->additional dependencies--->add
"B.lib" (2) properties--->Framework and references--->Add new reference---->select project B, then in project dependencies, B is checked for A, and the build order is also sorted automatically (B build before A). (3) If A need include some new header files,
you need add new include directory in A properties--->C/C++--->Additional include directories if necessary.
相关文章推荐
- Framework and references vs project dependencies
- 萬惡的cmake - vs project unicode and multi-bytes
- Re-download dependencies and sync project (requires network)&SSL peer shut down incorrectly
- projecteuler vs ACM and the path
- Git Reference---Getting and Creating Projects
- Vs打包工程 错误: Unable to update the dependencies of the project (转)
- Error:Failed to open zip file.<a href="syncProject">Re-download dependencies and sync project (requi
- Your project is not referencing the ".NETPortable,Version=v4.5,Profile=Profile259" framework. Add a reference to ".NETPortable,Version=v4.5,Profile=Profile259" in the "frameworks" section of your proj
- 【Studio】Android Studio导入项目时的遇到问题(Re-download dependencies and sync project (requires network))
- Android Studio更新之后Re-download dependencies and sync project (requires network)问题
- SoftReference vs WeakReference and Cache Implement
- Android Studio报错-->Re-download dependencies and sync project (requires network)
- 我最近的研究成果(IGeometry.Project and IGeometry.SpatialReference)
- Solaris vs. Linux: Ecosystem-based Approach and Framework for the Comparison in Large Enterprise
- Android studio导入项目时的问题(Re-download dependencies and sync project (requires network))
- VS2015 - WP8.1 app project with Microsoft VCLibs reference problem
- .NET Framework Standard Library Annotated Reference, Volume 1: Base Class Library and Extended Numer
- parameters vs. arguments and call by value vs. call by reference
- [Tip: project reference]Project Reference In VS
- Create an Entity Framework Model and Use it in Multiple Projects