batch file - How to get Visual Studio to recognise a network drive mapping -


i have following post-build event defined in project:

if "$(configurationname)"=="release" ("$(projectdir)postbuildrelease.bat" "$(targetdir)") 

so when build project in release mode, following .bat file executed:

postbuildrelease.bat

cmd set parameter=%1 cd %1 echo "copying temporary file..." copy filedeleter.exe temp.exe echo "merging dependancies..." "..\..\ilmerge.exe" /out:"filedeleter.exe" /targetplatform:"v4" "temp.exe" "microsoft.windowsapicodepack.dll" "microsoft.windowsapicodepack.extendedlinguisticservices.dll" "microsoft.windowsapicodepack.sensors.dll" "microsoft.windowsapicodepack.shell.dll" "microsoft.windowsapicodepack.shellextensions.dll" echo "removing temporary file..." del temp.exe 

all copy assembly temporary location, merge required dependancies final executable filedeleter.exe, , removes temporary file.

this worked fine when project saved local drive, after moving project network drive, these errors when building in release mode:

'\\file\it\internal apps\appdev\applications\wpffiledeleter\wpffiledeleter\bin\release\' cmd not support unc paths current directories. c:\windows>"copying temporary file..." system cannot find file specified. "merging dependancies..." '"..\..\ilmerge.exe"' not recognized internal or external command, operable program or batch file. "removing temporary file..." not find c:\windows\temp.exe 

cmd complains not supporting unc paths.

however, know drive in question (\\file) mapped y:\ drive - can navigate directory in cmd targeting y: instead of \\file\.

the question - how can visual studio recognise drive mapping default, after projects have been moved network drive?

i've learned batch dosnt going on network dir unless add drive pushhd. has worked me charm when working on network.

pushd internal command. if command extensions disabled pushd command not accept network (unc) path."

source: http://ss64.com/nt/pushd.html


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -