1

I have solution with multiple projects.

Few common folders for Bin/Lib/Include e.g. all exported lib in Lib folder, executable in Bin folder and header in Include

Example

Solution - S Project A1 - DLL Project A2 - Exe ... Project An

Project A2 is dependent on Proj A1

I have build complete solution and deleted everything except SDK(Bin\lib\Include) folder. because its Big solution so we utilize this exported SDK and build any application

Now i have taken complete code (A1, A2, ... An) and opened only project A2,

But when i build it gives me following error cannot open input file 'C:\Code\Development\Src\A2\Debug7\A1.lib'

Why its not picking up the library from common lib folder.

it was working fine in VS 2008, but after upgrade to 2010 its never worked.

Ashish Kasma
  • 3,594
  • 7
  • 26
  • 29
  • What kind of dependency does A2 have on A1? It needs to be a @(ProjectReference), not an assembly @(Reference). – Brian Kretzler Mar 12 '12 at 15:27
  • whatever exist in VS 2008, after upgrade we faced this issue. so looks like i need to remove project to project dependency and add back dependency in solution. Also this is native application code. – Ashish Kasma Mar 13 '12 at 09:52

2 Answers2

1

My guess would be that you might still have the code version of A1 in the references folder of your A2 project. It's something to check, in any case.

Ben Barden
  • 2,001
  • 2
  • 20
  • 28
  • i have deleted everything, and taken latest code and SDK(Bin\Lib\Include), one more thing i would like to share if i deleted A1 project from drive. it built successfully. – Ashish Kasma Mar 12 '12 at 13:07
1

I can only guess that dependencies are saved in the solution file, so if you only open one project instead of the original solution then that information is lost.

'C:\Code\Development\Src\A2\Debug7\A2.lib'

Q: Why would project A2 be trying to open its own lib file? Surely the lib file is the output (static library, or import library for use by other modules).

You might find that setting the A2 project's Additional Library Directories (Linker section of the project's Properties) to point to the correct path would help - tell it where it can find the libraries it needs.

JTeagle
  • 2,196
  • 14
  • 15
  • A2.lib was typo error, corrected Now VS 2010 design project to project dependency is used. solution dependency are not used by MS build http://blogs.msdn.com/b/vcblog/archive/2010/02/16/project-settings-changes-with-vs2010.aspx – Ashish Kasma Mar 12 '12 at 13:13