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

cleanup test projects #2363

Merged
merged 3 commits into from
Aug 12, 2021
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
16 changes: 16 additions & 0 deletions .props/Test.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@
<Import Project=".\_Common.props" />
<Import Project=".\_AnalyzerSettings.props" />

<PropertyGroup>
<!-- Our test matrix includes every currently supported version of .NET
- net4.5.2 (EoL April 2022)
- net4.6.0 (EoL April 2022)
- net4.6.1 (EoL April 2022)
- net4.6.2
- net4.7.2
- net4.8.0
- netcoreapp3.1 (EoL Dec 2022)
- net5.0 (EoL Feb 2022)
- net6.0 (GA Nov 2021)
-->
<TargetFrameworks>net462;net472;net480;netcoreapp3.1;net5.0</TargetFrameworks>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net48 vs net480?

<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
rajkumar-rangaraj marked this conversation as resolved.
Show resolved Hide resolved

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<TargetFrameworks>net452;net46;net461;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp3.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down Expand Up @@ -46,9 +47,5 @@
<PackageReference Include="Azure.Core" Version="1.14.0" /> <!-- Supports: net461, netstandard2.0, and net5.0 -->
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="..\..\TestFramework\Shared\TestFramework.Shared.projitems" Label="TestFramework.Shared" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<ProjectGuid>{2759BC71-7F47-44DA-8579-AE2D8C8C684D}</ProjectGuid>
<TargetFrameworks>net46;netcoreapp3.1</TargetFrameworks>
</PropertyGroup>
Expand Down Expand Up @@ -50,9 +51,4 @@
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<ProjectGuid>{21CB9A8A-F25B-4DEB-92CB-ACB6920EB8BC}</ProjectGuid>
<TargetFrameworks>net452</TargetFrameworks>
<AssemblyName>TelemetryChannel.Nuget.Tests</AssemblyName>
Expand Down Expand Up @@ -33,8 +34,4 @@
<Link>Resources\ApplicationInsights.config.uninstall.xdt</Link>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp3.1</TargetFrameworks>

Expand All @@ -28,10 +29,6 @@
<Reference Include="System.Web.Extensions" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Azure.Core" Version="1.14.0" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.DiagnosticSourceListener.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.DiagnosticSourceListener.Tests</AssemblyName>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
Expand All @@ -16,13 +18,6 @@
<ProjectReference Include="..\..\src\DiagnosticSourceListener\DiagnosticSourceListener.csproj" />
</ItemGroup>

<ItemGroup>
<!-- Identifies the project as test project -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

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

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />
</Project>
</Project>
13 changes: 4 additions & 9 deletions LOGGING/test/EtwCollector.Tests/EtwCollector.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.EtwCollector.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.EtwCollector.Tests</AssemblyName>
<TargetFrameworks>net46</TargetFrameworks>
Expand All @@ -18,14 +20,7 @@
<ItemGroup>
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup>
<!-- Identifies the project as test project -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

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


<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.EventSourceListener.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.EventSourceListener.Tests</AssemblyName>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
Expand All @@ -15,14 +17,6 @@
<ItemGroup>
<ProjectReference Include="..\..\src\EventSourceListener\EventSourceListener.csproj" />
</ItemGroup>

<ItemGroup>
<!-- Identifies the project as test project -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

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

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />
</Project>
</Project>
1 change: 1 addition & 0 deletions LOGGING/test/ILogger.Tests/ILogger.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.Log4NetAppender.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.Log4NetAppender.Tests</AssemblyName>
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
Expand All @@ -20,12 +21,6 @@
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup>
<!-- Identifies the project as test project -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>


<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />
</Project>
</Project>
8 changes: 2 additions & 6 deletions LOGGING/test/NLogTarget.Tests/NLogTarget.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.NLogTarget.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.NLogTarget.Tests</AssemblyName>
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
Expand All @@ -20,11 +21,6 @@
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup>
<!-- Identifies the project as test project -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />
</Project>
</Project>
8 changes: 2 additions & 6 deletions LOGGING/test/TraceListener.Tests/TraceListener.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Microsoft.ApplicationInsights.TraceListener.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.TraceListener.Tests</AssemblyName>
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
Expand All @@ -20,11 +21,6 @@
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup>
<!-- Identifies the project as test project -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />
</Project>
</Project>
11 changes: 5 additions & 6 deletions LOGGING/test/Xdt.Tests/Xdt.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<RootNamespace>Xdt.Tests</RootNamespace>
<AssemblyName>Xdt.Tests</AssemblyName>
<TargetFrameworks>net452</TargetFrameworks>
Expand All @@ -16,11 +17,6 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>

<ItemGroup>
<!-- Identifies the project as test project -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="..\..\src\TraceListener\app.config.install.xdt">
<Link>Resources\TraceListener\app.config.install.xdt</Link>
Expand Down Expand Up @@ -77,18 +73,21 @@
<Link>Resources\EtwCollector\ApplicationInsights.config.uninstall.xdt</Link>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Resources\Log4Net\TestDataSet.xml" />
<EmbeddedResource Include="Resources\NLog\TestDataSet.xml" />
<EmbeddedResource Include="Resources\TraceListener\TestDataSet.xml" />
<EmbeddedResource Include="Resources\DiagnosticSourceListener\TestDataSet.xml" />
<EmbeddedResource Include="Resources\EventSourceListener\TestDataSet.xml" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Resources\EtwCollector\TestDataSet.xml" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\BASE\src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,4 @@
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,4 @@
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<PropertyGroup>
<VersionPrefix>2.0.0</VersionPrefix>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp3.1</TargetFrameworks>
<DelaySign Condition=" '$(OS)' == 'Windows_NT' ">true</DelaySign>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>Microsoft.ApplicationInsights.AspNetCore.Tests</AssemblyName>
<PackageId>Microsoft.ApplicationInsights.AspNetCore.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>

<!-- Side effect of adding the Test.props, some analyzers are now running in this project. I'll fix these in a follow up PR. -->
<NoWarn>CS0618</NoWarn>
</PropertyGroup>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: these extra settings were preventing VS and some CLI from running these tests.


<ItemGroup>
Expand All @@ -24,7 +21,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
Expand Down Expand Up @@ -53,8 +49,4 @@
</None>
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
</PropertyGroup>

Expand All @@ -17,7 +17,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
<AssemblyName>Microsoft.ApplicationInsights.DependencyCollector.Tests</AssemblyName>
<PackageId>Microsoft.AI.DependencyCollector.Tests</PackageId>

<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<NoWarn>1701;1702;1705;1591</NoWarn>
</PropertyGroup>

Expand Down Expand Up @@ -48,9 +48,6 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="..\..\TestFramework\Shared\TestFramework.Shared.projitems" Label="Shared" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Import Project="$(PropsRoot)\Test.props" />

<PropertyGroup>
<!-- TargetFrameworks are defined in Test.props, but can be overridden here if needed. -->
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<AssemblyName>Microsoft.AI.EventCounterCollector.Tests</AssemblyName>
</PropertyGroup>
Expand Down
Loading