c# - VS2013 publish Web deployment task failed The file is in use -
i using vs2013 premium publish site windows server 2012. files publish ok except these: sqlservertypes\x64\msvcr100.dll
sqlservertypes\x64\sqlserverspatial110.dll
sqlservertypes\x86\msvcr100.dll
sqlservertypes\x86\sqlserverspatial110.dll
i kind of errors each of above files tried publish: web deployment task failed. (the file 'msvcr100.dll' in use. learn more at: http://go.microsoft.com/fwlink/?linkid=221672#error_file_in_use.)
interrestingly, these files published first time (when not on server), no longer overwritten. tried 2 different web servers. have followed guide here: http://blogs.msdn.com/b/webdev/archive/2013/10/30/web-publishing-updates-for-app-offline-and-usechecksum.aspx
...but managed put site offline (vs placing app_offline.htm) publish still fails same error. other files publish perfectly.
any ideas?
you can take app offline during publishing should free lock on file , allow update it.
i blogged this while back. support outlined shipped inside of azure sdk , visual studio update. don't remember exact releases can find out if needed. update dating around/after blog post should fine.
prerequisites:
- vs 2012 + vs update / vs 2013 + vs update / vs2015
- msdeploy v3
note: if publishing ci server ci server need updates above well
edit publish profile
in vs when create web publish profile settings dialog stored in properties\publishprofiles\
files end .pubxml. note: there .pubxml.user
file, file should not modified
to take app offline in .pubxml
file add following property.
<enablemsdeployappoffline>true</enablemsdeployappoffline>
notes
asp.net required
the way has been implemented on msdeploy side app_offline.htm file dropped in root of website/app. there asp.net runtime detect , take app offline. because of if website/app doesn't have asp.net enabled function not work.
cases may not work
the implementation of makes such app may not strictly offline before publish starts. first app_offline.htm file dropped, msdeploy start publishing files. doesn't wait asp.net detect file , take offline. because of may run cases still run file lock. default vs enables retrys app go offline during 1 of retrys , good. in cases may take longer asp.net respond. bit more tricky.
in case add <enablemsdeployappoffline>true</enablemsdeployappoffline>
, app not getting taken offline enough suggest take app offline before publish begins. there several ways remotely, depends on setup. if have msdeploy access can try following sequence:
- use
msdeploy.exe
take site offline dropping app_offline.htm - use
msdeploy.exe
publish app (_make sure sync doesn't delete app_offline.htm file_) - wait amount of time
- publish site
- use
msdeploy.exe
bring app online deleting app_offline.htm
i have blogged how can @ http://sedodream.com/2012/01/08/howtotakeyourwebappofflineduringpublishing.aspx. thing missing blog post delay wait site taken offline. can create script calls msdeploy.exe
directly instead of integrating project build/publish process.
Comments
Post a Comment