-1

My problem is rather simple, we have a solution mixing C++ and C#, our C++ project are referring to their dependencies (external libraries) with property sheet attached with the Property Manager window.

As the C# project are not shown in the property manager, i still tried to add the .props to the project but can't find a way to make it work, the defined Dll in the .props are still unknown to the project.

Our props are rather simple.

<ItemDefinitionGroup>
<Link>
  <AdditionalLibraryDirectories>$(External_Repository)\Win64\Static</AdditionalLibraryDirectories>
  <AdditionalDependencies>LibA.dll;LibB.dll;%(AdditionalDependencies)</AdditionalDependencies>
</Link>

The dll are quit heavy, we must save on distant repository and reference them And our architecture help us switch version easily.

Folder :
      - Version1.1
          -LibA.dll
          - ...
      - Version2.0
          - LibA.dll
          - ...

As such if there is a way to make it work without modifying the .VCSPROJ and solely using .props, it'll be wonderful. How can i make it work? thanks you in advance.

Hasta Tamang
  • 2,205
  • 1
  • 18
  • 17
Samael
  • 61
  • 1
  • 9

1 Answers1

0

Thanks to C# reference in .props file I found my answer !

 <ItemGroup>
<Reference Include="LibA">
  <HintPath>$(External_Repository)\LibA.dll</HintPath>
</Reference>

Don't forget to make sure your props is well included.

E_net4
  • 27,810
  • 13
  • 101
  • 139
Samael
  • 61
  • 1
  • 9