Tuesday, March 29, 2016

Update Reference Path in all project in solution

Run the command in Package Management Console
Run following command to set a hard coded path.

foreach ($proj in get-project -all) {$proj.Properties.Item("ReferencePath").Value="E:\Devlopment\PaperSave5.3\Development\3rdPartyLibs\"}


We can go use relative path as below.

$path = [System.IO.Path];
$proj.Properties.Item("ReferencePath").Value="$($path::GetDirectoryName($proj.filename))\..\libs"


No comments:

Post a Comment