Skip to content

Commit 795068e

Browse files
committed
Move common project configuration settings into shared files.
Common build configuration properties are moved into build\ScriptCs.Common.props, which is imported by each *.csproj file in the solution. Common assembly attribute declarations can be found in CommonAssemblyInfo.cs and CommonVersionInfo.cs.
1 parent 1ccd8cd commit 795068e

13 files changed

Lines changed: 102 additions & 327 deletions

File tree

build/ScriptCs.Common.props

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
4+
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5+
6+
<PropertyGroup>
7+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9+
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<TargetFrameworkProfile />
14+
<SolutionDir Condition=" '$(SolutionDir)' == '' Or '$(SolutionDir)' == '*Undefined*'">..\..\</SolutionDir>
15+
<RestorePackages>true</RestorePackages>
16+
17+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
18+
<ErrorReport>prompt</ErrorReport>
19+
<WarningLevel>4</WarningLevel>
20+
<OutputPath>bin\$(Configuration)\</OutputPath>
21+
22+
<DebugSymbols>true</DebugSymbols>
23+
24+
<DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
25+
</PropertyGroup>
26+
27+
<PropertyGroup Condition=" '$(ArtifactsPath)' != '' ">
28+
<ProjectOutputPath>$(MSBuildProjectName)\bin\</ProjectOutputPath>
29+
<ProjectIntermediatePath>$(MSBuildProjectName)\obj\</ProjectIntermediatePath>
30+
31+
<OutputPath>$([System.IO.Path]::Combine($(ArtifactsPath), $(ProjectOutputPath)))</OutputPath>
32+
<IntermediateOutputPath>$([System.IO.Path]::Combine($(ArtifactsPath), $(ProjectIntermediatePath)))</IntermediateOutputPath>
33+
</PropertyGroup>
34+
35+
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
36+
<Prefer32Bit>false</Prefer32Bit>
37+
</PropertyGroup>
38+
39+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
40+
<DefineConstants>DEBUG;CODE_ANALYSIS;$(DefineConstants)</DefineConstants>
41+
<DebugType>full</DebugType>
42+
<Optimize>false</Optimize>
43+
</PropertyGroup>
44+
45+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
46+
<DebugType>pdbonly</DebugType>
47+
<Optimize>true</Optimize>
48+
</PropertyGroup>
49+
</Project>

common/CommonAssemblyInfo.cs

Whitespace-only changes.

common/CommonVersionInfo.cs

Whitespace-only changes.
Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,7 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

