2013-03-22 27 views
9
<MSBuild Projects="$(ProjectFile)" Targets="_WPPCopyWebApplication;" 
Properties="OutDir=..\publish;Configuration=Release;Platform=AnyCPU" /> 

Asp.Net projesini yayımlamak için yukarıdaki komut dosyasını kullanıyorum. Proje ayarlarında, kesinlikle hata ayıklama sembollerinin serbest bırakma modunda üretildiğinden emin oldum. Hala MsBuild, çıktıdaki pdb dosyalarını oluşturmuyor.MsBuild, sürümde PDB dosyaları oluşturmuyor

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 
    <DebugType>Full</DebugType> 
    <DefineDebug>false</DefineDebug> 
    <DefineTrace>true</DefineTrace> 
    <Optimize>true</Optimize> 
    <OutputPath>bin\</OutputPath> 
    <DocumentationFile>WebProject.xml</DocumentationFile> 
    <DebugSymbols>true</DebugSymbols> 
    </PropertyGroup> 
+0

Hata ayıklama sembollerinin nasıl oluşturulduğundan nasıl emin oldunuz? Bunun için hangi ayarları yaptınız? – TimVK

+0

@Syam Merhaba, aynı sorunu yaşıyorum. 2 şey: Ben sadece vs2012'ye geçtiğim için bunu yaşıyorum, bu sizin için de geçerli mi? Dahası, .pdbs * 'in * oluşturulduğunu fark ettim * ancak daha sonra yapının sonuna doğru silindiler. Bu senin için de mi? – bottlenecked

+0

@TimVK – Syam

cevap

16

Microsoft.Web.Publishing.targets kaynağına bakarak sonra, bir değişken (ExcludeGeneratedDebugSymbol) yayın modunda True olarak ayarlanmış olan bulduk. Yorumlardan, WebSite projesindeki sembolleri hariç tutmak istedikleri anlaşılıyor, ancak durum WebUygulama projesi için uygun şekilde ayarlanmamış.

Bu yüzden, arama komutumu arayan argümanlarından geçersiz kılmaya karar verdim ve bir çekicilik gibi çalıştı. Gelecekteki istikrar için belgesiz malın neden olabileceği veya kullanabileceği herhangi bir tarafı henüz kesin olarak tespit etmedim, ancak şimdilik işe yarıyor. Microsoft.Web.Publishing.target itibaren

şöyle benim senaryoyu güncelledik

<!--For website we will always exclude debug symbols from publishing unless it is set explicitly by user in website publish profile--> 
    <ExcludeGeneratedDebugSymbol Condition="'$(ExcludeGeneratedDebugSymbol)'=='' And '$(_WebProjectType)' == 'WebSite'">True</ExcludeGeneratedDebugSymbol> 

    <ExcludeGeneratedDebugSymbol Condition="'$(ExcludeGeneratedDebugSymbol)'=='' And '$(Configuration)' == 'Release'">True</ExcludeGeneratedDebugSymbol> 
    <ExcludeGeneratedDebugSymbol Condition="'$(ExcludeGeneratedDebugSymbol)'==''">False</ExcludeGeneratedDebugSymbol> 

dosya.

<MSBuild Projects="$(ProjectFile)" Targets="_WPPCopyWebApplication;" 
Properties="OutDir=..\publish;Configuration=Release;Platform=AnyCPU"; ExcludeGeneratedDebugSymbol=false /> 
3

Ayrıca bu özellik değerini içerecek şekilde yayımlamak profili (.pubxml) dosyası güncellendi olabilir. Bunu, web yayıncılığının .pdb dosyalarını içermesi için TFS Build 2015'teki yeni oluşturma bitleriyle bugün yapmak zorundaydım. Eklenen özellikli dosyanın örnek içeriğine bakın.

<?xml version="1.0" encoding="utf-8"?> 
<!-- 
This file is used by the publish/package process of your Web project. You can customize the behavior of this process 
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. 
--> 
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    <PropertyGroup> 
    <WebPublishMethod>FileSystem</WebPublishMethod> 
    <SiteUrlToLaunchAfterPublish /> 
    <publishUrl>C:\Publish</publishUrl> 
    <DeleteExistingFiles>True</DeleteExistingFiles> 
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> 
    <LastUsedPlatform>Any CPU</LastUsedPlatform> 
    <ExcludeApp_Data>False</ExcludeApp_Data> 
    <LaunchSiteAfterPublish>False</LaunchSiteAfterPublish> 
    <ExcludeGeneratedDebugSymbol>false</ExcludeGeneratedDebugSymbol> 
    </PropertyGroup> 
</Project>