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

Commit

Permalink
refactor projects
Browse files Browse the repository at this point in the history
remove "artifacts" directory.
Now using same bin and obj directories as all other repos.
  • Loading branch information
TimothyMothra committed Oct 17, 2019
1 parent e1b0e4b commit ba5c4b7
Show file tree
Hide file tree
Showing 20 changed files with 80 additions and 43 deletions.
39 changes: 39 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?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>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</EnlistmentRoot>
<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>

<!-- <BaseIntermediateOutputPath>$(EnlistmentRoot)\..\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(BaseIntermediateOutputPath) ))</BaseIntermediateOutputPath> -->

<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.
16 changes: 16 additions & 0 deletions Nupkg.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,20 @@
<!-- <PackageTags>$(PackageTags) newTag1 newTag2</PackageTags> -->
</PropertyGroup>

<PropertyGroup>
<!-- Disable auto generation of package attributes. This resolves the 'Duplicate attribute' error.
Common cause is a hidden AssemblyInfo.cs file in a project -->

<!-- <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute> -->

</PropertyGroup>

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

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

<PropertyGroup>
<VersionPrefix>2.12.0-beta1</VersionPrefix>
<!--
<OutputPath Condition="'$(OutputPath)'=='' ">$(EnlistmentRoot)..\..\artifacts\src\$(MSBuildProjectName)</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'=='' ">..\..\artifacts\obj\src\$(MSBuildProjectName)</IntermediateOutputPath> -->
</PropertyGroup>

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

</Project>
Empty file added SourceRoot.marker
Empty file.
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<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 +64,6 @@

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


<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.12.0-beta1-build4530" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.12.0-beta1-build5020" />
Expand Down Expand Up @@ -99,8 +96,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,5 @@

<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

0 comments on commit ba5c4b7

Please sign in to comment.