質問

MSBuildのは(asp.netのウェブサイトで)私の解決策を構築していて、webdeploymentプロジェクトが構築され、ディレクトリ_PublishedWebsitesにウェブサイトを入れた後:

C:\ mybuilds \ buildName \ Daily_20090519.3 \ Release_PublishedWebsites \名前がMyWebSite

はどのようにテストのウェブサイトのためにポイントをIIS固定ディレクトリにこれをコピーしていますか?

私は、コードスニペットの負荷を発見したが、私は、アカウントにこのディレクトリ名の変更その事実を取るものを見つけるように見えることはできません。

役に立ちましたか?

解決

これは非常に簡単です。あなたは、プロジェクトを編集して、次のようなものを挿入することもできます。

<PropertyGroup>
  <OutputDest>$(MSBuildProjectDirectory)\..\OutputCopy\</OutputDest>
</PropertyGroup>
<Target Name="AfterBuild">
  <!-- Create an item with all the output files -->
  <ItemGroup>
    <_OutputFiles Include="$(OutputPath)**\*" Exclude="$(OutputPath)obj\**\*" />
  </ItemGroup>
  <!-- You probably don't want to include the files in the obj folder so exclude them. -->

  <Message Text="OutputDest : $(OutputDest)" />
  <Copy SourceFiles="@(_OutputFiles)"
        DestinationFiles="@(_OutputFiles->'$(OutputDest)%(RecursiveDir)%(Filename)%(Extension)')"/>
</Target>

あなたが探しているものをこのですか?

マイブック:マイクロソフトのビルドエンジン内部:使用MSBuildのとTeam Foundationビルド

他のヒント

私は別の技術を使用しています。

<PropertyGroup>
    <BinariesRoot>c:\BinariesForIis\</BinariesRoot>
</PropertyGroup>
(コピーはc:\BinariesForIis\する前に...)

...\Daily_20090519.3\Release_が直接出力コンパイルされたバイナリに使用されます。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top