diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-15 08:25:03 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-15 08:25:03 -0800 |
commit | 8798d73cc77615ee4f71a54a0b3f1480dc45f751 (patch) | |
tree | 2f335624b8494fb6989feddcc2dca40fb214ba5a | |
parent | c1ea54f5fb761f388593a484510fc29118a844b5 (diff) | |
download | DotNetOpenAuth-8798d73cc77615ee4f71a54a0b3f1480dc45f751.zip DotNetOpenAuth-8798d73cc77615ee4f71a54a0b3f1480dc45f751.tar.gz DotNetOpenAuth-8798d73cc77615ee4f71a54a0b3f1480dc45f751.tar.bz2 |
Made downgrading ASP.NET MVC versions an opt-in step.
-rw-r--r-- | build.proj | 3 | ||||
-rw-r--r-- | lib/DotNetOpenAuth.BuildTasks.dll | bin | 65536 -> 65536 bytes | |||
-rw-r--r-- | lib/DotNetOpenAuth.BuildTasks.pdb | bin | 165376 -> 165376 bytes | |||
-rw-r--r-- | src/DotNetOpenAuth.BuildTasks/DowngradeProjects.cs | 15 |
4 files changed, 13 insertions, 5 deletions
@@ -269,6 +269,7 @@ <DowngradeProjects Projects="@(ProjectTemplates2008Layout)" Condition="'%(Extension)' == '.csproj'" + DowngradeMvc2ToMvc1="true" /> <DiscoverProjectTemplates TopLevelTemplates="@(TopLevelVS2008ProjectTemplates)"> @@ -563,7 +564,7 @@ AddReferences="Microsoft.Contracts"/> <ChangeProjectReferenceToAssemblyReference Projects="@(SampleProjectTargets)" ProjectReference="..\..\src\$(ProductName)\$(ProductName).csproj" Reference="..\..\Bin\$(ProductName).dll" /> - <DowngradeProjects Projects="@(SampleProjectTargets);@(SampleSolutionTargets)" /> + <DowngradeProjects Projects="@(SampleProjectTargets);@(SampleSolutionTargets)" DowngradeMvc2ToMvc1="true" /> </Target> <Target Name="Drop" DependsOnTargets="DropLayout"> diff --git a/lib/DotNetOpenAuth.BuildTasks.dll b/lib/DotNetOpenAuth.BuildTasks.dll Binary files differindex 2897bea..f3a61b3 100644 --- a/lib/DotNetOpenAuth.BuildTasks.dll +++ b/lib/DotNetOpenAuth.BuildTasks.dll diff --git a/lib/DotNetOpenAuth.BuildTasks.pdb b/lib/DotNetOpenAuth.BuildTasks.pdb Binary files differindex 8a7acea..091c3ca 100644 --- a/lib/DotNetOpenAuth.BuildTasks.pdb +++ b/lib/DotNetOpenAuth.BuildTasks.pdb diff --git a/src/DotNetOpenAuth.BuildTasks/DowngradeProjects.cs b/src/DotNetOpenAuth.BuildTasks/DowngradeProjects.cs index 7c7ca79..645522d 100644 --- a/src/DotNetOpenAuth.BuildTasks/DowngradeProjects.cs +++ b/src/DotNetOpenAuth.BuildTasks/DowngradeProjects.cs @@ -25,6 +25,11 @@ namespace DotNetOpenAuth.BuildTasks { public ITaskItem[] Projects { get; set; } /// <summary> + /// Gets or sets a value indicating whether ASP.NET MVC 2 projects are downgraded to MVC 1.0. + /// </summary> + public bool DowngradeMvc2ToMvc1 { get; set; } + + /// <summary> /// Executes this instance. /// </summary> public override bool Execute() { @@ -36,10 +41,12 @@ namespace DotNetOpenAuth.BuildTasks { project.Load(taskItem.ItemSpec); project.DefaultToolsVersion = "3.5"; - string projectTypeGuids = project.GetEvaluatedProperty("ProjectTypeGuids"); - if (!string.IsNullOrEmpty(projectTypeGuids)) { - projectTypeGuids = projectTypeGuids.Replace("{F85E285D-A4E0-4152-9332-AB1D724D3325}", "{603c0e0b-db56-11dc-be95-000d561079b0}"); - project.SetProperty("ProjectTypeGuids", projectTypeGuids); + if (this.DowngradeMvc2ToMvc1) { + string projectTypeGuids = project.GetEvaluatedProperty("ProjectTypeGuids"); + if (!string.IsNullOrEmpty(projectTypeGuids)) { + projectTypeGuids = projectTypeGuids.Replace("{F85E285D-A4E0-4152-9332-AB1D724D3325}", "{603c0e0b-db56-11dc-be95-000d561079b0}"); + project.SetProperty("ProjectTypeGuids", projectTypeGuids); + } } // Web projects usually have an import that includes these substrings |