2015-05-05 51 views
0

我嘗試發佈我的ASP.Net MVC項目,我不斷收到此錯誤部署排除的文件或文件夾

錯誤30複製文件BIN \ Castle.Core.xml到 OBJ \調試\包\ PackageTmp \ bin \ Castle.Core.xml失敗。 找不到文件'bin \ Castle.Core.xml'。 0 0 XXX.YYYY.UI

我知道這是因爲在bin文件夾中缺少Castle.Core.xml,所以我怎麼能配置爲不讓編譯器複製這個文件?

每次我重建項目時,Castle.core.xml文件都會被刪除,所以我很累,一次又一次地複製到bin中。

事情,我試圖 我試圖this方式從微軟,但仍然沒有什麼不同。這就是wpp.target文件

<Project ToolsVersion="4.0" 
     xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    <ItemGroup> 
    <ExcludeFromPackageFolders Include="bin\*.xml"> 
     <FromTarget>ContactManager.Mvc.wpp.targets</FromTarget> 
    </ExcludeFromPackageFolders> 
    </ItemGroup> 
</Project> 

,也是我試圖編輯我的.csproj文件中加入這些線,我從這個link

<ItemGroup> 
    <!-- This will exclude the .xml files from the bin folder -->  
    <ExcludeFromPackageFiles Include="$(OutputPath)*.xml" /> 

    <!-- This will exclude the tmp folder from the bin folder -->  
    <ExcludeFromPackageFolders Include="$(OutputPath)tmp" /> 
</ItemGroup> 

讀排除誰能給勸這個?提前致謝。

回答

0

屬性窗口中的「複製本地」選項是否可用於此文件?如果是這樣,請將複製本地屬性更改爲True。