Net CLI (dotnet) Publish Error

Hi To All,

 

I am having a problem about Net CLI (publish) command. I created a build configuration that has Net CLI (restore - build - publish) steps. There is no problem about restore and build but when it comes to publish it faces with share violation error. 

Because it is trying to publish to an exiting iis website and causing the problem. What is the best way to fix this problem. I also have other build configurations which is publishing via MSBUILD runner without any problem.

I created sum extra steps like stopping the website with powershell and wait 5 seconds after that run the publish step but it is not working always facing sometimes problems. But thats not the way I want to use. I neeed very very urgent help and would be very appricated

0
1 comment

Hi,

shared violations occur when the file you are trying to write is being used. You would need first to identify where it's exactly happening, and once you identify where, identify why. For example, stopping a site might be enough, but sometimes the site might be doing some cleanup work and not free the resources properly until much later.

Please try and check whether you can actually run the same steps without TeamCity following the steps here: https://confluence.jetbrains.com/display/TCD18/Common+Problems#CommonProblems-BuildworkslocallybutfailsormisbehavesinTeamCity

0

Please sign in to leave a comment.