Skip to content

Commit 0e6e75b

Browse files
authored
Merge pull request #7 from servicetitan/simplify-build-process
Project build process improvements
2 parents 2f04c22 + 2f767b0 commit 0e6e75b

75 files changed

Lines changed: 322 additions & 6006 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Build.proj

Lines changed: 0 additions & 56 deletions
This file was deleted.

Directory.Build.props

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

4-
<Import Project="$(MSBuildThisFileDirectory)\Version.props" />
4+
<Import Project="$(MSBuildThisFileDirectory)Version.props" />
55

6-
<!-- Compute intermediate values. To avoid conflicts name all custom variables with Do prefix. -->
7-
<PropertyGroup>
6+
<!-- Compute intermediate values. To avoid conflicts name all custom variables with Do prefix. -->
7+
<PropertyGroup>
88
<DoBuildNumber>$(BUILD_NUMBER)</DoBuildNumber>
99
<DoBuildNumber Condition="'$(DoBuildNumber)'==''">0</DoBuildNumber>
1010
<DoBuildYear>$([System.DateTime]::Today.Year)</DoBuildYear>
@@ -17,12 +17,33 @@
1717
<DoPatch>$([System.Version]::new($(DoVersion)).Build)</DoPatch>
1818
<DoVersionName>$(DoMajor).$(DoMinor).$(DoPatch)</DoVersionName>
1919
<DoVersionName Condition="'$(DoVersionSuffix)'!=''">$(DoVersionName)-$(DoVersionSuffix)</DoVersionName>
20-
<DoPackageIcon>$(MSBuildThisFileDirectory)\do-nuget.png</DoPackageIcon>
21-
<DoRevFile>$(MSBuildThisFileDirectory)\_Build\rev.txt</DoRevFile>
22-
</PropertyGroup>
20+
<DoPackageIcon>$(MSBuildThisFileDirectory)do-nuget.png</DoPackageIcon>
21+
<DoRevFile>$(MSBuildThisFileDirectory)_Build\rev.txt</DoRevFile>
22+
</PropertyGroup>
2323

