Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Commit

Permalink
Fixed sample project downgrade to remove EnlistmentInfo imports that …
Browse files Browse the repository at this point in the history
…aren't supported in MSBuild v3.5.
  • Loading branch information
AArnott committed Jul 22, 2010
1 parent 4a53c8f commit a361808
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Binary file modified lib/DotNetOpenAuth.BuildTasks.dll
Binary file not shown.
Binary file modified lib/DotNetOpenAuth.BuildTasks.pdb
Binary file not shown.
2 changes: 2 additions & 0 deletions src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.sln
Expand Up @@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\..\tools\DotNetOpenAuth.targets = ..\..\tools\DotNetOpenAuth.targets
..\..\tools\DotNetOpenAuth.Versioning.targets = ..\..\tools\DotNetOpenAuth.Versioning.targets
..\..\tools\drop.proj = ..\..\tools\drop.proj
..\..\EnlistmentInfo.props = ..\..\EnlistmentInfo.props
..\..\EnlistmentInfo.targets = ..\..\EnlistmentInfo.targets
..\..\tools\ohloh.proj = ..\..\tools\ohloh.proj
..\..\projecttemplates\projecttemplates.proj = ..\..\projecttemplates\projecttemplates.proj
..\..\samples\Samples.proj = ..\..\samples\Samples.proj
Expand Down
6 changes: 5 additions & 1 deletion src/DotNetOpenAuth.BuildTasks/DowngradeProjects.cs
Expand Up @@ -49,7 +49,11 @@ public class DowngradeProjects : Task {
}
}

// Web projects usually have an import that includes these substrings
// MSBuild v3.5 doesn't support the GetDirectoryNameOfFileAbove function
var enlistmentInfoImports = project.Imports.Cast<Import>().Where(i => i.ProjectPath.IndexOf("[MSBuild]::GetDirectoryNameOfFileAbove", StringComparison.OrdinalIgnoreCase) >= 0);
enlistmentInfoImports.ToList().ForEach(i => project.Imports.RemoveImport(i));

// Web projects usually have an import that includes these substrings));)
foreach (Import import in project.Imports) {
import.ProjectPath = import.ProjectPath
.Replace("$(MSBuildExtensionsPath32)", "$(MSBuildExtensionsPath)")
Expand Down

0 comments on commit a361808

Please sign in to comment.