1

I have added a section to my publish profile that copies the contents of an external folder to the bin folder. The contents of the folder are two dll's that are included so that we can use spatial functions. The issue I am having is that the DLL's are getting locked by IIS. The publish profile is executed by MS Build.

How can I either restart IIS as part of the publish? or Copy the files only if they exist?

Below is the current code in the pubxml file:

   <Target Name="CustomCollectFiles2">
    <ItemGroup>
      <_CustomFiles2 Include="..\Lib\SqlServerTypes\**\*" />
      <FilesForPackagingFromProject Include="%(_CustomFiles2.Identity)">
        <DestinationRelativePath>bin\SqlServerTypes\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
      </FilesForPackagingFromProject>
    </ItemGroup>
  </Target>

  <PropertyGroup>
    <CopyAllFilesToSingleFolderForPackageDependsOn>
      CustomCollectFiles2;
      ;
    </CopyAllFilesToSingleFolderForPackageDependsOn>
    <CopyAllFilesToSingleFolderForMsdeployDependsOn>
      CustomCollectFiles2;
      ;
    </CopyAllFilesToSingleFolderForMsdeployDependsOn>
    </PropertyGroup>
user2623955
  • 175
  • 6

0 Answers0