简体   繁体   中英

Adding files to Visual Studio installer project in a relative manner

I'm trying to build a new installer project using Visual Studio 2010. The problem is that the installation files should be taken relatively to project's location, so I guess I need to specify a relative path, eg: "..\\..\\..\\some_folder\\veryImportant.dll"

The problem is that the installer project is providing me only with a .vdproj file which doesn't contain location/paths to any of the manually added files (when I do right click on the project and add new files).

Just to make sure my question is clear enough:

Let say my project sits under D:\\develop\\backend\\MainProject\\Project\\Installer , I would like to import some DLLs from D:\\develop\\backend\\MainProject\\SDKDLLs adding them manually by specifying their absolute location isn't good for me

(d:\\develop\\backend\\MainProject\\SDKDLLs\\core.dll)

Thanks for your help.

Edit: After reviewing the project file a bit deeper, I realized the paths are already relative:

       "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1E8A546C985F494593B28567414EE00D"
        {
        "SourcePath" = "8:..\\..\\a\\b\\c\\d\\e\\f.dll"
        "TargetName" = "8:f.dll"
        "Tag" = "8:"
        "Folder" = "8:_34476923AC9546E4B47A8B966C915E0B"
        "Condition" = "8:"
        "Transitive" = "11:FALSE"
        "Vital" = "11:TRUE"
        "ReadOnly" = "11:FALSE"
        "Hidden" = "11:FALSE"
        "System" = "11:FALSE"
        "Permanent" = "11:FALSE"
        "SharedLegacy" = "11:FALSE"
        "PackageAs" = "3:1"
        "Register" = "3:1"
        "Exclude" = "11:FALSE"
        "IsDependency" = "11:FALSE"
        "IsolateTo" = "8:"
        }

It seems like the wizard already does it automatically. Is there a way to specify the relative-location manually and not by editing the .vdproj file?

The project is already initialized with relative paths. so infact, no changes should be done by me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM