Skip to content

Commit fa78768

Browse files
committed
Updated to ASP.NET MVC 6 beta-4
1 parent e56c9be commit fa78768

File tree

11 files changed

+34
-32
lines changed

11 files changed

+34
-32
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ src/React.Sample.Webpack/build
1010
*.generated.js
1111
*.generated.js.map
1212
src/React.Sample.Mvc6/wwwroot/js/Sample.js
13+
*.lock.json
1314

1415
## Ignore Visual Studio temporary files, build results, and
1516
## files generated by popular Visual Studio add-ons.

src/React.AspNet/AspNetFileSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public AspNetFileSystem(IHostingEnvironment hostingEnv)
3737
public override string MapPath(string relativePath)
3838
{
3939
relativePath = relativePath.TrimStart('~').TrimStart('/');
40-
return Path.Combine(_hostingEnv.WebRoot, relativePath);
40+
return Path.Combine(_hostingEnv.WebRootPath, relativePath);
4141
}
4242
}
4343
}

src/React.AspNet/HttpContextLifetimeProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public HttpContextLifetimeProvider(IServiceProvider appServiceProvider)
4848
/// Gets the <see cref="HttpContext" /> of the current request.
4949
/// </summary>
5050
private HttpContext HttpContext =>
51-
_appServiceProvider.GetRequiredService<IHttpContextAccessor>().Value;
51+
_appServiceProvider.GetRequiredService<IHttpContextAccessor>().HttpContext;
5252

5353
/// <summary>
5454
/// Gets the current per-request registrations for the current request.

src/React.AspNet/JsxFileSystem.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,12 @@ public DateTimeOffset LastModified
197197

198198
public void WriteContent(byte[] content)
199199
{
200-
_fileInfo.WriteContent(content);
200+
File.WriteAllBytes(_fileInfo.PhysicalPath, content);
201201
}
202202

203203
public void Delete()
204204
{
205-
_fileInfo.Delete();
205+
File.Delete(_fileInfo.PhysicalPath);
206206
}
207207

208208
public bool Exists
@@ -212,7 +212,7 @@ public bool Exists
212212

213213
public bool IsReadOnly
214214
{
215-
get { return _fileInfo.IsReadOnly; }
215+
get { return File.GetAttributes(_fileInfo.PhysicalPath).HasFlag(FileAttributes.ReadOnly); }
216216
}
217217
#endif
218218
}

src/React.AspNet/React.AspNet.kproj renamed to src/React.AspNet/React.AspNet.xproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
55
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
66
</PropertyGroup>
7-
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.Props" Condition="'$(VSToolsPath)' != ''" />
87
<PropertyGroup Label="Globals">
98
<ProjectGuid>a7acdb56-5e43-40a6-92c9-2c52228e6074</ProjectGuid>
109
<RootNamespace>React.AspNet</RootNamespace>
@@ -20,10 +19,11 @@
2019
<ItemGroup>
2120
<ProjectReference Include="..\React.Core\React.Core.csproj" />
2221
</ItemGroup>
23-
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
2422
<ProjectExtensions>
2523
<VisualStudio>
2624
<UserProperties project_1json__JSONSchema="http://www.asp.net/media/4878834/project.json" />
2725
</VisualStudio>
2826
</ProjectExtensions>
27+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" />
28+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" />
2929
</Project>

src/React.AspNet/project.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
}
1616
},
1717
"dependencies": {
18-
"Microsoft.Framework.DependencyInjection": "1.0.0.0-beta3",
19-
"Microsoft.AspNet.Hosting": "1.0.0.0-beta3",
20-
"Microsoft.AspNet.Mvc.Core": "6.0.0.0-beta3",
21-
"Microsoft.AspNet.StaticFiles": "1.0.0.0-beta3",
18+
"Microsoft.Framework.DependencyInjection": "1.0.0-beta4",
19+
"Microsoft.AspNet.Hosting": "1.0.0-beta4",
20+
"Microsoft.AspNet.Mvc.Core": "6.0.0-beta4",
21+
"Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
2222
"React.Core": "",
2323
"JavaScriptEngineSwitcher.Core": "1.2.4.0"
2424
},
2525
"frameworks": {
26-
"aspnet50": { }
26+
DNX451: { }
2727
},
2828

2929
// NuGet info
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
55
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
66
</PropertyGroup>
7-
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.Props" Condition="'$(VSToolsPath)' != ''" />
87
<PropertyGroup Label="Globals">
98
<ProjectGuid>022dc77e-5e48-4cf4-ad8b-dc4b9b52e02e</ProjectGuid>
109
<RootNamespace>React.Sample.Mvc6</RootNamespace>
@@ -15,10 +14,11 @@
1514
<SchemaVersion>2.0</SchemaVersion>
1615
<DevelopmentServerPort>3044</DevelopmentServerPort>
1716
</PropertyGroup>
18-
<Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
1917
<ProjectExtensions>
2018
<VisualStudio>
2119
<UserProperties bower_1json__JSONSchema="http://json.schemastore.org/bower" project_1json__JSONSchema="http://www.asp.net/media/4878834/project.json" package_1json__JSONSchema="http://json.schemastore.org/package" />
2220
</VisualStudio>
2321
</ProjectExtensions>
22+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" />
23+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" />
2424
</Project>

src/React.Sample.Mvc6/Startup.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
5959
// send the request to the following path or controller action.
6060
app.UseErrorHandler("/Home/Error");
6161
}
62-
63-
app.UseRequestServices();
64-
62+
6563
// Initialise ReactJS.NET. Must be before static files.
6664
app.UseReact(config =>
6765
{

src/React.Sample.Mvc6/project.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
"webroot": "wwwroot",
44
"version": "1.5.2-*",
55
"dependencies": {
6-
"Microsoft.AspNet.Mvc": "6.0.0.0-beta3",
7-
"Microsoft.AspNet.Diagnostics": "1.0.0.0-beta3",
8-
"Microsoft.AspNet.Server.IIS": "1.0.0.0-beta3",
9-
"Microsoft.AspNet.Server.WebListener": "1.0.0.0-beta3",
10-
"Microsoft.AspNet.StaticFiles": "1.0.0.0-beta3",
11-
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0.0-beta3",
12-
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0.0-beta3",
13-
"Microsoft.Framework.Logging": "1.0.0.0-beta3",
14-
"Microsoft.Framework.Logging.Console": "1.0.0.0-beta3",
15-
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta1",
6+
"Microsoft.AspNet.Mvc": "6.0.0-beta4",
7+
"Microsoft.AspNet.Diagnostics": "1.0.0-beta4",
8+
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
9+
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
10+
"Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
11+
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
12+
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4",
13+
"Microsoft.Framework.Logging": "1.0.0-beta4",
14+
"Microsoft.Framework.Logging.Console": "1.0.0-beta4",
15+
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta4",
1616
"React.AspNet": "",
1717
"React.Core": "",
1818
"JavaScriptEngineSwitcher.V8": "1.2.4.0",
@@ -24,7 +24,7 @@
2424
"gen": "Microsoft.Framework.CodeGeneration"
2525
},
2626
"frameworks": {
27-
"aspnet50": {}
27+
"DNX451": { }
2828
//"aspnetcore50": { }
2929
},
3030
"exclude": [

src/React.Tests/React.Tests.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@
126126
<ItemGroup>
127127
<Folder Include="Web\" />
128128
</ItemGroup>
129+
<ItemGroup>
130+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
131+
</ItemGroup>
129132
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
130133
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
131134
Other similar extension points exist, see Microsoft.Common.targets.

0 commit comments

Comments
 (0)