Skip to content

Commit 64db4e7

Browse files
committed
Fix build settings for debugger to read pdb correctly.
This commit adjust build options to avoid Visual Studio error, specifically it fails to show stack trace with "jump to the source code" feature enabled. It should be caused by portable pdb for .NET Framework projects, so this commit fixes common prop file to generate legacy pdb for debug build. This commit also fix NUnit related PDB reader error with adding latest (beta) Mono.Cecil reference.
1 parent b9c4903 commit 64db4e7

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

MsgPack.Common.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,19 @@
4343
<DocumentationFile>$(OutputPath)\$(TargetFramework)\$(AssemblyName).XML</DocumentationFile>
4444
</PropertyGroup>
4545
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
46+
<DebugType>pdbonly</DebugType>
4647
<DefineConstants>$(DefineConstants);FEATURE_TAP;FEATURE_CONCURRENT</DefineConstants>
4748
</PropertyGroup>
4849
<PropertyGroup Condition="'$(TargetFramework)' == 'net35'">
50+
<DebugType>pdbonly</DebugType>
4951
<DefineConstants>$(DefineConstants);FEATURE_POINTER_CONVERSION</DefineConstants>
5052
</PropertyGroup>
5153
<PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
54+
<DebugType>pdbonly</DebugType>
5255
<DefineConstants>$(DefineConstants);FEATURE_TAP;FEATURE_CONCURRENT;FEATURE_POINTER_CONVERSION</DefineConstants>
5356
</PropertyGroup>
5457
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
58+
<DebugType>pdbonly</DebugType>
5559
<DefineConstants>$(DefineConstants);FEATURE_TAP;FEATURE_CONCURRENT;FEATURE_POINTER_CONVERSION;FEATURE_MEMCOPY</DefineConstants>
5660
</PropertyGroup>
5761
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.1'">
@@ -79,4 +83,7 @@
7983
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
8084
<DefineConstants>$(DefineConstants);NETFX_CORE;WINDOWS_UWP;NETSTANDARD1_3;AOT</DefineConstants>
8185
</PropertyGroup>
86+
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
87+
<DebugType>full</DebugType>
88+
</PropertyGroup>
8289
</Project>

test/MsgPack.UnitTest.BclExtensions/MsgPack.UnitTest.BclExtensions.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<PackageReference Include="FSharp.Core" Version="4.2.2 " />
2626
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.3.1" />
2727
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
28+
<!-- To avoid PDB Reader error -->
29+
<PackageReference Include="Mono.Cecil" Version="0.10.0-beta6" />
2830
</ItemGroup>
2931
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp1.0'">
3032
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.5" />

test/MsgPack.UnitTest.CodeDom/MsgPack.UnitTest.CodeDom.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
2020
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
2121
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.3.1" />
22+
<!-- To avoid PDB Reader error -->
23+
<PackageReference Include="Mono.Cecil" Version="0.10.0-beta6" />
2224
</ItemGroup>
2325
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
2426
<PackageReference Include="Microsoft.NETCore.App" Version="2.0.0" />

test/MsgPack.UnitTest/MsgPack.UnitTest.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
2424
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.3.1" />
2525
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
26+
<!-- To avoid PDB Reader error -->
27+
<PackageReference Include="Mono.Cecil" Version="0.10.0-beta6" />
2628
</ItemGroup>
2729
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp1.0'">
2830
<PackageReference Include="Microsoft.NETCore.App" Version="1.0.5" />

0 commit comments

Comments
 (0)