Skip to content

Commit 7aaf665

Browse files
committed
Updating to Microsoft.AspNet.Mvc package rather than the legacy one (this includes having the RTM version of MVC4)
1 parent 9103a95 commit 7aaf665

71 files changed

Lines changed: 205 additions & 32169 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ _ReSharper*
1212
*.log
1313
*/NUnit*/tools
1414
*/NhibernateProfiler*/tools
15+
packages

.nuget/NuGet.Config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
</configuration>

.nuget/NuGet.exe

635 KB
Binary file not shown.

.nuget/NuGet.targets

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
5+
6+
<!-- Enable the restore command to run before builds -->
7+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
8+
9+
<!-- Property that enables building a package from a project -->
10+
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
11+
12+
<!-- Determines if package restore consent is required to restore packages -->
13+
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
14+
15+
<!-- Download NuGet.exe if it does not already exist -->
16+
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
17+
</PropertyGroup>
18+
19+
<ItemGroup Condition=" '$(PackageSources)' == '' ">
20+
<!-- Package sources used to restore packages. By default will used the registered sources under %APPDATA%\NuGet\NuGet.Config -->
21+
<!--
22+
<PackageSource Include="https://nuget.org/api/v2/" />
23+
<PackageSource Include="https://my-nuget-source/nuget/" />
24+
-->
25+
</ItemGroup>
26+
27+
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
28+
<!-- Windows specific commands -->
29+
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
30+
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
31+
</PropertyGroup>
32+
33+
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
34+
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
35+
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
36+
<PackagesConfig>packages.config</PackagesConfig>
37+
</PropertyGroup>
38+
39+
<PropertyGroup>
40+
<!-- NuGet command -->
41+
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
42+
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
43+
44+
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
45+
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
46+
47+
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
48+
49+
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
50+
<!-- Commands -->
51+
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDir) "</RestoreCommand>
52+
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
53+
54+
<!-- We need to ensure packages are restored prior to assembly resolve -->
55+
<ResolveReferencesDependsOn Condition="$(RestorePackages) == 'true'">
56+
RestorePackages;
57+
$(ResolveReferencesDependsOn);
58+
</ResolveReferencesDependsOn>
59+
60+
<!-- Make the build depend on restore packages -->
61+
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
62+
$(BuildDependsOn);
63+
BuildPackage;
64+
</BuildDependsOn>
65+
</PropertyGroup>
66+
67+
<Target Name="CheckPrerequisites">
68+
<!-- Raise an error if we're unable to locate nuget.exe -->
69+
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
70+
<SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
71+
<!--
72+
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
73+
This effectively acts as a lock that makes sure that the download operation will only happen once and all
74+
parallel builds will have to wait for it to complete.
75+
-->
76+
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
77+
</Target>
78+
79+
<Target Name="_DownloadNuGet">
80+
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
81+
</Target>
82+
83+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
84+
<Exec Command="$(RestoreCommand)"
85+
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
86+
87+
<Exec Command="$(RestoreCommand)"
88+
LogStandardErrorAsError="true"
89+
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
90+
</Target>
91+
92+
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
93+
<Exec Command="$(BuildCommand)"
94+
Condition=" '$(OS)' != 'Windows_NT' " />
95+
96+
<Exec Command="$(BuildCommand)"
97+
LogStandardErrorAsError="true"
98+
Condition=" '$(OS)' == 'Windows_NT' " />
99+
</Target>
100+
101+
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
102+
<ParameterGroup>
103+
<OutputFilename ParameterType="System.String" Required="true" />
104+
</ParameterGroup>
105+
<Task>
106+
<Reference Include="System.Core" />
107+
<Using Namespace="System" />
108+
<Using Namespace="System.IO" />
109+
<Using Namespace="System.Net" />
110+
<Using Namespace="Microsoft.Build.Framework" />
111+
<Using Namespace="Microsoft.Build.Utilities" />
112+
<Code Type="Fragment" Language="cs">
113+
<![CDATA[
114+
try {
115+
OutputFilename = Path.GetFullPath(OutputFilename);
116+
117+
Log.LogMessage("Downloading latest version of NuGet.exe...");
118+
WebClient webClient = new WebClient();
119+
webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
120+
121+
return true;
122+
}
123+
catch (Exception ex) {
124+
Log.LogErrorFromException(ex);
125+
return false;
126+
}
127+
]]>
128+
</Code>
129+
</Task>
130+
</UsingTask>
131+
132+
<UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
133+
<ParameterGroup>
134+
<EnvKey ParameterType="System.String" Required="true" />
135+
<EnvValue ParameterType="System.String" Required="true" />
136+
</ParameterGroup>
137+
<Task>
138+
<Using Namespace="System" />
139+
<Code Type="Fragment" Language="cs">
140+
<![CDATA[
141+
try {
142+
Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
143+
}
144+
catch {
145+
}
146+
]]>
147+
</Code>
148+
</Task>
149+
</UsingTask>
150+
</Project>

