Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor common props and delete empty props #1528

Merged
merged 4 commits into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .props/_Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,30 @@

</PropertyGroup>

<!--
Regarding Debug Type:
FULL is the legacy Windows format.
NetCore has switched to PORTABLE. https://github.com/dotnet/core/blob/master/Documentation/diagnostics/portable_pdb.md
We tried switching to Portable in 2018, ago but Microsoft Symbol Server didn't support it yet.
I tried onboarding to Nuget Symbols Server in 2019, but they require Portable.

DotNet SDK recommends using PORTABLE https://github.com/dotnet/sdk/issues/2679#issuecomment-441098067

This needs to be revisited when someone has time.
-->

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
</PropertyGroup>

</Project>
11 changes: 11 additions & 0 deletions .scripts/release_NupkgAudit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ function Get-DoesXmlDocContainsLang ([string]$dllPath) {
Test-Condition ($result) $message $requirement;
}

function Get-DoesPdbExist ([string]$dllPath) {
# CONFIRM .PDB SYMBOLS EXIST WITH EACH DLL
[string]$docFile = $dllPath -replace ".dll", ".pdb";
TimothyMothra marked this conversation as resolved.
Show resolved Hide resolved

$message = "Symbols in package:";
$requirement = "Not a requirement, but made a decision to include these in packages."
Test-Condition (Test-Path $docFile) $message $requirement;
}

function Get-DoesDllVersionsMatch ([string]$dllPath) {
# CONFIRM Assembly version matches File version
[string]$fileVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($dllPath).FileVersion;
Expand Down Expand Up @@ -338,6 +347,8 @@ function Start-EvaluateNupkg ($nupkgPath) {

Get-DoesDllVersionsMatch $_.FullName;

Get-DoesPdbExist $_.FullName;

Get-DoesXmlDocExist $_.FullName;
Get-DoesXmlDocContainsLang $_.FullName;
}
Expand Down
14 changes: 1 addition & 13 deletions BASE/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,4 @@
<ChecksumAlgorithm>SHA256</ChecksumAlgorithm>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
</PropertyGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<DefineConstants>$(DefineConstants);NETCOREAPP;NETCOREAPP1_1</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## VNext
- [All product sdks are now building the same symbols (DebugType = FULL) and we're including symbols in the nuget package.](https://github.com/microsoft/ApplicationInsights-dotnet/issues/1527)
- [Upgraded FxCop and fixed several issues related to null checks and disposing objects.](https://github.com/microsoft/ApplicationInsights-dotnet/pull/1499)
- [Exceptions are not correlated to requests when customErrors=Off and Request-Id is passed](https://github.com/microsoft/ApplicationInsights-dotnet/issues/1493)
- [Switch to compact Id format in W3C mode](https://github.com/microsoft/ApplicationInsights-dotnet/pull/1498)
Expand Down
17 changes: 0 additions & 17 deletions LOGGING/Common.props

This file was deleted.

2 changes: 0 additions & 2 deletions LOGGING/Logging.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solutio
ProjectSection(SolutionItems) = preProject
CHANGELOG.md = CHANGELOG.md
CodeCov.ps1 = CodeCov.ps1
Common.props = Common.props
Common.targets = Common.targets
Directory.Build.props = Directory.Build.props
NuGet.Config = NuGet.Config
src\Product.props = src\Product.props
README.md = README.md
Signing.targets = Signing.targets
Test.props = Test.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Log4NetAppender", "src\Log4NetAppender\Log4NetAppender.csproj", "{CB555B89-94D7-4B38-92D9-9F497A796966}"
Expand Down
5 changes: 0 additions & 5 deletions LOGGING/Test.props

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
<PackageTags>$(PackageTags) DiagnosticsSource</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<Content Include="ApplicationInsights.config.install.xdt" />
<Content Include="ApplicationInsights.config.uninstall.xdt" />
Expand Down
5 changes: 0 additions & 5 deletions LOGGING/src/EventSourceListener/EventSourceListener.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
<PackageTags>$(PackageTags) ASP.NET ASMX Web Azure Server Services ASPX Websites Role Logging Log Tracing EventSource EventSourceListener</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<Content Include="ApplicationInsights.config.install.xdt" />
<Content Include="ApplicationInsights.config.uninstall.xdt" />
Expand Down
5 changes: 0 additions & 5 deletions LOGGING/src/ILogger/ILogger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
<PackageTags>$(PackageTags) ILogger ILoggerBuilder ILoggerProvider</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
Expand Down
1 change: 0 additions & 1 deletion LOGGING/src/Product.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'Common.props'))\Common.props"/>

<PropertyGroup>
<!--Removing the SRC folder from the output directory-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
<ProjectReference Include="..\..\src\ILogger\ILogger.csproj" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
Expand Down
3 changes: 0 additions & 3 deletions LOGGING/test/Xdt.Tests/Xdt.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@
<ProjectReference Include="..\..\..\BASE\src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj" />
</ItemGroup>


<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />

<Import Project="$(PropsRoot)\Test.props" />

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'Common.targets'))\Common.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
<PackageTags>$(PackageTags)aspnetcore;</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<!--Symbols Settings-->
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.0|AnyCPU'">
<NoWarn>1701;1702</NoWarn>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@
<PackageTags>$(PackageTags)worker;console;backgroundtasks;</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<!--Symbols Settings-->
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>


<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
Expand Down
13 changes: 0 additions & 13 deletions WEB/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@
<!-- If $(EnlistmentRoot) is still not set, then import Directory.Build.props directly. This can happen when gitlink tries to build (because it uses MSBuild tools version 4.0 and we can't find Microsoft.Common.props) -->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'Directory.Build.props'))\Directory.Build.props" Condition="'$(EnlistmentRoot)' == ''"/>

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
<DefineConstants>$(DefineConstants);NET45;</DefineConstants>
</PropertyGroup>
Expand Down