5-
// General Information about an assembly is controlled through the following
6-
// set of attributes. Change these attribute values to modify the information
7-
// associated with an assembly.
8-
[assembly: AssemblyTitle("scriptcs.contracts")]
9-
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("scriptcs.contracts")]
13-
[assembly: AssemblyCopyright("Copyright © 2013")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
4+
[assembly: AssemblyTitle("ScriptCs.Contracts")]
5+
[assembly: AssemblyDescription("This assembly contains the components necessary to create script packs for scriptcs.")]
166

17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
20-
[assembly: ComVisible(false)]
21-
22-
// The following GUID is for the ID of the typelib if this project is exposed to COM
237
[assembly: Guid("a0cbc203-deff-4b7c-b414-11797b7a3100")]
24-
25-
// Version information for an assembly consists of the following four values:
26-
//
27-
// Major Version
28-
// Minor Version
29-
// Build Number
30-
// Revision
31-
//
32-
// You can specify all the values or you can default the Build and Revision Numbers
33-
// by using the '*' as shown below:
34-
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
3+
<Import Project="..\..\build\ScriptCs.Common.props" />
44
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
75
<ProjectGuid>{6049E205-8B5F-4080-B023-70600E51FD64}</ProjectGuid>
86
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>ScriptCs.Core</RootNamespace>
7+
<RootNamespace>ScriptCs.Contracts</RootNamespace>
118
<AssemblyName>ScriptCs.Contracts</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
15-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
16-
<RestorePackages>true</RestorePackages>
17-
</PropertyGroup>
18-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19-
<DebugSymbols>true</DebugSymbols>
20-
<DebugType>full</DebugType>
21-
<Optimize>false</Optimize>
22-
<OutputPath>bin\Debug\</OutputPath>
23-
<DefineConstants>DEBUG;TRACE</DefineConstants>
24-
<ErrorReport>prompt</ErrorReport>
25-
<WarningLevel>4</WarningLevel>
26-
<Prefer32Bit>false</Prefer32Bit>
27-
</PropertyGroup>
28-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29-
<DebugType>pdbonly</DebugType>
30-
<Optimize>true</Optimize>
31-
<OutputPath>bin\Release\</OutputPath>
32-
<DefineConstants>TRACE</DefineConstants>
33-
<ErrorReport>prompt</ErrorReport>
34-
<WarningLevel>4</WarningLevel>
35-
<Prefer32Bit>false</Prefer32Bit>
9+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
3610
</PropertyGroup>
3711
<ItemGroup>
3812
<Reference Include="Roslyn.Compilers, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -56,18 +30,17 @@
5630
<Compile Include="IScriptPack.cs" />
5731
<Compile Include="IScriptPackContext.cs" />
5832
<Compile Include="IScriptPackSession.cs" />
33+
<Compile Include="..\..\common\CommonAssemblyInfo.cs">
34+
<Link>Properties\CommonAssemblyInfo.cs</Link>
35+
</Compile>
36+
<Compile Include="..\..\common\CommonVersionInfo.cs">
37+
<Link>Properties\CommonVersionInfo.cs</Link>
38+
</Compile>
5939
<Compile Include="Properties\AssemblyInfo.cs" />
6040
</ItemGroup>
6141
<ItemGroup>
6242
<None Include="packages.config" />
6343
</ItemGroup>
6444
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6545
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
66-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
67-
Other similar extension points exist, see Microsoft.Common.targets.
68-
<Target Name="BeforeBuild">
69-
</Target>
70-
<Target Name="AfterBuild">
71-
</Target>
72-
-->
7346
</Project>
Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
33

4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
74
[assembly: AssemblyTitle("ScriptCs.Core")]
85
[assembly: AssemblyDescription("")]
9-
[assembly: AssemblyConfiguration("")]
10-
[assembly: AssemblyCompany("")]
11-
[assembly: AssemblyProduct("ScriptCs.Core")]
12-
[assembly: AssemblyCopyright("Copyright © 2013")]
13-
[assembly: AssemblyTrademark("")]
14-
[assembly: AssemblyCulture("")]
156

16-
// Setting ComVisible to false makes the types in this assembly not visible
17-
// to COM components. If you need to access a type in this assembly from
18-
// COM, set the ComVisible attribute to true on that type.
19-
[assembly: ComVisible(false)]
20-
21-
// The following GUID is for the ID of the typelib if this project is exposed to COM
227
[assembly: Guid("4c4ebd22-f4b0-47de-a417-f0a2a127508c")]
23-
24-
// Version information for an assembly consists of the following four values:
25-
//
26-
// Major Version
27-
// Minor Version
28-
// Build Number
29-
// Revision
30-
//
31-
// You can specify all the values or you can default the Build and Revision Numbers
32-
// by using the '*' as shown below:
33-
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.0.0.0")]
35-
[assembly: AssemblyFileVersion("1.0.0.0")]

src/ScriptCs.Core/ScriptCs.Core.csproj

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
3+
<Import Project="..\..\build\ScriptCs.Common.props" />
44
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
75
<ProjectGuid>{E590E710-E159-48E6-A3E6-1A83D3FE732C}</ProjectGuid>
86
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
107
<RootNamespace>ScriptCs</RootNamespace>
118
<AssemblyName>ScriptCs.Core</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
149
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
15-
<RestorePackages>true</RestorePackages>
16-
</PropertyGroup>
17-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<DebugType>pdbonly</DebugType>
28-
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
30-
<DefineConstants>TRACE</DefineConstants>
31-
<ErrorReport>prompt</ErrorReport>
32-
<WarningLevel>4</WarningLevel>
3310
</PropertyGroup>
3411
<ItemGroup>
3512
<Reference Include="NuGet.Core, Version=2.2.31210.9045, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -55,6 +32,12 @@
5532
</ItemGroup>
5633
<ItemGroup>
5734
<Compile Include="Exceptions\MissingAssemblyException.cs" />
35+
<Compile Include="..\..\common\CommonAssemblyInfo.cs">
36+
<Link>Properties\CommonAssemblyInfo.cs</Link>
37+
</Compile>
38+
<Compile Include="..\..\common\CommonVersionInfo.cs">
39+
<Link>Properties\CommonVersionInfo.cs</Link>
40+
</Compile>
5841
<Compile Include="FilePreProcessor.cs" />
5942
<Compile Include="FileSystem.cs" />
6043
<Compile Include="IFilePreProcessor.cs" />
@@ -87,18 +70,11 @@
8770
<None Include="packages.config" />
8871
</ItemGroup>
8972
<ItemGroup>
90-
<ProjectReference Include="..\Scriptcs.Contracts\Scriptcs.Contracts.csproj">
73+
<ProjectReference Include="..\ScriptCs.Contracts\ScriptCs.Contracts.csproj">
9174
<Project>{6049e205-8b5f-4080-b023-70600e51fd64}</Project>
92-
<Name>Scriptcs.Contracts</Name>
75+
<Name>ScriptCs.Contracts</Name>
9376
</ProjectReference>
9477
</ItemGroup>
9578
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
9679
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
97-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
98-
Other similar extension points exist, see Microsoft.Common.targets.
99-
<Target Name="BeforeBuild">
100-
</Target>
101-
<Target Name="AfterBuild">
102-
</Target>
103-
-->
10480
</Project>
Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,10 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
2+
using System.Resources;
33
using System.Runtime.InteropServices;
44

5-
// General Information about an assembly is controlled through the following
6-
// set of attributes. Change these attribute values to modify the information
7-
// associated with an assembly.
85
[assembly: AssemblyTitle("scriptcs")]
96
[assembly: AssemblyDescription("")]
10-
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("ScriptCs")]
13-
[assembly: AssemblyCopyright("Copyright © 2013")]
14-
[assembly: AssemblyTrademark("")]
15-
[assembly: AssemblyCulture("")]
167