FluentMVCTesting.Mvc3/FluentMVCTesting.Mvc3.csproj

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<AssemblyName>FluentMVCTesting.Mvc3</AssemblyName>
1313
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
15+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
16+
<RestorePackages>true</RestorePackages>
1517
</PropertyGroup>
1618
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1719
<DebugSymbols>true</DebugSymbols>
@@ -46,27 +48,27 @@
4648
<Reference Include="System.Web" />
4749
<Reference Include="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
4850
<Private>True</Private>
49-
<HintPath>..\packages\AspNetWebPages.Core.1.0.20105.407\lib\net40\System.Web.Helpers.dll</HintPath>
51+
<HintPath>..\packages\Microsoft.AspNet.WebPages.1.0.20105.408\lib\net40\System.Web.Helpers.dll</HintPath>
5052
</Reference>
5153
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5254
<Private>True</Private>
53-
<HintPath>..\packages\AspNetMvc.3.0.20105.0\lib\net40\System.Web.Mvc.dll</HintPath>
55+
<HintPath>..\packages\Microsoft.AspNet.Mvc.3.0.20105.1\lib\net40\System.Web.Mvc.dll</HintPath>
5456
</Reference>
5557
<Reference Include="System.Web.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5658
<Private>True</Private>
57-
<HintPath>..\packages\AspNetRazor.Core.1.0.20105.407\lib\net40\System.Web.Razor.dll</HintPath>
59+
<HintPath>..\packages\Microsoft.AspNet.Razor.1.0.20105.408\lib\net40\System.Web.Razor.dll</HintPath>
5860
</Reference>
5961
<Reference Include="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6062
<Private>True</Private>
61-
<HintPath>..\packages\AspNetWebPages.Core.1.0.20105.407\lib\net40\System.Web.WebPages.dll</HintPath>
63+
<HintPath>..\packages\Microsoft.AspNet.WebPages.1.0.20105.408\lib\net40\System.Web.WebPages.dll</HintPath>
6264
</Reference>
6365
<Reference Include="System.Web.WebPages.Deployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6466
<Private>True</Private>
65-
<HintPath>..\packages\AspNetWebPages.Core.1.0.20105.407\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
67+
<HintPath>..\packages\Microsoft.AspNet.WebPages.1.0.20105.408\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
6668
</Reference>
6769
<Reference Include="System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6870
<Private>True</Private>
69-
<HintPath>..\packages\AspNetWebPages.Core.1.0.20105.407\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
71+
<HintPath>..\packages\Microsoft.AspNet.WebPages.1.0.20105.408\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
7072
</Reference>
7173
<Reference Include="System.Xml.Linq" />
7274
<Reference Include="System.Data.DataSetExtensions" />
@@ -103,6 +105,7 @@
103105
<None Include="packages.config" />
104106
</ItemGroup>
105107
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
108+
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
106109
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
107110
Other similar extension points exist, see Microsoft.Common.targets.
108111
<Target Name="BeforeBuild">
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="AspNetMvc" version="3.0.20105.0" />
4-
<package id="AspNetRazor.Core" version="1.0.20105.407" />
5-
<package id="AspNetWebPages.Core" version="1.0.20105.407" />
6-
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
3+
<package id="Microsoft.AspNet.Mvc" version="3.0.20105.1" targetFramework="net40" />
4+
<package id="Microsoft.AspNet.Razor" version="1.0.20105.408" targetFramework="net40" />
5+
<package id="Microsoft.AspNet.WebPages" version="1.0.20105.408" targetFramework="net40" />
6+
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
77
</packages>

