From 8d757d756203e64af08b5295e031addce0e23639 Mon Sep 17 00:00:00 2001 From: xabikos Date: Thu, 16 Jul 2015 15:25:07 +0000 Subject: [PATCH 1/3] Upgrade to aspnet5 beta5 version --- src/React.AspNet/JsxFileSystem.cs | 6 ++--- src/React.AspNet/React.AspNet.xproj | 2 +- src/React.AspNet/project.json | 11 ++++----- src/React.Sample.Mvc6/React.Sample.Mvc6.xproj | 2 +- src/React.Sample.Mvc6/Startup.cs | 16 +++++++------ src/React.Sample.Mvc6/project.json | 24 ++++++++----------- 6 files changed, 29 insertions(+), 32 deletions(-) diff --git a/src/React.AspNet/JsxFileSystem.cs b/src/React.AspNet/JsxFileSystem.cs index 948c39a10..6fd3c876a 100644 --- a/src/React.AspNet/JsxFileSystem.cs +++ b/src/React.AspNet/JsxFileSystem.cs @@ -17,7 +17,7 @@ using IOwinFileSystem = Microsoft.Owin.FileSystems.IFileSystem; #else using Microsoft.AspNet.FileProviders; -using Microsoft.Framework.Expiration.Interfaces; +using Microsoft.Framework.Caching; using IOwinFileSystem = Microsoft.AspNet.FileProviders.IFileProvider; using PhysicalFileSystem = Microsoft.AspNet.FileProviders.PhysicalFileProvider; #endif @@ -137,13 +137,13 @@ public IDirectoryContents GetDirectoryContents(string subpath) /// /// An that is triggered when a file matching is added, modified or deleted. /// - public IExpirationTrigger Watch(string filter) + IExpirationTrigger IOwinFileSystem.Watch(string filter) { return _physicalFileSystem.Watch(filter); } #endif - private class JsxFileInfo : IFileInfo + private class JsxFileInfo : IFileInfo { private readonly IJsxTransformer _jsxTransformer; private readonly IFileInfo _fileInfo; diff --git a/src/React.AspNet/React.AspNet.xproj b/src/React.AspNet/React.AspNet.xproj index 577d95ee5..79d0a13b0 100644 --- a/src/React.AspNet/React.AspNet.xproj +++ b/src/React.AspNet/React.AspNet.xproj @@ -21,7 +21,7 @@ - + diff --git a/src/React.AspNet/project.json b/src/React.AspNet/project.json index 31c91c9e4..dccef9699 100644 --- a/src/React.AspNet/project.json +++ b/src/React.AspNet/project.json @@ -15,18 +15,17 @@ } }, "dependencies": { - "Microsoft.Framework.DependencyInjection": "1.0.0-beta4", - "Microsoft.AspNet.Hosting": "1.0.0-beta4", - "Microsoft.AspNet.Mvc.Core": "6.0.0-beta4", - "Microsoft.AspNet.StaticFiles": "1.0.0-beta4", + "Microsoft.Framework.DependencyInjection": "1.0.0-beta5", + "Microsoft.AspNet.Mvc.Core": "6.0.0-beta5", + "Microsoft.AspNet.StaticFiles": "1.0.0-beta5", + "Microsoft.AspNet.FileProviders.Physical": "1.0.0-beta5", "React.Core": "", "JavaScriptEngineSwitcher.Core": "1.2.4.0" }, "frameworks": { - DNX451: { } + "dnx451": { } }, - // NuGet info "authors": [ "Daniel Lo Nigro" ], "description": "ReactJS tools for ASP.NET 5, including ASP.NET MVC 6. Please refer to project site (http://reactjs.net/) for full installation instructions, usage examples and sample code", "tags": [ "asp.net", "mvc", "asp", "javascript", "js", "react", "facebook", "reactjs", "vnext" ], diff --git a/src/React.Sample.Mvc6/React.Sample.Mvc6.xproj b/src/React.Sample.Mvc6/React.Sample.Mvc6.xproj index 20052ebe2..e98ffa54f 100644 --- a/src/React.Sample.Mvc6/React.Sample.Mvc6.xproj +++ b/src/React.Sample.Mvc6/React.Sample.Mvc6.xproj @@ -16,7 +16,7 @@ - + diff --git a/src/React.Sample.Mvc6/Startup.cs b/src/React.Sample.Mvc6/Startup.cs index 3f48d94ae..77300880a 100644 --- a/src/React.Sample.Mvc6/Startup.cs +++ b/src/React.Sample.Mvc6/Startup.cs @@ -11,21 +11,23 @@ using Microsoft.AspNet.Builder; using Microsoft.AspNet.Diagnostics; using Microsoft.AspNet.Hosting; -using Microsoft.Framework.ConfigurationModel; +using Microsoft.Framework.Configuration; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; -using Microsoft.Framework.Logging.Console; using React.AspNet; +using Microsoft.Framework.Runtime; namespace React.Sample.Mvc6 { - public class Startup + public class Startup { - public Startup(IHostingEnvironment env) + public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv) { - // Setup configuration sources. - Configuration = new Configuration() - .AddEnvironmentVariables(); + // Setup configuration sources. + var builder = new ConfigurationBuilder(appEnv.ApplicationBasePath) + .AddEnvironmentVariables(); + + Configuration = builder.Build(); } public IConfiguration Configuration { get; set; } diff --git a/src/React.Sample.Mvc6/project.json b/src/React.Sample.Mvc6/project.json index 3f72d86fb..9a40328d8 100644 --- a/src/React.Sample.Mvc6/project.json +++ b/src/React.Sample.Mvc6/project.json @@ -1,31 +1,27 @@ { - /* Click to learn more about project.json http://go.microsoft.com/fwlink/?LinkID=517074 */ "webroot": "wwwroot", "version": "1.5.3-*", "dependencies": { - "Microsoft.AspNet.Mvc": "6.0.0-beta4", - "Microsoft.AspNet.Diagnostics": "1.0.0-beta4", - "Microsoft.AspNet.Server.IIS": "1.0.0-beta4", - "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4", - "Microsoft.AspNet.StaticFiles": "1.0.0-beta4", - "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4", - "Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4", - "Microsoft.Framework.Logging": "1.0.0-beta4", - "Microsoft.Framework.Logging.Console": "1.0.0-beta4", - "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta4", + "Microsoft.AspNet.Mvc": "6.0.0-beta5", + "Microsoft.AspNet.Diagnostics": "1.0.0-beta5", + "Microsoft.AspNet.Server.IIS": "1.0.0-beta5", + "Microsoft.AspNet.Server.WebListener": "1.0.0-beta5", + "Microsoft.AspNet.StaticFiles": "1.0.0-beta5", + "Microsoft.Framework.Configuration.EnvironmentVariables": "1.0.0-beta5", + "Microsoft.Framework.Configuration.Json": "1.0.0-beta5", + "Microsoft.Framework.Logging": "1.0.0-beta5", + "Microsoft.Framework.Logging.Console": "1.0.0-beta5", "React.AspNet": "", "React.Core": "", "JavaScriptEngineSwitcher.V8": "1.2.4.0", "JavaScriptEngineSwitcher.Msie": "1.2.4.0" }, "commands": { - /* Change the port number when you are self hosting this application */ "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000", "gen": "Microsoft.Framework.CodeGeneration" }, "frameworks": { - "DNX451": { } - //"aspnetcore50": { } + "dnx451": { } }, "exclude": [ "wwwroot", From a22536dd17cdd5bdd4d3af1a7053d16c62a91bde Mon Sep 17 00:00:00 2001 From: Charalampos Karypidis Date: Thu, 16 Jul 2015 20:13:07 +0300 Subject: [PATCH 2/3] Replace spaces with tab --- src/React.AspNet/JsxFileSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/React.AspNet/JsxFileSystem.cs b/src/React.AspNet/JsxFileSystem.cs index 6fd3c876a..74bc1e883 100644 --- a/src/React.AspNet/JsxFileSystem.cs +++ b/src/React.AspNet/JsxFileSystem.cs @@ -143,7 +143,7 @@ IExpirationTrigger IOwinFileSystem.Watch(string filter) } #endif - private class JsxFileInfo : IFileInfo + private class JsxFileInfo : IFileInfo { private readonly IJsxTransformer _jsxTransformer; private readonly IFileInfo _fileInfo; @@ -202,4 +202,4 @@ public bool Exists #endif } } -} \ No newline at end of file +} From 3dafa82f6f03bd7522cec54c0490510cea1ced82 Mon Sep 17 00:00:00 2001 From: Charalampos Karypidis Date: Thu, 16 Jul 2015 20:14:53 +0300 Subject: [PATCH 3/3] Fix indenting --- src/React.Sample.Mvc6/Startup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/React.Sample.Mvc6/Startup.cs b/src/React.Sample.Mvc6/Startup.cs index 77300880a..336213d79 100644 --- a/src/React.Sample.Mvc6/Startup.cs +++ b/src/React.Sample.Mvc6/Startup.cs @@ -19,7 +19,7 @@ namespace React.Sample.Mvc6 { - public class Startup + public class Startup { public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv) {