Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Coping dll to a different solution

$
0
0

I have a folder A with projectA.

I have a folder b with projectB.

I need to copy dll form projectA in folder a to project B in folder B on post build.

I must not hard code the paths because the folder location may change but the project bin folder will not.

I tried do this in dos 

PostBuild in Visual Studio Call "$(ProjectDir)CopyProjectADll.bat"

echo off

pause
set Fuel_Path=..\..\..\projectA\projectA.Tests\projectA.Tests.Functional.Tests\bin\Debug\
set Tar_Path=..\..\..\projectB\Assemblies\
set ABS_PATH=


rem // Save current directory and change to target directory
pushd %Fuel_Path%

rem // Save value of CD variable (current directory)

set ABS_PATH=

rem // Restore original directory
popd 

echo Relative path: %Fuel_Path%
echo Maps to path: %ABS_PATH%
echo Tar to Path: %Tar_Path%
pause

copy %Fuel_Path%\SprojectA.Tests.Functional.Tests.dll.config %Tar_Path%
copy %Fuel_Path%\projectA.Tests.Functional.Tests.Tests.dll %Tar_Path%
pause

getting error "path not specified"

Tried the following 

copy /Y "$(TargetDir)$(ProjectName).dll" "$(SolutionDir)lib\$(ProjectName).dll"
copy /Y "$(TargetDir)$(ProjectName).dll" "$(SolutionDir)lib\$(ProjectName).dll.config"

1. Is this possible to copy files from one directory in location to another directory  in totally different location on the drive.


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>