FluentMVCTesting.Tests/FluentMVCTesting.Tests.csproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<AssemblyName>FluentMVCTesting.Tests</AssemblyName>
1313
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
15+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
16+
<RestorePackages>true</RestorePackages>
1517
</PropertyGroup>
1618
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1719
<DebugSymbols>true</DebugSymbols>
@@ -46,30 +48,27 @@
4648
<Reference Include="System.Web" />
4749
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
4850
<Private>True</Private>
49-
<HintPath>..\packages\AspNetWebPages.Core.2.0.20126.16343\lib\net40\System.Web.Helpers.dll</HintPath>
50-
</Reference>
51-
<Reference Include="System.Web.Http.Common">
52-
<HintPath>..\packages\System.Web.Http.Common.4.0.20126.16343\lib\net40\System.Web.Http.Common.dll</HintPath>
51+
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
5352
</Reference>
5453
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5554
<Private>True</Private>
56-
<HintPath>..\packages\AspNetMvc.4.0.20126.16343\lib\net40\System.Web.Mvc.dll</HintPath>
55+
<HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll</HintPath>
5756
</Reference>
5857
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5958
<Private>True</Private>
60-
<HintPath>..\packages\AspNetRazor.Core.2.0.20126.16343\lib\net40\System.Web.Razor.dll</HintPath>
59+
<HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20715.0\lib\net40\System.Web.Razor.dll</HintPath>
6160
</Reference>
6261
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6362
<Private>True</Private>
64-
<HintPath>..\packages\AspNetWebPages.Core.2.0.20126.16343\lib\net40\System.Web.WebPages.dll</HintPath>
63+
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
6564
</Reference>
6665
<Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6766
<Private>True</Private>
68-
<HintPath>..\packages\AspNetWebPages.Core.2.0.20126.16343\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
67+
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
6968
</Reference>
7069
<Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7170
<Private>True</Private>
72-
<HintPath>..\packages\AspNetWebPages.Core.2.0.20126.16343\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
71+
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
7372
</Reference>
7473
<Reference Include="System.Xml.Linq" />
7574
<Reference Include="System.Data.DataSetExtensions" />
@@ -97,6 +96,7 @@
9796
</ProjectReference>
9897
</ItemGroup>
9998
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
99+
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
100100
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
101101
Other similar extension points exist, see Microsoft.Common.targets.
102102
<Target Name="BeforeBuild">
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="AspNetMvc" version="4.0.20126.16343" />
4-
<package id="AspNetRazor.Core" version="2.0.20126.16343" />
5-
<package id="AspNetWebPages.Core" version="2.0.20126.16343" />
6-
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
3+
<package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net40" />
4+
<package id="Microsoft.AspNet.Razor" version="2.0.20715.0" targetFramework="net40" />
5+
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net40" />
6+
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
77
<package id="NSubstitute" version="1.4.0.0" />
88
<package id="NUnit" version="2.6.0.12054" />
9-
<package id="System.Web.Http.Common" version="4.0.20126.16343" />
109
</packages>

FluentMVCTesting.sln

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
Microsoft Visual Studio Solution File, Format Version 11.00
3-
# Visual Studio 2010
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
44
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentMVCTesting", "FluentMVCTesting\FluentMVCTesting.csproj", "{152CA00F-18D3-4CF5-8CA0-2C5B70CBEA19}"
55
EndProject
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentMVCTesting.Tests", "FluentMVCTesting.Tests\FluentMVCTesting.Tests.csproj", "{4DCC907C-A08A-4139-BB6B-2D34B21F318B}"
@@ -14,6 +14,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution
1414
README.md = README.md
1515
EndProjectSection
1616
EndProject
17+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{EC0FFD15-639A-4B63-94EB-FCA8CC899547}"
18+
ProjectSection(SolutionItems) = preProject
19+
.nuget\NuGet.Config = .nuget\NuGet.Config
20+
.nuget\NuGet.exe = .nuget\NuGet.exe
21+
.nuget\NuGet.targets = .nuget\NuGet.targets
22+
EndProjectSection
23+
EndProject
1724
Global
1825
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1926
Debug|Any CPU = Debug|Any CPU

0 commit comments

Comments
 (0)