Skip to content

Commit

Permalink
Convert Common.* to Directory.Build.* (props and targets)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillOsenkov committed Jan 5, 2020
1 parent 27030bd commit ba9be32
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 75 deletions.
59 changes: 0 additions & 59 deletions Common.props

This file was deleted.

25 changes: 25 additions & 0 deletions Directory.Build.props
@@ -0,0 +1,25 @@
<Project>

<PropertyGroup Label="Output directory">
<BinariesFolder>$(SrcRoot)bin</BinariesFolder>
<IntermediateOutputRoot>$(SrcRoot)obj</IntermediateOutputRoot>
<IntermediateOutputPath>$(IntermediateOutputRoot)\$(Configuration)\$(MSBuildProjectName)</IntermediateOutputPath>
<AssemblyInfoPath Condition="'$(AssemblyInfoPath)' == ''">$(IntermediateOutputRoot)\GlobalAssemblyInfo.cs</AssemblyInfoPath>
<CommonOutputDirectory>$(BinariesFolder)\$(Configuration)</CommonOutputDirectory>
<BuildToCommonOutputDirectory Condition="'$(BuildToCommonOutputDirectory)' == ''">true</BuildToCommonOutputDirectory>
<OutputPath Condition="'$(OutputPath)' == ''">$(CommonOutputDirectory)\$(AssemblyName)</OutputPath>
<OutputPath Condition="'$(BuildToCommonOutputDirectory)' == 'true'">$(CommonOutputDirectory)</OutputPath>
<OutDir>$(OutputPath)\</OutDir>
<_FindDependencies>false</_FindDependencies>
</PropertyGroup>

<PropertyGroup Label="Common Properties">
<SignAssembly Condition="'$(SignAssembly)' == ''">false</SignAssembly>
<DefineConstants Condition="'$(SignAssembly)' == 'true'">$(DefineConstants);SIGN;</DefineConstants>
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>$(SrcRoot)\key.snk</AssemblyOriginatorKeyFile>
<DebugType Condition="$(OS) == 'Windows_NT'">embedded</DebugType>
<LangVersion>latest</LangVersion>
</PropertyGroup>

</Project>
3 changes: 1 addition & 2 deletions Common.targets → Directory.Build.targets
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>

<PropertyGroup>
<NuGetExePath>$(SrcRoot)NuGet.exe</NuGetExePath>
Expand Down
4 changes: 2 additions & 2 deletions MSBuildStructuredLog.sln
Expand Up @@ -11,8 +11,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1DA9000E-FE5B-467F-B6CB-2CFA7584ABF7}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
Common.props = Common.props
Common.targets = Common.targets
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
nuget.config = nuget.config
README.md = README.md
version.json = version.json
Expand Down
Expand Up @@ -4,7 +4,6 @@
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<RuntimeIdentifiers>win7-x64;ubuntu.14.04-x64;osx.10.12-x64</RuntimeIdentifiers>
<DebugType Condition="$(OS) == 'Windows_NT'">embedded</DebugType>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 1 addition & 5 deletions src/StructuredLogViewer/StructuredLogViewer.csproj
@@ -1,15 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<SrcRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), Common.props))</SrcRoot>
<TargetFramework>net46</TargetFramework>
<OutputType>WinExe</OutputType>
<Prefer32Bit Condition="$(Prefer32Bit)==''">false</Prefer32Bit>
<ApplicationIcon>StructuredLogger.ico</ApplicationIcon>
<NuspecFileName>MSBuildStructuredLogViewer</NuspecFileName>
<ChocolateyFileName>msbuild-structured-log-viewer</ChocolateyFileName>
<DebugType>embedded</DebugType>
</PropertyGroup>
<Import Project="$(SrcRoot)\Common.props" />
<PropertyGroup>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/StructuredLogger/StructuredLogger.csproj
@@ -1,11 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>StructuredLogger</AssemblyName>
<RootNamespace>Microsoft.Build.Logging.StructuredLogger</RootNamespace>
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
<NBGV_DoNotEmitNonVersionCustomAttributes>true</NBGV_DoNotEmitNonVersionCustomAttributes>
<DebugType>embedded</DebugType>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Expand Down
2 changes: 0 additions & 2 deletions src/TaskRunner/TaskRunner.csproj
Expand Up @@ -3,9 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net46</TargetFramework>
<LangVersion>latest</LangVersion>
<Prefer32Bit>true</Prefer32Bit>
<DebugType>embedded</DebugType>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit ba9be32

Please sign in to comment.