Skip to content

Commit bb48e8b

Browse files
Jan FriedrichJan Friedrich
authored andcommitted
include pdb in nuget
1 parent 5215983 commit bb48e8b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/log4net/log4net.csproj

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<Product>Apache log4net</Product>
77
<Description>
88
log4net is a tool to help the programmer output log statements to a variety of output targets.
9-
In case of problems with an application, it is helpful to enable logging so that the problem
9+
In case of problems with an application, it is helpful to enable logging so that the problem
1010
can be located. With log4net it is possible to enable logging at runtime without modifying the
11-
application binary. The log4net package is designed so that log statements can remain in
11+
application binary. The log4net package is designed so that log statements can remain in
1212
shipped code without incurring a high performance cost. It follows that the speed of logging
1313
(or rather not logging) is crucial.
1414

@@ -64,6 +64,7 @@
6464
<OutputPath>..\..\build\$(Configuration)</OutputPath>
6565
<PackageOutputPath>..\..\build\artifacts</PackageOutputPath>
6666
<DocumentationFile>..\..\build\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
67+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
6768
</PropertyGroup>
6869
<PropertyGroup>
6970
<BaseAddress>285212672</BaseAddress>
@@ -203,4 +204,12 @@
203204
</ItemGroup>
204205
<PropertyGroup />
205206
<Import Project="../MonoForFramework.targets" />
206-
</Project>
207+
<Target Name="_ResolveCopyLocalNuGetPackagePdbsAndXml" Condition="$(CopyLocalLockFileAssemblies) == true" AfterTargets="ResolveReferences">
208+
<!-- "Workaround" for missing '.pdb'-Files from NuGet Packages -->
209+
<!-- https://github.com/dotnet/sdk/issues/1458#issuecomment-420456386 -->
210+
<ItemGroup>
211+
<ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).pdb')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).pdb')"/>
212+
<ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).xml')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).xml')"/>
213+
</ItemGroup>
214+
</Target>
215+
</Project>

0 commit comments

Comments
 (0)