<MSBuild Projects="$(ProjectFile)" Targets="_WPPCopyWebApplication;"
Properties="OutDir=..\publish;Configuration=Release;Platform=AnyCPU" />
Run Code Online (Sandbox Code Playgroud)
我使用上面的脚本来发布Asp.Net项目.在项目设置中,我绝对确保在发布模式下生成调试符号.仍然MsBuild没有在输出中生成pdb文件.
<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>
Run Code Online (Sandbox Code Playgroud) msbuild ×1