Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

refactor projects #1010

Merged
merged 6 commits into from
Oct 21, 2019
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
37 changes: 37 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Target Name="Info_DirectoryBuildProps" BeforeTargets="Build" >
<Message Text="INFO) Directory.Build.props imported by $(MSBuildProjectName)." Importance="high"/>
</Target>

<PropertyGroup>
<!-- EnlistmentRoot is used to determine where to put BIN and OBJ directories. -->
<EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</EnlistmentRoot>
<!-- SourceRoot is used to reference project dependencies (ex: *.props). -->
<SourceRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'SourceRoot.marker'))</SourceRoot>

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

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

<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(SourceRoot.Length)))</RelativeOutputPathBase>

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

<OutputPath>$(BinRoot)\$(Configuration)\$(RelativeOutputPathBase)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>

<!-- Collect all NuGet packages in the same folder for convenience during testing -->
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>
<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>

<AppxPackageDir>$(OutputPath)</AppxPackageDir>

<IntermediateOutputPath>$(ObjRoot)\$(Configuration)\$(RelativeOutputPathBase)</IntermediateOutputPath>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>
</PropertyGroup>

</Project>
Empty file added EnlistmentRoot.marker
Empty file.
14 changes: 14 additions & 0 deletions Product.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SourceRoot)\Nupkg.props" />
<Import Project="$(SourceRoot)\Signing.props" Condition=" '$(OS)' == 'Windows_NT' " />

<Target Name="Info_ProductProps" BeforeTargets="Build" >
<Message Text="INFO) Product.props imported by $(MSBuildProjectName)." Importance="high"/>
</Target>

<PropertyGroup>
<VersionPrefix>2.12.0-beta1</VersionPrefix>
</PropertyGroup>

</Project>
9 changes: 7 additions & 2 deletions Signing.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Target Name="Info_SigningProps" BeforeTargets="Build" >
<Message Text="INFO) Signing.props imported by $(MSBuildProjectName)." Importance="high"/>
</Target>

<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\Keys\InternalKey.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>$(SourceRoot)\Keys\InternalKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Condition="'$(PublicRelease)' == 'True'">
<DefineConstants>$(DefineConstants);PUBLIC_RELEASE</DefineConstants>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\Keys\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>$(SourceRoot)\Keys\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<Target Name="AddToSign" AfterTargets="CopyFilesToOutputDirectory" >
Expand Down
Empty file added SourceRoot.marker
Empty file.
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Nupkg.props" />
<Import Project="$(SourceRoot)\Product.props" />

<PropertyGroup>
<AssemblyName>Microsoft.ApplicationInsights.AspNetCore</AssemblyName>
<VersionPrefix>2.12.0-beta1</VersionPrefix>
<LangVersion>7.2</LangVersion>
<TargetFrameworks>netstandard2.0;net451;net46;netstandard1.6</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.6;netstandard2.0</TargetFrameworks>

<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.6' ">1.6.1</NetStandardImplicitPackageVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\src\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\src\$(MSBuildProjectName)</IntermediateOutputPath>
<DefineConstants>$(DefineConstants);AI_ASPNETCORE_WEB;</DefineConstants>
</PropertyGroup>

Expand Down Expand Up @@ -66,7 +62,6 @@

<Import Project="..\Shared\Shared.projitems" Label="Shared" />


<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.12.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.12.0-beta1" />
Expand Down Expand Up @@ -99,8 +94,4 @@
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
</ItemGroup>

<ImportGroup Condition=" '$(OS)' == 'Windows_NT' ">
<!-- 1 file is required for signing: Signing.props -->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'Signing.props'))\Signing.props" />
</ImportGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Nupkg.props" />
<Import Project="$(SourceRoot)\Product.props"/>

<PropertyGroup>
<AssemblyName>Microsoft.ApplicationInsights.WorkerService</AssemblyName>
<VersionPrefix>2.12.0-beta1</VersionPrefix>
<LangVersion>7.2</LangVersion>
<TargetFrameworks>netstandard2.0</TargetFrameworks>

<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\src\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\src\$(MSBuildProjectName)</IntermediateOutputPath>
<DefineConstants>$(DefineConstants);AI_ASPNETCORE_WORKER;</DefineConstants>
</PropertyGroup>

Expand Down Expand Up @@ -71,10 +68,4 @@

<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
</ItemGroup>

<ImportGroup Condition=" '$(OS)' == 'Windows_NT' ">
<!-- 1 file is required for signing: Signing.props -->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'Signing.props'))\Signing.props" />
</ImportGroup>

</Project>
2 changes: 0 additions & 2 deletions test/ApplicationInsightsTypes/ApplicationInsightsTypes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>ApplicationInsightsTypes</PackageId>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
<BondOutputDirectory>$(MSBuildThisFileDirectory)\Generated</BondOutputDirectory>
<EnableDefaultItems Condition="$(OS) == 'Windows_NT'">false</EnableDefaultItems>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<PackageId>EmptyApp.FunctionalTests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<!--<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.1.5</RuntimeFrameworkVersion>-->
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<PackageId>EmptyApp20.FunctionalTests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">2.0.0</RuntimeFrameworkVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<DependsOnNETStandard Condition=" '$(TargetFramework)' == 'net461'">true</DependsOnNETStandard>
Expand Down
2 changes: 0 additions & 2 deletions test/FunctionalTestUtils/FunctionalTestUtils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
<AssemblyName>FunctionalTestUtils</AssemblyName>
<PackageId>FunctionalTestUtils</PackageId>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions test/FunctionalTestUtils20/FunctionalTestUtils20.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
<AssemblyName>FunctionalTestUtils20</AssemblyName>
<PackageId>FunctionalTestUtils</PackageId>
<NetStandardImplicitPackageVersion>2.0.0</NetStandardImplicitPackageVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<UserSecretsId>aspnet-MVCFramework45.FunctionalTests-60cfc765-2dc9-454c-bb34-dc379ed92cd0</UserSecretsId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.1.5</RuntimeFrameworkVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<DebugType>pdbonly</DebugType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<UserSecretsId>aspnet-MVCFramework45.FunctionalTests-60cfc765-2dc9-454c-bb34-dc379ed92cd0</UserSecretsId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">2.0.0</RuntimeFrameworkVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<DebugType>pdbonly</DebugType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
<PackageId>Microsoft.ApplicationInsights.AspNetCore.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.1.5</RuntimeFrameworkVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion test/TestApp30.Tests/TestApp30.Tests30.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion test/TestApp30/TestApp30.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions test/WebApi.FunctionalTests/WebApi.FunctionalTests10.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.1.5</RuntimeFrameworkVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<PackageId>WebApi20.FunctionalTests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">2.0.0</RuntimeFrameworkVersion>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\test\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\test\$(MSBuildProjectName)</IntermediateOutputPath>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
Expand Down