Skip to content

Commit

Permalink
Adding sourcelink (#1859)
Browse files Browse the repository at this point in the history
adding debugtype as portable to check symbols

removing os condition

update changelog for removing netstandard 1.x (#1858)

since we are using msbuild, we have to set deterministic

reverting

updating Product.props and removing reference from all projects

adding sourceroot based on github issue (dotnet/roslyn#37379)

including pdbs in output folder

commenting deterministic properties and sourceroot

removing cibuild from nugetprops

undoing nupkg and sourceroot from directory.build
  • Loading branch information
eddynaka authored May 7, 2020
1 parent ec33117 commit d1865fc
Show file tree
Hide file tree
Showing 21 changed files with 36 additions and 406 deletions.
27 changes: 26 additions & 1 deletion .props/Product.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,33 @@

<Import Project=".\_Common.props" />
<Import Project=".\_AnalyzerSettings.props" />

<Import Project=".\_GlobalStaticVersion.props" />
<Import Project=".\_Nupkg.props" />

<ItemGroup Condition=" $(OS) == 'Windows_NT' And $(Configuration) == 'Release'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>

<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
10 changes: 7 additions & 3 deletions .props/_Nupkg.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- Creating symbol packages (.snupkg) https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg -->
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<!-- Include the PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
Expand All @@ -39,10 +39,14 @@
<PackageReleaseNotes>For the release notes please follow http://go.microsoft.com/fwlink/?LinkId=535037</PackageReleaseNotes>
<!-- <PackageOutputPath>Defined in Directory.props</PackageOutputPath> -->
<PackageTags>Analytics Azure ApplicationInsights Telemetry Monitoring SDK</PackageTags>
<!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<ItemGroup>
<None Include="$(EnlistmentRoot)\.images\icon.png" Pack="true" PackagePath="\"/>
<None Include="$(EnlistmentRoot)\.images\icon.png" Pack="true" PackagePath="\"/>
</ItemGroup>

<PropertyGroup>
Expand All @@ -67,7 +71,7 @@
<!-- This target will add an English localization tag to our xml documentation file. -->
<InjectXmlLanguage FilePath="$(OutputPath)\$(AssemblyName).XML" />
</Target>

<UsingTask TaskName="InjectXmlLanguage" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<FilePath ParameterType="System.String" Required="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,6 @@
</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventRegister" Version="1.1.28" Condition="$(OS) == 'Windows_NT'">
<PrivateAssets>All</PrivateAssets>
Expand Down
23 changes: 0 additions & 23 deletions BASE/src/ServerTelemetryChannel/TelemetryChannel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,6 @@
<IsNetStandardBuild>True</IsNetStandardBuild>
</PropertyGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## VNext
- [End support for NetStandard 1.x, Add support for NetStandard 2.0](https://github.com/microsoft/ApplicationInsights-dotnet/issues/1160)
- [Add support for SourceLink.Github to all SDKs.](https://github.com/microsoft/ApplicationInsights-dotnet/issues/1760)

## Version 2.15.0-beta1
- [WorkerService package is modified to depend on 2.1.1 on Microsoft.Extensions.DependencyInjection so that it can be used in .NET Core 2.1 projects without nuget errors.](https://github.com/microsoft/ApplicationInsights-dotnet/issues/1677)
Expand Down
5 changes: 2 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<BinRoot>$(EnlistmentRoot)\..\bin</BinRoot>
<BinRoot>$([System.IO.Path]::GetFullPath( $(BinRoot) ))</BinRoot>

<ObjRoot>$(EnlistmentRoot)\..\obj</ObjRoot>
<ObjRoot>$([System.IO.Path]::GetFullPath( $(ObjRoot) ))</ObjRoot>

Expand All @@ -43,10 +43,9 @@
<IntermediateOutputPath>$(ObjRoot)\$(Configuration)\$(RelativeOutputPathBase)</IntermediateOutputPath>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>



<!-- Testing fix for https://github.com/dotnet/sdk/issues/2523 -->
<!-- If this works, should move to common and not the directory props -->
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,6 @@
<Content Include="ApplicationInsights.config.uninstall.xdt" />
</ItemGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\BASE\src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.6.0" />
Expand Down
23 changes: 0 additions & 23 deletions LOGGING/src/EtwCollector/EtwCollector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,6 @@
<Content Include="ApplicationInsights.config.uninstall.xdt" />
</ItemGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventRegister" Version="1.1.28">
<PrivateAssets>All</PrivateAssets>
Expand Down
23 changes: 0 additions & 23 deletions LOGGING/src/EventSourceListener/EventSourceListener.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,6 @@
<Content Include="ApplicationInsights.config.uninstall.xdt" />
</ItemGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\BASE\src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj" />
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
Expand Down
27 changes: 0 additions & 27 deletions LOGGING/src/ILogger/ILogger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,8 @@
<PackageTags>$(PackageTags) ILogger ILoggerBuilder ILoggerProvider</PackageTags>
</PropertyGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\BASE\src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.0" />
</ItemGroup>

Expand Down
23 changes: 0 additions & 23 deletions LOGGING/src/Log4NetAppender/Log4NetAppender.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,6 @@
<PackageTags>$(PackageTags) Log4Net</PackageTags>
</PropertyGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventRegister" Version="1.1.28">
<PrivateAssets>All</PrivateAssets>
Expand Down
27 changes: 0 additions & 27 deletions LOGGING/src/NLogTarget/NLogTarget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,6 @@
<PackageTags>$(PackageTags) NLog</PackageTags>
</PropertyGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="NLog" Version="4.5.11" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventRegister" Version="1.1.28">
Expand Down
23 changes: 0 additions & 23 deletions LOGGING/src/TraceListener/TraceListener.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,6 @@
<PackageTags>$(PackageTags) TraceListener</PackageTags>
</PropertyGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<!--Build Infrastructure-->
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.Tracing.EventRegister" Version="1.1.28">
<PrivateAssets>All</PrivateAssets>
Expand Down
Loading

0 comments on commit d1865fc

Please sign in to comment.