Skip to content

Commit 1757824

Browse files
committed
convert to mvc4 project
1 parent 493705f commit 1757824

11 files changed

+206
-129
lines changed

CQRSGui/App_Start/FilterConfig.cs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System.Web.Mvc;
2+
3+
namespace CQRSGui.App_Start
4+
{
5+
public class FilterConfig
6+
{
7+
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
8+
{
9+
filters.Add(new HandleErrorAttribute());
10+
}
11+
}
12+
}

CQRSGui/App_Start/RouteConfig.cs

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.Web.Mvc;
2+
using System.Web.Routing;
3+
4+
namespace CQRSGui.App_Start
5+
{
6+
public class RouteConfig
7+
{
8+
public static void RegisterRoutes(RouteCollection routes)
9+
{
10+
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
11+
12+
routes.MapRoute(
13+
name: "Default",
14+
url: "{controller}/{action}/{id}",
15+
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
16+
);
17+
}
18+
}
19+
}

CQRSGui/App_Start/WebApiConfig.cs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Web.Http;
2+
3+
namespace CQRSGui.App_Start
4+
{
5+
public static class WebApiConfig
6+
{
7+
public static void Register(HttpConfiguration config)
8+
{
9+
config.Routes.MapHttpRoute(
10+
name: "DefaultApi",
11+
routeTemplate: "api/{controller}/{id}",
12+
defaults: new { id = RouteParameter.Optional }
13+
);
14+
}
15+
}
16+
}

CQRSGui/CQRSGui.csproj