17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
20-
[assembly: ComVisible(false)]
21-
22-
// The following GUID is for the ID of the typelib if this project is exposed to COM
238
[assembly: Guid("f624ee58-910a-4541-a46f-afcd3edca9df")]
249

25-
// Version information for an assembly consists of the following four values:
26-
//
27-
// Major Version
28-
// Minor Version
29-
// Build Number
30-
// Revision
31-
//
32-
// You can specify all the values or you can default the Build and Revision Numbers
33-
// by using the '*' as shown below:
34-
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
10+
[assembly: NeutralResourcesLanguage("en-US")]

src/ScriptCs/ScriptCs.csproj

Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
3+
<Import Project="..\..\build\ScriptCs.Common.props" />
44
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
75
<ProjectGuid>{25080671-1A80-4041-B9C7-260578FF4849}</ProjectGuid>
86
<OutputType>Exe</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
107
<RootNamespace>ScriptCs</RootNamespace>
118
<AssemblyName>scriptcs</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
15-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
16-
<RestorePackages>true</RestorePackages>
17-
</PropertyGroup>
18-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19-
<PlatformTarget>AnyCPU</PlatformTarget>
20-
<DebugSymbols>true</DebugSymbols>
21-
<DebugType>full</DebugType>
22-
<Optimize>false</Optimize>
23-
<OutputPath>bin\debug\</OutputPath>
24-
<DefineConstants>DEBUG;TRACE</DefineConstants>
25-
<ErrorReport>prompt</ErrorReport>
26-
<WarningLevel>4</WarningLevel>
27-
<Prefer32Bit>false</Prefer32Bit>
28-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
29-
</PropertyGroup>
30-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
31-
<PlatformTarget>AnyCPU</PlatformTarget>
32-
<DebugType>pdbonly</DebugType>
33-
<Optimize>true</Optimize>
34-
<OutputPath>bin\Release\</OutputPath>
35-
<DefineConstants>TRACE</DefineConstants>
36-
<ErrorReport>prompt</ErrorReport>
37-
<WarningLevel>4</WarningLevel>
38-
<Prefer32Bit>false</Prefer32Bit>
399
</PropertyGroup>
4010
<ItemGroup>
4111
<Reference Include="System" />
@@ -48,29 +18,28 @@
4818
<Reference Include="System.Xml" />
4919
</ItemGroup>
5020
<ItemGroup>
21+
<Compile Include="..\..\common\CommonAssemblyInfo.cs">
22+
<Link>Properties\CommonAssemblyInfo.cs</Link>
23+
</Compile>
24+
<Compile Include="..\..\common\CommonVersionInfo.cs">
25+
<Link>Properties\CommonVersionInfo.cs</Link>
26+
</Compile>
5127
<Compile Include="Program.cs" />
5228
<Compile Include="Properties\AssemblyInfo.cs" />
5329
</ItemGroup>
5430
<ItemGroup>
5531
<None Include="app.config" />
5632
</ItemGroup>
5733
<ItemGroup>
58-
<ProjectReference Include="..\Scriptcs.Contracts\Scriptcs.Contracts.csproj">
34+
<ProjectReference Include="..\ScriptCs.Contracts\ScriptCs.Contracts.csproj">
5935
<Project>{6049e205-8b5f-4080-b023-70600e51fd64}</Project>
60-
<Name>Scriptcs.Contracts</Name>
36+
<Name>ScriptCs.Contracts</Name>
6137
</ProjectReference>
62-
<ProjectReference Include="..\Scriptcs.Core\Scriptcs.Core.csproj">
38+
<ProjectReference Include="..\ScriptCs.Core\ScriptCs.Core.csproj">
6339
<Project>{e590e710-e159-48e6-a3e6-1a83d3fe732c}</Project>
64-
<Name>Scriptcs.Core</Name>
40+
<Name>ScriptCs.Core</Name>
6541
</ProjectReference>
6642
</ItemGroup>
6743
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6844
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
69-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
70-
Other similar extension points exist, see Microsoft.Common.targets.
71-
<Target Name="BeforeBuild">
72-
</Target>
73-
<Target Name="AfterBuild">
74-
</Target>
75-
-->
7645
</Project>

0 commit comments

Comments
 (0)