summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-01-08 08:50:45 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2010-01-08 08:51:09 -0800
commite30890023e669748386a43568cdba120e4d6f058 (patch)
tree26eb7846b9d88a9e372ef67979fd056b2cf59b20 /src
parent2c163cc85e7144155363a1da06c8660471cd7f4f (diff)
downloadDotNetOpenAuth-e30890023e669748386a43568cdba120e4d6f058.zip
DotNetOpenAuth-e30890023e669748386a43568cdba120e4d6f058.tar.gz
DotNetOpenAuth-e30890023e669748386a43568cdba120e4d6f058.tar.bz2
Remodeled some of our build scripts after the new VC project system's .props and .targets pattern.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.BuildTasks/FixupShippingToolSamples.cs18
-rw-r--r--src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj13
-rw-r--r--src/DotNetOpenAuth/DotNetOpenAuth.csproj17
3 files changed, 22 insertions, 26 deletions
diff --git a/src/DotNetOpenAuth.BuildTasks/FixupShippingToolSamples.cs b/src/DotNetOpenAuth.BuildTasks/FixupShippingToolSamples.cs
index 92b0235..a6088c9 100644
--- a/src/DotNetOpenAuth.BuildTasks/FixupShippingToolSamples.cs
+++ b/src/DotNetOpenAuth.BuildTasks/FixupShippingToolSamples.cs
@@ -7,12 +7,12 @@
namespace DotNetOpenAuth.BuildTasks {
using System;
using System.Collections.Generic;
+ using System.IO;
using System.Linq;
using System.Text;
- using Microsoft.Build.Utilities;
- using Microsoft.Build.Framework;
- using System.IO;
using Microsoft.Build.BuildEngine;
+ using Microsoft.Build.Framework;
+ using Microsoft.Build.Utilities;
/// <summary>
/// Removes imports that only apply when a shipping tool sample builds as part of
@@ -22,6 +22,8 @@ namespace DotNetOpenAuth.BuildTasks {
[Required]
public ITaskItem[] Projects { get; set; }
+ public string[] RemoveImportsStartingWith { get; set; }
+
/// <summary>
/// Executes this instance.
/// </summary>
@@ -34,10 +36,12 @@ namespace DotNetOpenAuth.BuildTasks {
Uri projectUri = new Uri(projectTaskItem.GetMetadata("FullPath"));
project.Load(projectTaskItem.ItemSpec, ProjectLoadSettings.IgnoreMissingImports);
- project.Imports.Cast<Import>()
- .Where(import => import.ProjectPath.StartsWith(@"..\..\tools\", StringComparison.OrdinalIgnoreCase))
- .ToList()
- .ForEach(import => project.Imports.RemoveImport(import));
+ if (this.RemoveImportsStartingWith != null && this.RemoveImportsStartingWith.Length > 0) {
+ project.Imports.Cast<Import>()
+ .Where(import => this.RemoveImportsStartingWith.Any(start => import.ProjectPath.StartsWith(start, StringComparison.OrdinalIgnoreCase)))
+ .ToList()
+ .ForEach(import => project.Imports.RemoveImport(import));
+ }
project.Save(projectTaskItem.ItemSpec);
}
diff --git a/src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj b/src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj
index d15897b..48a43db 100644
--- a/src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj
+++ b/src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj
@@ -1,8 +1,11 @@
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\..\tools\DotNetOpenAuth.props" />
<PropertyGroup>
+ <ProjectRoot Condition="'$(ProjectRoot)' == ''">$(MSBuildProjectDirectory)\..\..\</ProjectRoot>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ </PropertyGroup>
+ <Import Project="$(ProjectRoot)tools\DotNetOpenAuth.props" />
+ <PropertyGroup>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{4376ECC9-C346-4A99-B13C-FA93C0FBD2C9}</ProjectGuid>
@@ -18,7 +21,6 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -51,7 +53,6 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -81,12 +82,8 @@
<CodeContractsRunInBackground>True</CodeContractsRunInBackground>
<CodeContractsShowSquigglies>False</CodeContractsShowSquigglies>
</PropertyGroup>
- <PropertyGroup>
- <SignAssembly>true</SignAssembly>
- </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'CodeAnalysis|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>..\..\bin\CodeAnalysis\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -336,5 +333,5 @@
<Folder Include="OpenId\UI\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\..\tools\DotNetOpenAuth.targets" />
+ <Import Project="$(ProjectRoot)tools\DotNetOpenAuth.targets" />
</Project>
diff --git a/src/DotNetOpenAuth/DotNetOpenAuth.csproj b/src/DotNetOpenAuth/DotNetOpenAuth.csproj
index 6f9da18..6c802c0 100644
--- a/src/DotNetOpenAuth/DotNetOpenAuth.csproj
+++ b/src/DotNetOpenAuth/DotNetOpenAuth.csproj
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\..\tools\DotNetOpenAuth.props" />
<PropertyGroup>
+ <ProjectRoot Condition="'$(ProjectRoot)' == ''">$(MSBuildProjectDirectory)\..\..\</ProjectRoot>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ </PropertyGroup>
+ <Import Project="$(ProjectRoot)tools\DotNetOpenAuth.props" />
+ <PropertyGroup>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{3191B653-F76D-4C1A-9A5A-347BC3AAAAB7}</ProjectGuid>
@@ -19,17 +22,16 @@ Code licensed under the Ms-PL License:
http://opensource.org/licenses/ms-pl.html
</StandardCopyright>
<ApplicationIcon>DotNetOpenAuth.ico</ApplicationIcon>
+ <DocumentationFile>$(OutputPath)DotNetOpenAuth.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>..\..\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- <DocumentationFile>..\..\bin\Debug\DotNetOpenAuth.xml</DocumentationFile>
<RunCodeAnalysis>false</RunCodeAnalysis>
<CodeAnalysisRules>-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055</CodeAnalysisRules>
<CodeContractsEnableRuntimeChecking>True</CodeContractsEnableRuntimeChecking>
@@ -64,12 +66,10 @@ http://opensource.org/licenses/ms-pl.html
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- <DocumentationFile>..\..\bin\Release\DotNetOpenAuth.xml</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRules>-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055</CodeAnalysisRules>
<CodeContractsEnableRuntimeChecking>True</CodeContractsEnableRuntimeChecking>
@@ -101,14 +101,9 @@ http://opensource.org/licenses/ms-pl.html
<CodeContractsRedundantAssumptions>False</CodeContractsRedundantAssumptions>
<CodeContractsReferenceAssembly>Build</CodeContractsReferenceAssembly>
</PropertyGroup>
- <PropertyGroup>
- <SignAssembly>true</SignAssembly>
- </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'CodeAnalysis|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
- <OutputPath>..\..\bin\CodeAnalysis\</OutputPath>
<DefineConstants>$(DefineConstants);CONTRACTS_FULL;DEBUG;TRACE</DefineConstants>
- <DocumentationFile>..\..\bin\CodeAnalysis\DotNetOpenAuth.xml</DocumentationFile>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisRules>-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055</CodeAnalysisRules>
@@ -689,5 +684,5 @@ http://opensource.org/licenses/ms-pl.html
<Content Include="DotNetOpenAuth.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\..\tools\DotNetOpenAuth.targets" />
+ <Import Project="$(ProjectRoot)tools\DotNetOpenAuth.targets" />
</Project>