Search code examples
visual-studio-2008vcproj

Project Reference format in a vcproj file(vs2008)


Here I am again asking for help. Can anyone please show me a sample of a vcproj file with a project reference(not assembly reference) or could at least show me the format how is it written in the file.

I have searched in the internet for samples but cant find one with project reference only assembly refs like these

<References>
    <AssemblyReference
        RelativePath="System.dll"
        AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
        MinFrameworkVersion="131072"
    />
    </References>

so can anyone please give me a sample, as i need to handle these references by reading them as an XML.

Thanks you very muchh

<ProjectReference
        ReferencedProjectIdentifier="{178A5D9D-1F3E-49B1-9190-916D0864BD5C}"
        RelativePathToProject=".\ReleaseNotes\ReleaseNotes.csproj"
    />

Solution

  • The references in the .vcproj concern only managed projects, so if you want to reference native projects there are other ways to do it:

    • reference project in libs added.
    • in the .sln file reference that P1 is dependant to P2.
    • in the source code use #pragma comment(lib,..)