From 7a976d069eb8d30bf8c3474e550923287e8024d8 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Tue, 8 Apr 2014 02:00:50 -0700 Subject: [PATCH] Updated to use new tooling --- StaticFiles.sln | 55 ++++++++++--------- samples/StaticFileSample/Program.cs | 28 ---------- samples/StaticFileSample/Startup.cs | 19 ++----- .../StaticFileSample/StaticFileSample.kproj | 30 ++++++++++ samples/StaticFileSample/project.json | 32 ++--------- .../Microsoft.AspNet.StaticFiles.kproj | 55 +++++++++++++++++++ 6 files changed, 122 insertions(+), 97 deletions(-) delete mode 100644 samples/StaticFileSample/Program.cs create mode 100644 samples/StaticFileSample/StaticFileSample.kproj create mode 100644 src/Microsoft.AspNet.StaticFiles/Microsoft.AspNet.StaticFiles.kproj diff --git a/StaticFiles.sln b/StaticFiles.sln index 0574dc88b5..3c56c33e43 100644 --- a/StaticFiles.sln +++ b/StaticFiles.sln @@ -1,50 +1,51 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +VisualStudioVersion = 12.0.30327.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.StaticFiles.net45", "src\Microsoft.AspNet.StaticFiles\Microsoft.AspNet.StaticFiles.net45.csproj", "{49278B83-CC12-49EA-8F61-D143863DD21B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.StaticFiles.k10", "src\Microsoft.AspNet.StaticFiles\Microsoft.AspNet.StaticFiles.k10.csproj", "{297551FE-7539-4E43-A6B8-165C7789F48D}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{40EE0889-960E-41B4-A3D3-9CE963EB0797}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{8B21A3A9-9CA6-4857-A6E0-1A3203404B60}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StaticFileSample.k10", "samples\StaticFileSample\StaticFileSample.k10.csproj", "{8C5384FC-24F3-47F2-897C-A151604F011C}" +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.StaticFiles", "src\Microsoft.AspNet.StaticFiles\Microsoft.AspNet.StaticFiles.kproj", "{8D7BC5A4-F19C-4184-8338-A6B42997218C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StaticFileSample.net45", "samples\StaticFileSample\StaticFileSample.net45.csproj", "{742E16CD-8217-4386-AAF0-5F116E62CD82}" +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StaticFileSample", "samples\StaticFileSample\StaticFileSample.kproj", "{092141D9-305A-4FC5-AE74-CB23982CA8D4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {49278B83-CC12-49EA-8F61-D143863DD21B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {49278B83-CC12-49EA-8F61-D143863DD21B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {49278B83-CC12-49EA-8F61-D143863DD21B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {49278B83-CC12-49EA-8F61-D143863DD21B}.Release|Any CPU.Build.0 = Release|Any CPU - {297551FE-7539-4E43-A6B8-165C7789F48D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {297551FE-7539-4E43-A6B8-165C7789F48D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {297551FE-7539-4E43-A6B8-165C7789F48D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {297551FE-7539-4E43-A6B8-165C7789F48D}.Release|Any CPU.Build.0 = Release|Any CPU - {8C5384FC-24F3-47F2-897C-A151604F011C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C5384FC-24F3-47F2-897C-A151604F011C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C5384FC-24F3-47F2-897C-A151604F011C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C5384FC-24F3-47F2-897C-A151604F011C}.Release|Any CPU.Build.0 = Release|Any CPU - {742E16CD-8217-4386-AAF0-5F116E62CD82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {742E16CD-8217-4386-AAF0-5F116E62CD82}.Debug|Any CPU.Build.0 = Debug|Any CPU - {742E16CD-8217-4386-AAF0-5F116E62CD82}.Release|Any CPU.ActiveCfg = Release|Any CPU - {742E16CD-8217-4386-AAF0-5F116E62CD82}.Release|Any CPU.Build.0 = Release|Any CPU + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Debug|Any CPU.ActiveCfg = Debug|x86 + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Debug|x86.ActiveCfg = Debug|x86 + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Debug|x86.Build.0 = Debug|x86 + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Release|Any CPU.ActiveCfg = Release|x86 + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Release|Mixed Platforms.Build.0 = Release|x86 + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Release|x86.ActiveCfg = Release|x86 + {8D7BC5A4-F19C-4184-8338-A6B42997218C}.Release|x86.Build.0 = Release|x86 + {092141D9-305A-4FC5-AE74-CB23982CA8D4}.Debug|Any CPU.ActiveCfg = Debug|x86 + {092141D9-305A-4FC5-AE74-CB23982CA8D4}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {092141D9-305A-4FC5-AE74-CB23982CA8D4}.Debug|x86.ActiveCfg = Debug|x86 + {092141D9-305A-4FC5-AE74-CB23982CA8D4}.Debug|x86.Build.0 = Debug|x86 + {092141D9-305A-4FC5-AE74-CB23982CA8D4}.Release|Any CPU.ActiveCfg = Release|x86 + {092141D9-305A-4FC5-AE74-CB23982CA8D4}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {092141D9-305A-4FC5-AE74-CB23982CA8D4}.Release|Mixed Platforms.Build.0 = Release|x86 + {092141D9-305A-4FC5-AE74-CB23982CA8D4}.Release|x86.ActiveCfg = Release|x86 + {092141D9-305A-4FC5-AE74-CB23982CA8D4}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {297551FE-7539-4E43-A6B8-165C7789F48D} = {40EE0889-960E-41B4-A3D3-9CE963EB0797} - {49278B83-CC12-49EA-8F61-D143863DD21B} = {40EE0889-960E-41B4-A3D3-9CE963EB0797} - {8C5384FC-24F3-47F2-897C-A151604F011C} = {8B21A3A9-9CA6-4857-A6E0-1A3203404B60} - {742E16CD-8217-4386-AAF0-5F116E62CD82} = {8B21A3A9-9CA6-4857-A6E0-1A3203404B60} + {8D7BC5A4-F19C-4184-8338-A6B42997218C} = {40EE0889-960E-41B4-A3D3-9CE963EB0797} + {092141D9-305A-4FC5-AE74-CB23982CA8D4} = {8B21A3A9-9CA6-4857-A6E0-1A3203404B60} EndGlobalSection EndGlobal diff --git a/samples/StaticFileSample/Program.cs b/samples/StaticFileSample/Program.cs deleted file mode 100644 index 1a7745c155..0000000000 --- a/samples/StaticFileSample/Program.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -#if NET45 -using System.Diagnostics; -using Microsoft.Owin.Hosting; -#endif - -namespace StaticFilesSample -{ - public class Program - { - const string baseUrl = "http://localhost:9001/"; - - public static void Main() - { -#if NET45 - using (WebApp.Start(new StartOptions(baseUrl))) - { - Console.WriteLine("Listening at {0}", baseUrl); - Process.Start(baseUrl); - Console.WriteLine("Press any key to exit"); - Console.ReadKey(); - } -#else - Console.WriteLine("Hello World"); -#endif - } - } -} \ No newline at end of file diff --git a/samples/StaticFileSample/Startup.cs b/samples/StaticFileSample/Startup.cs index 73e49392b3..ac688cb66e 100644 --- a/samples/StaticFileSample/Startup.cs +++ b/samples/StaticFileSample/Startup.cs @@ -1,32 +1,21 @@ -#if NET45 -using System; +using System; using System.IO; using Microsoft.AspNet; using Microsoft.AspNet.Abstractions; using Microsoft.AspNet.FileSystems; using Microsoft.AspNet.StaticFiles; -using Owin; namespace StaticFilesSample { public class Startup { - public void Configuration(IAppBuilder app) + public void Configuration(IBuilder app) { - app.UseErrorPage(); - - // Temporary bridge from katana to Owin - app.UseBuilder(ConfigurePK); - } - - private void ConfigurePK(IBuilder builder) - { - builder.UseFileServer(new FileServerOptions() + app.UseFileServer(new FileServerOptions() { EnableDirectoryBrowsing = true, FileSystem = new PhysicalFileSystem(@"c:\temp") }); } } -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/samples/StaticFileSample/StaticFileSample.kproj b/samples/StaticFileSample/StaticFileSample.kproj new file mode 100644 index 0000000000..7f6ff10a6b --- /dev/null +++ b/samples/StaticFileSample/StaticFileSample.kproj @@ -0,0 +1,30 @@ + + + + 12.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 092141d9-305a-4fc5-ae74-cb23982ca8d4 + Web + net45 + + + + + + + 2.0 + + + 47028 + + + + + + + + + \ No newline at end of file diff --git a/samples/StaticFileSample/project.json b/samples/StaticFileSample/project.json index b111754ae9..a8fd0db0f5 100644 --- a/samples/StaticFileSample/project.json +++ b/samples/StaticFileSample/project.json @@ -1,40 +1,18 @@ { - "version": "0.1-alpha-*", "dependencies": { + "Helios": "0.1-alpha-*", "Microsoft.AspNet.FileSystems": "0.1-alpha-*", "Microsoft.AspNet.StaticFiles": "", "Microsoft.AspNet.Abstractions": "0.1-alpha-*" }, "configurations": { "net45": { - "dependencies": { - "Owin": "1.0", - "Microsoft.Owin": "2.1.0", - "Microsoft.Owin.Diagnostics": "2.1.0", - "Microsoft.Owin.Hosting": "2.1.0", - "Microsoft.Owin.Host.HttpListener": "2.1.0", - "Microsoft.AspNet.AppBuilderSupport": "0.1-alpha-*" - } }, "k10": { - "dependencies": { - "System.Console": "4.0.0.0", - "System.Collections": "4.0.0.0", - "System.Diagnostics.Debug": "4.0.10.0", - "System.Diagnostics.Tools": "4.0.0.0", - "System.Globalization": "4.0.10.0", - "System.IO": "4.0.0.0", - "System.IO.FileSystem": "4.0.0.0", - "System.IO.FileSystem.Primitives": "4.0.0.0", - "System.Linq": "4.0.0.0", - "System.Reflection": "4.0.10.0", - "System.Resources.ResourceManager": "4.0.0.0", - "System.Runtime": "4.0.20.0", - "System.Runtime.Extensions": "4.0.10.0", - "System.Runtime.InteropServices": "4.0.20.0", - "System.Text.Encoding": "4.0.20.0", - "System.Threading.Tasks": "4.0.10.0" - } + "dependencies": { + "System.Diagnostics.Contracts": "4.0.0.0", + "System.Security.Claims" : "0.1-alpha-*" + } } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.StaticFiles/Microsoft.AspNet.StaticFiles.kproj b/src/Microsoft.AspNet.StaticFiles/Microsoft.AspNet.StaticFiles.kproj new file mode 100644 index 0000000000..14a9bded03 --- /dev/null +++ b/src/Microsoft.AspNet.StaticFiles/Microsoft.AspNet.StaticFiles.kproj @@ -0,0 +1,55 @@ + + + + 12.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 8d7bc5a4-f19c-4184-8338-a6b42997218c + Library + + + + + + + 2.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file