locked
BizTalk - Deployment dependency issue not able to build RRS feed

  • Question

  • I am facing a issue, I have Proj A and Proj B,  Proj B schemas are being referenced from proj A. When I am building and deploying Proj A, it is throwing me error :  ? 

    Error 18 Could not copy "obj\Debug\company.dll" to "bin\Debug\company.dll". Exceeded retry count of 10. Failed. corp

    Error 19 Unable to copy file "obj\Debug\corp.dll" to "bin\Debug\corp.dll". The process cannot access the file 'bin\Debug\corp.dll' because it is being used by another process. corp

    How can I fix this ? I am unable to build


    MBH

    Sunday, July 5, 2015 4:30 AM

Answers

  • 9/10 times, this is Visual Studio holding handle unexpectedly.  Within BizTalk Dev, this is frequently the Pipeline Designer.

    The solution, restart things until you find the one that has the file open.  For clarity, "open" does not mean in a windows or anything just that that process has a lock on the file.

    • Marked as answer by Angie Xu Friday, July 10, 2015 3:24 AM
    Sunday, July 5, 2015 11:04 AM
    Moderator

All replies

  • 9/10 times, this is Visual Studio holding handle unexpectedly.  Within BizTalk Dev, this is frequently the Pipeline Designer.

    The solution, restart things until you find the one that has the file open.  For clarity, "open" does not mean in a windows or anything just that that process has a lock on the file.

    • Marked as answer by Angie Xu Friday, July 10, 2015 3:24 AM
    Sunday, July 5, 2015 11:04 AM
    Moderator
  • Hi ,

    you can try below pre build options

    Go to Solutions Explorer, select the project and right click on it. Go to properties option. Here you will find the Build Events.On the Build Event there will be a space for Pre-build event command line. Go to that one and paste the following code.

         if exist "$(TargetPath).locked" del "$(TargetPath).locked"if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"

    Or

    (if exist "$(TargetDir)*old.pdb" del "$(TargetDir)*old.pdb") & (if exist "$(TargetDir)*.pdb" ren "$(TargetDir)*.pdb" *.old.pdb)

    You can also try closing your solution and Remove the bin and obj folders and try opening solution again for build event .

    Thanks

    Abhishek

    Monday, July 6, 2015 4:12 AM
  • restarting the visual studio has solved this problem to me many times.


    Shreedivya

    Monday, July 6, 2015 4:17 PM