+102-47
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
34
<PropertyGroup>
45
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
56
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
67
<ProductVersion>
78
</ProductVersion>
89
<SchemaVersion>2.0</SchemaVersion>
9-
<ProjectGuid>{29ECBF37-9526-4CB6-8429-D09CF0301C26}</ProjectGuid>
10-
<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
10+
<ProjectGuid>{13825284-2555-4594-B27F-92CE13D31FB3}</ProjectGuid>
11+
<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
1112
<OutputType>Library</OutputType>
1213
<AppDesignerFolder>Properties</AppDesignerFolder>
1314
<RootNamespace>CQRSGui</RootNamespace>
1415
<AssemblyName>CQRSGui</AssemblyName>
15-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
16+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1617
<MvcBuildViews>false</MvcBuildViews>
18+
<UseIISExpress>true</UseIISExpress>
19+
<IISExpressSSLPort />
20+
<IISExpressAnonymousAuthentication />
21+
<IISExpressWindowsAuthentication />
22+
<IISExpressUseClassicPipelineMode />
1723
</PropertyGroup>
1824
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1925
<DebugSymbols>true</DebugSymbols>
@@ -40,29 +46,66 @@
4046
<Reference Include="System.Web.DynamicData" />
4147
<Reference Include="System.Web.Entity" />
4248
<Reference Include="System.Web.ApplicationServices" />
43-
<Reference Include="System.ComponentModel.DataAnnotations">
44-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
45-
</Reference>
46-
<Reference Include="System.Core">
47-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
48-
</Reference>
49-
<Reference Include="System.Data.DataSetExtensions">
50-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
51-
</Reference>
52-
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
53-
<Reference Include="System.Xml.Linq">
54-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
55-
</Reference>
49+
<Reference Include="System.ComponentModel.DataAnnotations" />
50+
<Reference Include="System.Core" />
51+
<Reference Include="System.Data.DataSetExtensions" />
52+
<Reference Include="System.Xml.Linq" />
5653
<Reference Include="System.Web" />
57-
<Reference Include="System.Web.Extensions">
58-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
59-
</Reference>
54+
<Reference Include="System.Web.Extensions" />
6055
<Reference Include="System.Web.Abstractions" />
6156
<Reference Include="System.Web.Routing" />
6257
<Reference Include="System.Xml" />
6358
<Reference Include="System.Configuration" />
6459
<Reference Include="System.Web.Services" />
6560
<Reference Include="System.EnterpriseServices" />
61+
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
62+
<Private>True</Private>
63+
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
64+
</Reference>
65+
<Reference Include="Microsoft.Web.Mvc.FixedDisplayModes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66+
<Private>True</Private>
67+
<HintPath>..\packages\Microsoft.AspNet.Mvc.FixedDisplayModes.1.0.0\lib\net40\Microsoft.Web.Mvc.FixedDisplayModes.dll</HintPath>
68+
</Reference>
69+
<Reference Include="Newtonsoft.Json">
70+
<HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
71+
</Reference>
72+
<Reference Include="System.Net.Http">
73+
</Reference>
74+
<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.4.0.20710.0\lib\net40\System.Net.Http.Formatting.dll</HintPath>
76+
</Reference>
77+
<Reference Include="System.Net.Http.WebRequest">
78+
</Reference>
79+
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
80+
<Private>True</Private>
81+
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
82+
</Reference>
83+
<Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll</HintPath>
85+
</Reference>
86+
<Reference Include="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
87+
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.20710.0\lib\net40\System.Web.Http.WebHost.dll</HintPath>
88+
</Reference>
89+
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
90+
<Private>True</Private>
91+
<HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll</HintPath>
92+
</Reference>
93+
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
94+
<Private>True</Private>
95+
<HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20715.0\lib\net40\System.Web.Razor.dll</HintPath>
96+
</Reference>
97+
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
98+
<Private>True</Private>
99+
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
100+
</Reference>
101+
<Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
102+
<Private>True</Private>
103+
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
104+
</Reference>
105+
<Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
106+
<Private>True</Private>
107+
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
108+
</Reference>
66109
</ItemGroup>
67110
<ItemGroup>
68111
<Compile Include="Controllers\HomeController.cs" />
@@ -73,66 +116,72 @@
73116
<Compile Include="ServiceLocator.cs" />
74117
</ItemGroup>
75118
<ItemGroup>
119+
<Compile Include="App_Start\FilterConfig.cs" />
120+
<Compile Include="App_Start\RouteConfig.cs" />
121+
<Compile Include="App_Start\WebApiConfig.cs" />
122+
<Content Include="Content\Site.css" />
76123
<Content Include="Global.asax" />
124+
<None Include="Scripts\jquery-1.4.1-vsdoc.js" />
125+
<Content Include="Scripts\jquery-1.4.1.js" />
126+
<Content Include="Scripts\jquery-1.4.1.min.js" />
127+
<None Include="Scripts\jquery.validate-vsdoc.js" />
128+
<Content Include="Scripts\jquery.validate.js" />
129+
<Content Include="Scripts\jquery.validate.min.js" />
130+
<Content Include="Scripts\MicrosoftAjax.debug.js" />
131+
<Content Include="Scripts\MicrosoftAjax.js" />
132+
<Content Include="Scripts\MicrosoftMvcAjax.debug.js" />
133+
<Content Include="Scripts\MicrosoftMvcAjax.js" />
134+
<Content Include="Scripts\MicrosoftMvcValidation.debug.js" />
135+
<Content Include="Scripts\MicrosoftMvcValidation.js" />
77136
<Content Include="Views\Home\Add.aspx" />
78137
<Content Include="Views\Home\ChangeName.aspx" />
79138
<Content Include="Views\Home\CheckIn.aspx" />
80139
<Content Include="Views\Home\Details.aspx" />
140+
<Content Include="Views\Home\Index.aspx" />
81141
<Content Include="Views\Home\Remove.aspx" />
142+
<Content Include="Views\Shared\Error.aspx" />
82143
<Content Include="Web.config" />
83144
<Content Include="Web.Debug.config">
84145
<DependentUpon>Web.config</DependentUpon>
85146
</Content>
86147
<Content Include="Web.Release.config">
87148
<DependentUpon>Web.config</DependentUpon>
88149
</Content>
89-
<Content Include="Content\Site.css" />
90-
<Content Include="Scripts\jquery-1.4.1.js" />
91-
<Content Include="Scripts\jquery-1.4.1.min.js" />
92-
<Content Include="Scripts\jquery-1.4.1-vsdoc.js" />
93-
<Content Include="Scripts\jquery.validate.js" />
94-
<Content Include="Scripts\jquery.validate.min.js" />
95-
<Content Include="Scripts\jquery.validate-vsdoc.js" />
96-
<Content Include="Scripts\MicrosoftAjax.js" />
97-
<Content Include="Scripts\MicrosoftAjax.debug.js" />
98-
<Content Include="Scripts\MicrosoftMvcAjax.js" />
99-
<Content Include="Scripts\MicrosoftMvcAjax.debug.js" />
100-
<Content Include="Scripts\MicrosoftMvcValidation.js" />
101-
<Content Include="Scripts\MicrosoftMvcValidation.debug.js" />
102-
<Content Include="Views\Home\Index.aspx" />
103-
<Content Include="Views\Shared\Error.aspx" />
104-
<Content Include="Views\Shared\Site.Master" />
105150
<Content Include="Views\Web.config" />
151+
<Content Include="Views\Shared\Site.Master" />
106152
</ItemGroup>
107153
<ItemGroup>
108154
<Folder Include="App_Data\" />
109155
<Folder Include="Models\" />
110156
</ItemGroup>
157+
<ItemGroup>
158+
<Content Include="packages.config" />
159+
</ItemGroup>
111160
<ItemGroup>
112161
<ProjectReference Include="..\SimpleCQRS\SimpleCQRS.csproj">
113-
<Project>{DAFD2A8A-D6B0-4433-8DDF-B98460C64EC6}</Project>
162+
<Project>{dafd2a8a-d6b0-4433-8ddf-b98460c64ec6}</Project>
114163
<Name>SimpleCQRS</Name>
115164
</ProjectReference>
116165
</ItemGroup>
166+
<PropertyGroup>
167+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
168+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
169+
</PropertyGroup>
117170
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
118-
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
119-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
120-
Other similar extension points exist, see Microsoft.Common.targets.
121-
<Target Name="BeforeBuild">
122-
</Target> -->
123-
<Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
124-
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
171+
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
172+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
173+
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
174+
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
125175
</Target>
126176
<ProjectExtensions>
127177
<VisualStudio>
128178
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
129179
<WebProjectProperties>
130-
<UseIIS>False</UseIIS>
180+
<UseIIS>True</UseIIS>
131181
<AutoAssignPort>True</AutoAssignPort>
132-
<DevelopmentServerPort>52410</DevelopmentServerPort>
182+
<DevelopmentServerPort>0</DevelopmentServerPort>
133183
<DevelopmentServerVPath>/</DevelopmentServerVPath>
134-
<IISUrl>
135-
</IISUrl>
184+
<IISUrl>http://localhost:59319/</IISUrl>
136185
<NTLMAuthentication>False</NTLMAuthentication>
137186
<UseCustomServer>False</UseCustomServer>
138187
<CustomServerUrl>
@@ -142,4 +191,10 @@
142191
</FlavorProperties>
143192
</VisualStudio>
144193
</ProjectExtensions>
194+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
195+
Other similar extension points exist, see Microsoft.Common.targets.
196+
<Target Name="BeforeBuild">
197+
</Target>
198+
<Target Name="AfterBuild">
199+
</Target> -->
145200
</Project>

