时间:2011-01-06 19:44:09

标签: msbuild build copy

1 个答案:

答案 0 :(得分:5)

您需要为此创建一个新的ItemGroup。我在下面添加了AppFolderWithExclusions

<ItemGroup>
     <Compile Include="$(_SolutionPath)$(_SolutionName)" />
     <ProjectFiles Include="..\$(_WebDirectory)\*.csproj" Exclude="*.master.csproj"/>
     <ExcludeFromBuild Include="..\$(_WebDirectory)\**\*.cs; ..\$(_WebDirectory)\**\*.sln; ..\$(_WebDirectory)\**\*.csproj; ..\$(_WebDirectory)\Web References; ..\$(_WebDirectory)\obj;"/>
     <AppFolder Include="..\$(_WebDirectory)\**\*.*" Exclude="$(ExcludeFromBuild)"/>

     <AppFolderWithExclusions Include="@(AppFolder)" Exclude="obj\**\*.*;Web References\**\*.*" />
 </ItemGroup>

(未经测试;可能包含语法拼写错误)