24-
<!-- Populate standard properties. -->
25-
<PropertyGroup>
24+
<PropertyGroup>
25+
<SolutionDir Condition="$(SolutionDir) == ''">$(MSBuildThisFileDirectory.TrimEnd('\').TrimEnd('/'))\</SolutionDir>
26+
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
27+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
28+
<NoLogo>true</NoLogo>
29+
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
30+
<ArtifactsDir Condition="'$(ArtifactsDir)'==''">$(SolutionDir)_Build\</ArtifactsDir>
31+
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(ArtifactsDir)obj\$(Configuration)\$(MSBuildProjectName)'))\</BaseIntermediateOutputPath>
32+
<BaseOutputPath >$([System.IO.Path]::GetFullPath('$(ArtifactsDir)bin\$(Configuration)'))\</BaseOutputPath>
33+
<BaseOutputPath Condition="$(MSBuildProjectName.Contains('Tests'))">$([System.IO.Path]::GetFullPath('$(ArtifactsDir)tests'))\</BaseOutputPath>
34+
<OutputPath>$(BaseOutputPath)</OutputPath>
35+
<MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
36+
<ProjectAssetsFile>$(MSBuildProjectExtensionsPath)project.assets.json</ProjectAssetsFile>
37+
<ProjectAssetsCacheFile>$(MSBuildProjectExtensionsPath)$(MSBuildProjectName).assets.cache</ProjectAssetsCacheFile>
38+
</PropertyGroup>
39+
40+
<PropertyGroup>
41+
<GeneratePackageOnBuild Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">false</GeneratePackageOnBuild>
42+
<GeneratePackageOnBuild Condition="$(GeneratePackageOnBuild)=='' AND '$(Configuration)' == 'Release'">true</GeneratePackageOnBuild>
43+
</PropertyGroup>
44+
45+
<!-- Populate standard properties. -->
46+
<PropertyGroup>
2647
<Product>$(DoProductName)</Product>
2748
<Company>$(DoProductAuthors)</Company>
2849
<Authors>$(DoProductAuthors)</Authors>
@@ -34,14 +55,19 @@
3455
<PackageIcon>do-nuget.png</PackageIcon>
3556
<PackageLicense>Apache-2.0</PackageLicense>
3657
<PackageTags>DataObjects.Net ORM BLL Persistence</PackageTags>
37-
<PackageOutputPath>..\..\_Build\$(Configuration)\packages</PackageOutputPath>
58+
<PackageOutputPath>$(MSBuildThisFileDirectory)_Build\$(Configuration)\packages</PackageOutputPath>
3859
<RepositoryUrl>https://github.com/DataObjects-NET/dataobjects-net</RepositoryUrl>
3960
<RepositoryType>git</RepositoryType>
40-
</PropertyGroup>
61+
</PropertyGroup>
4162

42-
<ItemGroup>
63+
<ItemGroup>
4364
<None Include="$(DoPackageIcon)" Pack="true" PackagePath="." Visible="false" />
4465
<None Include="$(DoRevFile)" Pack="true" PackagePath="." Visible="false" Condition="Exists('$(DoRevFile)')" />
45-
</ItemGroup>
66+
</ItemGroup>
67+
<Target Name="ExportRev" Condition="Exists('.git\index') AND '$(Configuration)' == 'Release'">
68+
<MakeDir Directories="_Build" />
69+
<Exec Command="git rev-parse HEAD > rev.txt" WorkingDirectory="_Build" />
70+
</Target>
71+
4672

4773
</Project>

Extensions/TestCommon/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 8 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,25 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
4-
<EnableDefaultItems>false</EnableDefaultItems>
3+
<OutputPath>..\..\_Build\$(Configuration)\lib\</OutputPath>
4+
<DocumentationFile />
55
</PropertyGroup>
6-
76
<PropertyGroup>
87
<TargetFramework>netcoreapp2.0</TargetFramework>
9-
<OutputType>Library</OutputType>
10-
<RootNamespace>TestCommon</RootNamespace>
11-
<AssemblyName>TestCommon</AssemblyName>
128
<SignAssembly>true</SignAssembly>
139
<AssemblyOriginatorKeyFile>..\Extensions.snk</AssemblyOriginatorKeyFile>
14-
<WarningLevel>4</WarningLevel>
1510
</PropertyGroup>
16-
17-
<PropertyGroup Label="Debug" Condition="'$(Configuration)'=='Debug'">
18-
<Optimize>false</Optimize>
19-
<DebugType>full</DebugType>
20-
<DebugSymbols>true</DebugSymbols>
21-
<OutputPath>..\..\_Build\Debug\lib\</OutputPath>
22-
<DocumentationFile></DocumentationFile>
23-
<DefineConstants>TRACE;DEBUG</DefineConstants>
24-
</PropertyGroup>
25-
26-
<PropertyGroup Label="Release" Condition="'$(Configuration)'=='Release'">
27-
<Optimize>true</Optimize>
28-
<DebugType>pdbonly</DebugType>
29-
<OutputPath>..\..\_Build\Release\lib\</OutputPath>
30-
<DocumentationFile></DocumentationFile>
31-
<DefineConstants>TRACE</DefineConstants>
32-
</PropertyGroup>
33-
34-
<ItemGroup>
35-
<Compile Include="AssemblyExtensions.cs" />
36-
<Compile Include="CommonModelTest.cs" />
37-
<Compile Include="DomainConfigurationFactory.cs" />
38-
<Compile Include="HasAccessToConfigurationTest.cs" />
39-
<Compile Include="Model\Bar.cs" />
40-
<Compile Include="Model\Bar2.cs" />
41-
<Compile Include="Model\Foo.cs" />
42-
<Compile Include="Model\Foo2.cs" />
43-
<Compile Include="Model\LinqCompilerContainer.cs" />
44-
<Compile Include="Model\Point.cs" />
45-
<Compile Include="Model\Rectangle.cs" />
46-
<Compile Include="Properties\AssemblyInfo.cs" />
47-
<Compile Include="TestConfiguration.cs" />
48-
<Compile Include="Tests\TestConfigurationTest.cs" />
49-
</ItemGroup>
50-
<ItemGroup>
51-
<None Include="App.config" />
52-
</ItemGroup>
53-
11+
<Import Project="..\..\MSBuild\DataObjects.Net.InternalBuild.targets" />
5412
<ItemGroup>
5513
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.2" />
5614
<PackageReference Include="NUnit" Version="3.12.0" />
5715
<PackageReference Include="NUnit3TestAdapter" Version="3.15.0" />
58-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
16+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
5917
</ItemGroup>
60-
6118
<ItemGroup>
6219
<ProjectReference Include="..\..\Orm\Xtensive.Orm.Tests.Framework\Xtensive.Orm.Tests.Framework.csproj" />
6320
<ProjectReference Include="..\..\Orm\Xtensive.Orm\Xtensive.Orm.csproj" />
6421
</ItemGroup>
65-
66-
<Import Project="..\..\MSBuild\DataObjects.Net.InternalBuild.targets" />
67-
</Project>
22+
<ItemGroup>
23+
<Folder Include="Properties\" />
24+
</ItemGroup>
25+
</Project>

Extensions/Xtensive.Orm.BulkOperations.Tests/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,26 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
4-
<EnableDefaultItems>false</EnableDefaultItems>
3+
<OutputPath>..\..\_Build\$(Configuration)\lib\</OutputPath>
4+
<DocumentationFile />
55
</PropertyGroup>
6-
76
<PropertyGroup>
87
<TargetFramework>netcoreapp2.0</TargetFramework>
9-
<OutputType>Library</OutputType>
10-
<RootNamespace>Xtensive.Orm.BulkOperations.Tests</RootNamespace>
11-
<AssemblyName>Xtensive.Orm.BulkOperations.Tests</AssemblyName>
12-
<WarningLevel>4</WarningLevel>
138
</PropertyGroup>
14-
15-
<PropertyGroup Label="Debug" Condition="'$(Configuration)'=='Debug'">
16-
<Optimize>false</Optimize>
17-
<DebugType>full</DebugType>
18-
<DebugSymbols>true</DebugSymbols>
19-
<OutputPath>..\..\_Build\Debug\lib\</OutputPath>
20-
<DocumentationFile></DocumentationFile>
21-
<DefineConstants>TRACE;DEBUG</DefineConstants>
22-
</PropertyGroup>
23-
24-
<PropertyGroup Label="Release" Condition="'$(Configuration)'=='Release'">
25-
<Optimize>true</Optimize>
26-
<DebugType>pdbonly</DebugType>
27-
<OutputPath>..\..\_Build\Release\lib\</OutputPath>
28-
<DocumentationFile></DocumentationFile>
29-
<DefineConstants>TRACE</DefineConstants>
30-
</PropertyGroup>
31-
32-
<ItemGroup>
33-
<Compile Include="AutoBuildTest.cs" />
34-
<Compile Include="Extensions.cs" />
35-
<Compile Include="Issues\IssueJira0560_ChangeFieldWhichDefinedInAncestorClassBug.cs" />
36-
<Compile Include="Issues\IssueJira0565_IgnoringTakeMethodOnTranslation.cs" />
37-
<Compile Include="Properties\AssemblyInfo.cs" />
38-
<Compile Include="Other.cs" />
39-
<Compile Include="ReferenceFields.cs" />
40-
<Compile Include="Structures.cs" />
41-
</ItemGroup>
42-
43-
<ItemGroup>
44-
<None Include="App.config">
45-
<SubType>Designer</SubType>
46-
</None>
47-
</ItemGroup>
48-
9+
<Import Project="..\..\MSBuild\DataObjects.Net.InternalBuild.targets" />
4910
<ItemGroup>
5011
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.2" />
5112
<PackageReference Include="NUnit" Version="3.12.0" />
5213
<PackageReference Include="NUnit3TestAdapter" Version="3.15.0" />
5314
</ItemGroup>
54-
5515
<ItemGroup>
5616
<ProjectReference Include="..\..\Orm\Xtensive.Orm.Tests.Framework\Xtensive.Orm.Tests.Framework.csproj" />
5717
<ProjectReference Include="..\TestCommon\TestCommon.csproj" />
5818
<ProjectReference Include="..\Xtensive.Orm.BulkOperations\Xtensive.Orm.BulkOperations.csproj" />
5919
</ItemGroup>
60-
6120
<ItemGroup>
6221
<ProjectReference Include="..\..\Orm\Xtensive.Orm\Xtensive.Orm.csproj" />
6322
</ItemGroup>
64-
65-
<Import Project="..\..\MSBuild\DataObjects.Net.InternalBuild.targets" />
66-
</Project>
23+
<ItemGroup>
24+
<Folder Include="Properties\" />
25+
</ItemGroup>
26+
</Project>

Extensions/Xtensive.Orm.BulkOperations/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,26 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
4-
<EnableDefaultItems>false</EnableDefaultItems>
53
<IsPackable>true</IsPackable>
4+
<OutputPath>..\..\_Build\$(Configuration)\lib\</OutputPath>
5+
<DocumentationFile>..\..\_Build\$(Configuration)\lib\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
66
</PropertyGroup>
7-
87
<PropertyGroup>
98
<TargetFramework>netstandard2.0</TargetFramework>
10-
<OutputType>Library</OutputType>
11-
<RootNamespace>Xtensive.Orm.BulkOperations</RootNamespace>
12-
<AssemblyName>Xtensive.Orm.BulkOperations</AssemblyName>
139
<PackageId>Xtensive.Orm.BulkOperations</PackageId>
1410
<Title>Bulk operations extension for $(DoProductName)</Title>
1511
<AssemblyTitle>$(Title)</AssemblyTitle>
1612
<PackageDescription>Adds support for bulk insert, update and delete operations for $(DoProductName)-powered domain models</PackageDescription>
1713
<SignAssembly>true</SignAssembly>
1814
<AssemblyOriginatorKeyFile>..\Extensions.snk</AssemblyOriginatorKeyFile>
1915
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
20-
<WarningLevel>4</WarningLevel>
2116
</PropertyGroup>
22-
23-
<PropertyGroup Label="Debug" Condition="'$(Configuration)'=='Debug'">
24-
<Optimize>false</Optimize>
25-
<DebugType>full</DebugType>
26-
<DebugSymbols>true</DebugSymbols>
27-
<OutputPath>..\..\_Build\Debug\lib\</OutputPath>
28-
<DocumentationFile>..\..\_Build\Debug\lib\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
29-
<DefineConstants>TRACE;DEBUG</DefineConstants>
30-
</PropertyGroup>
31-
32-
<PropertyGroup Label="Release" Condition="'$(Configuration)'=='Release'">
33-
<Optimize>true</Optimize>
34-
<DebugType>pdbonly</DebugType>
35-
<OutputPath>..\..\_Build\Release\lib\</OutputPath>
36-
<DocumentationFile>..\..\_Build\Release\lib\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
37-
<DefineConstants>TRACE</DefineConstants>
38-
</PropertyGroup>
39-
40-
<ItemGroup>
41-
<Compile Include="BulkExtensions.cs" />
42-
<Compile Include="Internals\BaseSqlVisitor.cs" />
43-
<Compile Include="Internals\BulkDeleteOperation.cs" />
44-
<Compile Include="Internals\BulkUpdateOperation.cs" />
45-
<Compile Include="Internals\ComputedExpressionSqlVisitor.cs" />
46-
<Compile Include="Internals\AddValueContext.cs" />
47-
<Compile Include="Internals\InsertOperation.cs" />
48-
<Compile Include="Internals\Operation.cs" />
49-
<Compile Include="Internals\ExpressionExtensions.cs" />
50-
<Compile Include="Internals\ExpressionVisitor.cs" />
51-
<Compile Include="Internals\Extensions.cs" />
52-
<Compile Include="Internals\PrimaryIndexMapping.cs" />
53-
<Compile Include="Internals\QueryOperation.cs" />
54-
<Compile Include="Internals\SetDescriptor.cs" />
55-
<Compile Include="Internals\SetStatement.cs" />
56-
<Compile Include="Internals\Updatable.cs" />
57-
<Compile Include="Internals\SetOperation.cs" />
58-
<Compile Include="IUpdatable.cs" />
59-
<Compile Include="Properties\AssemblyInfo.cs" />
60-
</ItemGroup>
61-
6217
<ItemGroup>
6318
<None Include="Readme.txt" />
6419
</ItemGroup>
65-
6620
<ItemGroup>
6721
<ProjectReference Include="..\..\Orm\Xtensive.Orm\Xtensive.Orm.csproj" />
6822
</ItemGroup>
69-
70-
</Project>
23+
<ItemGroup>
24+
<Folder Include="Properties\" />
25+
</ItemGroup>
26+
</Project>

0 commit comments

Comments
 (0)