CQRSGui/Properties/AssemblyInfo.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("CQRSGui")]
8+
[assembly: AssemblyTitle("CqrsMvcGui")]
99
[assembly: AssemblyDescription("")]
1010
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("Microsoft")]
12-
[assembly: AssemblyProduct("CQRSGui")]
13-
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("CqrsMvcGui")]
13+
[assembly: AssemblyCopyright("Copyright © 2013")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -20,7 +20,7 @@
2020
[assembly: ComVisible(false)]
2121

2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
23-
[assembly: Guid("608117cf-f424-47eb-a480-05e10627b5f6")]
23+
[assembly: Guid("9b97c9aa-84ff-45bb-9d1b-2e4929d40cbf")]
2424

2525
// Version information for an assembly consists of the following four values:
2626
//

CQRSGui/Views/Web.config

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
-->
1616
<pages
1717
validateRequest="false"
18-
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
19-
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
20-
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
18+
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
19+
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
20+
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
2121
<controls>
2222
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
2323
</controls>

CQRSGui/Web.Debug.config

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22

3-
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
3+
<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
44

55
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
66
<!--
@@ -17,7 +17,7 @@
1717
<system.web>
1818
<!--
1919
In the example below, the "Replace" transform will replace the entire
20-
<customErrors> section of your web.config file.
20+
<customErrors> section of your Web.config file.
2121
Note that because there is only one customErrors section under the
2222
<system.web> node, there is no need to use the "xdt:Locator" attribute.
2323

CQRSGui/Web.Release.config

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22

3-
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
3+
<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
44

55
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
66
<!--
@@ -18,7 +18,7 @@
1818
<compilation xdt:Transform="RemoveAttributes(debug)" />
1919
<!--
2020
In the example below, the "Replace" transform will replace the entire
21-
<customErrors> section of your web.config file.
21+
<customErrors> section of your Web.config file.
2222
Note that because there is only one customErrors section under the
2323
<system.web> node, there is no need to use the "xdt:Locator" attribute.
2424

0 commit comments

Comments
 (0)