Ignore files in a Windows Azure virtual application

I want to have a virtual application inside the site. I changed my ServiceDefinition.csdeflike

<Site name="Web">
        <VirtualApplication name="MyVirtualApp" physicalDirectory="[path to my other web app]" />
        <Bindings>
          <Binding name="HttpIn" endpointName="HttpIn" />          
        </Bindings>
      </Site>

When I create the package, I see that it includes the .csfiles folder obj. It's useless. I do not want these files to be included in my batch file (.cspkg).

What should I do so that when publishing, such files should not be included in the package file?

+4
source share
4 answers

As a workaround, I created a Web Deployment Project . To exclude output files you need to put

<ExcludeFromPackageFiles Include="[your file]">
    <FromTarget>Project</FromTarget>
</ExcludeFromPackageFiles>

And in ServiceDefinition.csdefI pointed out the output path for the web deployment project

<VirtualApplication name="MyVirtualApp" physicalDirectory="[output path of my web deployment project]" />
+1
source

, , . , . , , post build. :)

+1

-, . , -, IIS . "" .

.csdef , , -.

+1
  • WebDeploy
  • , <OutputPath> .csproj, <ExcludeFoldersFromDeployment>bin\file1.dll;file3.csv</ExcludeFoldersFromDeployment>.
  • , .pubxml( \PublishProfiles -), <publishUrl>bin\WebDeployDropLocation</publishUrl>
  • ServiceDefinitioin.csdef : <Site name="Web" physicalDirectory="..\..\..\MyWebApp\bin\WebDeployDropLocation"> <Sites>. .
  • WebProject , WebRole.
  • .cspkg, .zip , .
0

All Articles