From 7b8a54cc2424e42d295a39d2e9eca533ad171fad Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 21 Jan 2014 12:36:40 -0800 Subject: [PATCH] * Updating project structure to use the src, test, build, samples format * Adding build scripts to use K compilation. --- .gitignore | 1 + .../Compilation/CompilerCache.cs | 44 ------------------- Microsoft.AspNet.CoreServices/project.json | 7 --- Microsoft.AspNet.Mvc.sln | 18 ++++++-- build.cmd | 11 +++++ build/_k-build.shade | 17 +++++++ build/_k-clean.shade | 13 ++++++ build/_k-standard-goals.shade | 43 ++++++++++++++++++ build/_k.shade | 31 +++++++++++++ makefile.shade | 7 +++ .../MvcSample}/Home2Controller.cs | 0 .../MvcSample}/HomeController.cs | 0 .../MvcSample}/Models/Class1.cs | 0 .../MvcSample}/MvcSample.csproj | 16 +++---- .../MvcSample}/Properties/AssemblyInfo.cs | 0 {MvcSample => samples/MvcSample}/Startup.cs | 0 .../MvcSample}/ViewMetadata.cs | 0 .../MvcSample}/Views/Home/MyView.cshtml | 0 .../MvcSample}/Views/Shared/_Layout.cshtml | 0 .../MvcSample}/Web.Debug.config | 0 .../MvcSample}/Web.Release.config | 0 {MvcSample => samples/MvcSample}/Web.config | 0 .../MvcSample}/packages.config | 0 {MvcSample => samples/MvcSample}/project.json | 0 samples/MvcSample/web.config | 9 ++++ .../ActivatorUtilities.cs | 0 .../Compilation/CompilationFailedException.cs | 0 .../Compilation/CompilationMessage.cs | 0 .../Compilation/CompilationResult.cs | 0 .../Compilation/CompilerCache.cs | 34 ++++++++++++++ .../Compilation/CscBasedCompilationService.cs | 0 .../Compilation/DefaultCompilationService.cs | 0 .../Compilation/ICompilationService.cs | 0 .../Microsoft.AspNet.CoreServices.csproj | 3 +- .../Properties/AssemblyInfo.cs | 0 .../ServiceProvider.cs | 0 .../ServiceProviderExtensions.cs | 0 .../packages.config | 0 .../project.json | 9 ++++ .../Microsoft.AspNet.Mvc.Razor}/HtmlString.cs | 0 .../Microsoft.AspNet.Mvc.Razor.csproj | 6 +-- .../Properties/AssemblyInfo.cs | 0 .../Razor/MvcCSharpRazorCodeGenerator.cs | 0 .../Razor/MvcCSharpRazorCodeParser.cs | 0 .../Razor/MvcRazorHost.cs | 0 .../Razor/RazorCompilationService.cs | 0 .../Razor/SetModelTypeCodeGenerator.cs | 0 .../Microsoft.AspNet.Mvc.Razor}/RazorView.cs | 0 .../RazorViewOfT.cs | 0 .../ViewEngine/IVirtualPathViewFactory.cs | 0 .../MetadataVirtualPathViewFactory.cs | 0 .../ViewEngine/RazorViewEngine.cs | 0 .../ViewEngine/VirtualFileSystem.cs | 0 .../ViewEngine/VirtualPathAttribute.cs | 0 .../ViewEngine/VirtualPathViewFactory.cs | 0 .../packages.config | 0 src/Microsoft.AspNet.Mvc.Razor/project.json | 19 ++++++++ .../Microsoft.AspNet.Mvc}/ActionDescriptor.cs | 0 .../ActionDescriptorProvider.cs | 0 .../ActionInvokerFactory.cs | 0 .../ActionInvokerProvider.cs | 0 .../ActionResultFactory.cs | 0 .../ActionResultHelper.cs | 0 .../ActionResultHelperExtensions.cs | 0 .../ActionResults/ContentResult.cs | 0 .../ActionResults/NegotiatedContentResult.cs | 0 .../ActionResults/NoContentResult.cs | 0 .../ActionResults/ObjectContent.cs | 0 .../Microsoft.AspNet.Mvc}/Controller.cs | 0 .../ControllerActionInvoker.cs | 0 .../ControllerBasedActionDescriptor.cs | 0 .../DefaultContentNegotiator.cs | 0 .../DefaultControllerFactory.cs | 0 .../Microsoft.AspNet.Mvc}/EmptyResult.cs | 0 .../Extensions/IEnumerableExtensions.cs | 0 .../Extensions/TypeExtensions.cs | 0 .../JQeryMvcForUrlEncodedFormatter.cs | 0 .../FormattingUtilities.cs | 0 .../HttpResponseMessageActionResult.cs | 0 .../HttpStatusCodeResult.cs | 0 .../IActionDescriptorProvider.cs | 0 .../Microsoft.AspNet.Mvc}/IActionInvoker.cs | 0 .../IActionInvokerFactory.cs | 0 .../IActionInvokerProvider.cs | 0 .../Microsoft.AspNet.Mvc}/IActionResult.cs | 0 .../IActionResultFactory.cs | 0 .../IActionResultHelper.cs | 0 .../IControllerFactory.cs | 0 .../IOwinContentNegotiator.cs | 0 .../Microsoft.AspNet.Mvc.csproj | 6 +-- .../Microsoft.AspNet.Mvc}/MvcHandler.cs | 0 .../Microsoft.AspNet.Mvc}/MvcServices.cs | 0 .../Properties/AssemblyInfo.cs | 0 .../Microsoft.AspNet.Mvc}/RequestContext.cs | 0 .../Routing/IRouteData.cs | 0 .../View/CompositeViewEngine.cs | 0 .../Microsoft.AspNet.Mvc}/View/IView.cs | 0 .../Microsoft.AspNet.Mvc}/View/IViewEngine.cs | 0 .../Microsoft.AspNet.Mvc}/View/ViewContext.cs | 0 .../View/ViewDataDictionary.cs | 0 .../View/ViewEngineResult.cs | 0 .../Microsoft.AspNet.Mvc}/View/ViewResult.cs | 0 .../Microsoft.AspNet.Mvc}/packages.config | 0 .../Microsoft.AspNet.Mvc}/project.json | 0 104 files changed, 223 insertions(+), 71 deletions(-) delete mode 100644 Microsoft.AspNet.CoreServices/Compilation/CompilerCache.cs delete mode 100644 Microsoft.AspNet.CoreServices/project.json create mode 100644 build.cmd create mode 100644 build/_k-build.shade create mode 100644 build/_k-clean.shade create mode 100644 build/_k-standard-goals.shade create mode 100644 build/_k.shade create mode 100644 makefile.shade rename {MvcSample => samples/MvcSample}/Home2Controller.cs (100%) rename {MvcSample => samples/MvcSample}/HomeController.cs (100%) rename {MvcSample => samples/MvcSample}/Models/Class1.cs (100%) rename {MvcSample => samples/MvcSample}/MvcSample.csproj (88%) rename {MvcSample => samples/MvcSample}/Properties/AssemblyInfo.cs (100%) rename {MvcSample => samples/MvcSample}/Startup.cs (100%) rename {MvcSample => samples/MvcSample}/ViewMetadata.cs (100%) rename {MvcSample => samples/MvcSample}/Views/Home/MyView.cshtml (100%) rename {MvcSample => samples/MvcSample}/Views/Shared/_Layout.cshtml (100%) rename {MvcSample => samples/MvcSample}/Web.Debug.config (100%) rename {MvcSample => samples/MvcSample}/Web.Release.config (100%) rename {MvcSample => samples/MvcSample}/Web.config (100%) rename {MvcSample => samples/MvcSample}/packages.config (100%) rename {MvcSample => samples/MvcSample}/project.json (100%) create mode 100644 samples/MvcSample/web.config rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/ActivatorUtilities.cs (100%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/Compilation/CompilationFailedException.cs (100%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/Compilation/CompilationMessage.cs (100%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/Compilation/CompilationResult.cs (100%) create mode 100644 src/Microsoft.AspNet.CoreServices/Compilation/CompilerCache.cs rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/Compilation/CscBasedCompilationService.cs (100%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/Compilation/DefaultCompilationService.cs (100%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/Compilation/ICompilationService.cs (100%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/Microsoft.AspNet.CoreServices.csproj (94%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/Properties/AssemblyInfo.cs (100%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/ServiceProvider.cs (100%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/ServiceProviderExtensions.cs (100%) rename {Microsoft.AspNet.CoreServices => src/Microsoft.AspNet.CoreServices}/packages.config (100%) create mode 100644 src/Microsoft.AspNet.CoreServices/project.json rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/HtmlString.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/Microsoft.AspNet.Mvc.Razor.csproj (94%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/Properties/AssemblyInfo.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/Razor/MvcCSharpRazorCodeGenerator.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/Razor/MvcCSharpRazorCodeParser.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/Razor/MvcRazorHost.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/Razor/RazorCompilationService.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/Razor/SetModelTypeCodeGenerator.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/RazorView.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/RazorViewOfT.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/ViewEngine/IVirtualPathViewFactory.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/ViewEngine/MetadataVirtualPathViewFactory.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/ViewEngine/RazorViewEngine.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/ViewEngine/VirtualFileSystem.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/ViewEngine/VirtualPathAttribute.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/ViewEngine/VirtualPathViewFactory.cs (100%) rename {Microsoft.AspNet.Mvc.Razor => src/Microsoft.AspNet.Mvc.Razor}/packages.config (100%) create mode 100644 src/Microsoft.AspNet.Mvc.Razor/project.json rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionDescriptor.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionDescriptorProvider.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionInvokerFactory.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionInvokerProvider.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionResultFactory.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionResultHelper.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionResultHelperExtensions.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionResults/ContentResult.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionResults/NegotiatedContentResult.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionResults/NoContentResult.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ActionResults/ObjectContent.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/Controller.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ControllerActionInvoker.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/ControllerBasedActionDescriptor.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/DefaultContentNegotiator.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/DefaultControllerFactory.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/EmptyResult.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/Extensions/IEnumerableExtensions.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/Extensions/TypeExtensions.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/Formatters/JQeryMvcForUrlEncodedFormatter.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/FormattingUtilities.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/HttpResponseMessageActionResult.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/HttpStatusCodeResult.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/IActionDescriptorProvider.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/IActionInvoker.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/IActionInvokerFactory.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/IActionInvokerProvider.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/IActionResult.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/IActionResultFactory.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/IActionResultHelper.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/IControllerFactory.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/IOwinContentNegotiator.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/Microsoft.AspNet.Mvc.csproj (95%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/MvcHandler.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/MvcServices.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/Properties/AssemblyInfo.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/RequestContext.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/Routing/IRouteData.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/View/CompositeViewEngine.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/View/IView.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/View/IViewEngine.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/View/ViewContext.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/View/ViewDataDictionary.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/View/ViewEngineResult.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/View/ViewResult.cs (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/packages.config (100%) rename {Microsoft.AspNet.Mvc => src/Microsoft.AspNet.Mvc}/project.json (100%) diff --git a/.gitignore b/.gitignore index 719b4f50e8..45dc8290cc 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ PublishProfiles/ *.log *.vspx /.symbols +nuget.exe diff --git a/Microsoft.AspNet.CoreServices/Compilation/CompilerCache.cs b/Microsoft.AspNet.CoreServices/Compilation/CompilerCache.cs deleted file mode 100644 index ccc701d34e..0000000000 --- a/Microsoft.AspNet.CoreServices/Compilation/CompilerCache.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Runtime.Caching; -using System.Threading.Tasks; -using Microsoft.Owin.FileSystems; - -namespace Microsoft.AspNet.CoreServices -{ - public class CompilerCache - { - private readonly MemoryCache _cache; - - public CompilerCache() - { - _cache = MemoryCache.Default; - } - - public Task GetOrAdd(IFileInfo file, Func> compile) - { - // Generate a content id - string contentId = file.PhysicalPath + '|' + file.LastModified.Ticks; - - var cachedType = _cache[contentId] as Type; - if (cachedType == null) - { - return CompileWith(contentId, file, compile); - } - - return Task.FromResult(CompilationResult.Successful(generatedCode: null, type: cachedType)); - } - - private async Task CompileWith(string contentId, IFileInfo file, Func> compile) - { - CompilationResult result = await compile(); - Type compiledType = result.CompiledType; - - var filePaths = new [] { file.PhysicalPath }; - var policy = new CacheItemPolicy(); - policy.ChangeMonitors.Add(new HostFileChangeMonitor(filePaths)); - - _cache.Set(contentId, result.CompiledType, policy); - return result; - } - } -} diff --git a/Microsoft.AspNet.CoreServices/project.json b/Microsoft.AspNet.CoreServices/project.json deleted file mode 100644 index ba570aacfc..0000000000 --- a/Microsoft.AspNet.CoreServices/project.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "dependencies": [], - "configurations": [ - { "net45": {} }, - { "k10": {} } - ] -} \ No newline at end of file diff --git a/Microsoft.AspNet.Mvc.sln b/Microsoft.AspNet.Mvc.sln index 8c5c49787e..2d0fa26ece 100644 --- a/Microsoft.AspNet.Mvc.sln +++ b/Microsoft.AspNet.Mvc.sln @@ -3,13 +3,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc", "Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.csproj", "{2A0C26F1-0240-4AE1-AE00-4691C291B122}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc", "src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.csproj", "{2A0C26F1-0240-4AE1-AE00-4691C291B122}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcSample", "MvcSample\MvcSample.csproj", "{069EA0A1-BB68-41D1-A973-3429EC09264C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcSample", "samples\MvcSample\MvcSample.csproj", "{069EA0A1-BB68-41D1-A973-3429EC09264C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.CoreServices", "Microsoft.AspNet.CoreServices\Microsoft.AspNet.CoreServices.csproj", "{EC38534C-A2D1-413F-97D1-55EEF5D2FB71}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.CoreServices", "src\Microsoft.AspNet.CoreServices\Microsoft.AspNet.CoreServices.csproj", "{EC38534C-A2D1-413F-97D1-55EEF5D2FB71}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor", "Microsoft.AspNet.Mvc.Razor\Microsoft.AspNet.Mvc.Razor.csproj", "{224A14D0-ECA7-441C-AE89-B6E66A57EF9B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor", "src\Microsoft.AspNet.Mvc.Razor\Microsoft.AspNet.Mvc.Razor.csproj", "{224A14D0-ECA7-441C-AE89-B6E66A57EF9B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{DAAE4C74-D06F-4874-A166-33305D2643CE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{32285FA4-6B46-4D6B-A840-2B13E4C8B58E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -37,4 +41,10 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {069EA0A1-BB68-41D1-A973-3429EC09264C} = {DAAE4C74-D06F-4874-A166-33305D2643CE} + {EC38534C-A2D1-413F-97D1-55EEF5D2FB71} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} + {2A0C26F1-0240-4AE1-AE00-4691C291B122} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} + {224A14D0-ECA7-441C-AE89-B6E66A57EF9B} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E} + EndGlobalSection EndGlobal diff --git a/build.cmd b/build.cmd new file mode 100644 index 0000000000..cc2ac30683 --- /dev/null +++ b/build.cmd @@ -0,0 +1,11 @@ +@echo off +cd %~dp0 + +IF EXIST .nuget\NuGet.exe goto part2 +echo Downloading latest version of NuGet.exe... +md .nuget +@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '.nuget\NuGet.exe'" + +:part2 +.nuget\NuGet.exe install Sake -version 0.2 -o packages +packages\Sake.0.2\tools\Sake.exe -I build -f makefile.shade %* diff --git a/build/_k-build.shade b/build/_k-build.shade new file mode 100644 index 0000000000..94332a774b --- /dev/null +++ b/build/_k-build.shade @@ -0,0 +1,17 @@ +@{/* + +k-build + Builds project. Downloads and executes k sdk tools. + +projectFile='' + Required. Path to the project.json to build. + +*/} + +var projectFolder='${Path.GetDirectoryName(projectFile)}' +var projectName='${Path.GetFileName(projectFolder)}' +var projectBin='${Path.Combine(projectFolder, "bin")}' + +-// directory delete="${projectBin}" +k command='build ${projectFolder}' +copy sourceDir='${projectBin}' outputDir='${Path.Combine(BUILD_DIR, projectName)}' diff --git a/build/_k-clean.shade b/build/_k-clean.shade new file mode 100644 index 0000000000..7f8b643682 --- /dev/null +++ b/build/_k-clean.shade @@ -0,0 +1,13 @@ +@{/* + +k-clean + Cleans project. Downloads and executes k sdk tools. + +projectFile='' + Required. Path to the project.json to build. + +*/} + +var projectFolder='${Path.GetDirectoryName(projectFile)}' + +k command='clean ${projectFolder}' diff --git a/build/_k-standard-goals.shade b/build/_k-standard-goals.shade new file mode 100644 index 0000000000..6ae2edb94b --- /dev/null +++ b/build/_k-standard-goals.shade @@ -0,0 +1,43 @@ +use namespace="System" +use namespace="System.IO" +use import="Files" + +default BASE_DIR='${Directory.GetCurrentDirectory()}' +default TARGET_DIR='${Path.Combine(BASE_DIR, "artifacts")}' +default BUILD_DIR='${Path.Combine(TARGET_DIR, "build")}' +default TEST_DIR='${Path.Combine(TARGET_DIR, "test")}' + +@{ + E("K_BUILD_VERSION", "t" + DateTime.UtcNow.ToString("yyMMddHHmmss")); +} + +#target-dir-clean target="clean" + directory delete="${TARGET_DIR}" + +#build-clean target='clean' + k-clean each='var projectFile in Files.Include("src/**/project.json")' + +#build-compile target='compile' + k-build each='var projectFile in Files.Include("src/**/project.json")' + @{ + foreach (var nupkg in Files.Include(Path.Combine(BUILD_DIR, "*/*.nupkg"))) + { + File.Copy(nupkg, Path.Combine(BUILD_DIR, Path.GetFileName(nupkg)), true); + } + } + +#nuget-install target='install' description='Copy NuGet packages to local repo' + @{ + var HOME_DIR = E("HOME"); + if (string.IsNullOrEmpty(HOME_DIR)) + { + HOME_DIR = E("HOMEDRIVE") + E("HOMEPATH"); + } + } + copy sourceDir='${BUILD_DIR}' include='*.nupkg' outputDir='${Path.Combine(HOME_DIR, ".nuget")}' overwrite='${true}' + + +functions @{ + string E(string key) { return Environment.GetEnvironmentVariable(key); } + void E(string key, string value) { Environment.SetEnvironmentVariable(key, value); } +} diff --git a/build/_k.shade b/build/_k.shade new file mode 100644 index 0000000000..c0e216dcae --- /dev/null +++ b/build/_k.shade @@ -0,0 +1,31 @@ +@{/* + +k + Run klr commands in your project. Downloads and executes k sdk. + +kVersion='0.0.1-pre-30109-087' + May be passed to override the nuget package version holding xunit console runner. + +kProgram='...' + May be passed to override the path to the xunit program that will be executed + +command='' + +*/} + +default kLatestSuccessful='\\wsr-teamcity\Drops\ProjectK.Main\latest-successful\sdk' +default kVersion='' + +test if='string.IsNullOrEmpty(kVersion)' + for each='var file in System.IO.Directory.EnumerateFiles(kLatestSuccessful).Select(System.IO.Path.GetFileName)' + test if='file.StartsWith("ProjectK.") && file.EndsWith(".nupkg")' + - kVersion = file.Substring("ProjectK.".Length, file.Length - "ProjectK.".Length - ".nupkg".Length); + +default kProgram='packages/ProjectK.${kVersion}/tools/k.cmd' + +-// Download xunit from nuget sources if not already present +test if='!File.Exists(kProgram)' + log info='Installing ProjectK ${kVersion} from ${kLatestSuccessful}' + nuget-install package='ProjectK' packageVersion='${kVersion}' outputDir='packages' extra='-Source ${kLatestSuccessful}' + +exec program='${Path.GetFullPath(kProgram)}' commandline='${command}' diff --git a/makefile.shade b/makefile.shade new file mode 100644 index 0000000000..6357ea2841 --- /dev/null +++ b/makefile.shade @@ -0,0 +1,7 @@ + +var VERSION='0.1' +var FULL_VERSION='0.1' +var AUTHORS='Microsoft' + +use-standard-lifecycle +k-standard-goals diff --git a/MvcSample/Home2Controller.cs b/samples/MvcSample/Home2Controller.cs similarity index 100% rename from MvcSample/Home2Controller.cs rename to samples/MvcSample/Home2Controller.cs diff --git a/MvcSample/HomeController.cs b/samples/MvcSample/HomeController.cs similarity index 100% rename from MvcSample/HomeController.cs rename to samples/MvcSample/HomeController.cs diff --git a/MvcSample/Models/Class1.cs b/samples/MvcSample/Models/Class1.cs similarity index 100% rename from MvcSample/Models/Class1.cs rename to samples/MvcSample/Models/Class1.cs diff --git a/MvcSample/MvcSample.csproj b/samples/MvcSample/MvcSample.csproj similarity index 88% rename from MvcSample/MvcSample.csproj rename to samples/MvcSample/MvcSample.csproj index 870c49d0b4..b944d2b940 100644 --- a/MvcSample/MvcSample.csproj +++ b/samples/MvcSample/MvcSample.csproj @@ -41,21 +41,21 @@ False - ..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll + ..\..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll - ..\packages\Microsoft.Owin.Diagnostics.2.0.2\lib\net40\Microsoft.Owin.Diagnostics.dll + ..\..\packages\Microsoft.Owin.Diagnostics.2.0.2\lib\net40\Microsoft.Owin.Diagnostics.dll False - ..\packages\Microsoft.Owin.FileSystems.2.1.0-rc1\lib\net40\Microsoft.Owin.FileSystems.dll + ..\..\packages\Microsoft.Owin.FileSystems.2.1.0-rc1\lib\net40\Microsoft.Owin.FileSystems.dll False - ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll - ..\packages\Owin.1.0\lib\net40\Owin.dll + ..\..\packages\Owin.1.0\lib\net40\Owin.dll @@ -76,15 +76,15 @@ - + {ec38534c-a2d1-413f-97d1-55eef5d2fb71} Microsoft.AspNet.CoreServices - + {224a14d0-eca7-441c-ae89-b6e66a57ef9b} Microsoft.AspNet.Mvc.Razor - + {2a0c26f1-0240-4ae1-ae00-4691c291b122} Microsoft.AspNet.Mvc diff --git a/MvcSample/Properties/AssemblyInfo.cs b/samples/MvcSample/Properties/AssemblyInfo.cs similarity index 100% rename from MvcSample/Properties/AssemblyInfo.cs rename to samples/MvcSample/Properties/AssemblyInfo.cs diff --git a/MvcSample/Startup.cs b/samples/MvcSample/Startup.cs similarity index 100% rename from MvcSample/Startup.cs rename to samples/MvcSample/Startup.cs diff --git a/MvcSample/ViewMetadata.cs b/samples/MvcSample/ViewMetadata.cs similarity index 100% rename from MvcSample/ViewMetadata.cs rename to samples/MvcSample/ViewMetadata.cs diff --git a/MvcSample/Views/Home/MyView.cshtml b/samples/MvcSample/Views/Home/MyView.cshtml similarity index 100% rename from MvcSample/Views/Home/MyView.cshtml rename to samples/MvcSample/Views/Home/MyView.cshtml diff --git a/MvcSample/Views/Shared/_Layout.cshtml b/samples/MvcSample/Views/Shared/_Layout.cshtml similarity index 100% rename from MvcSample/Views/Shared/_Layout.cshtml rename to samples/MvcSample/Views/Shared/_Layout.cshtml diff --git a/MvcSample/Web.Debug.config b/samples/MvcSample/Web.Debug.config similarity index 100% rename from MvcSample/Web.Debug.config rename to samples/MvcSample/Web.Debug.config diff --git a/MvcSample/Web.Release.config b/samples/MvcSample/Web.Release.config similarity index 100% rename from MvcSample/Web.Release.config rename to samples/MvcSample/Web.Release.config diff --git a/MvcSample/Web.config b/samples/MvcSample/Web.config similarity index 100% rename from MvcSample/Web.config rename to samples/MvcSample/Web.config diff --git a/MvcSample/packages.config b/samples/MvcSample/packages.config similarity index 100% rename from MvcSample/packages.config rename to samples/MvcSample/packages.config diff --git a/MvcSample/project.json b/samples/MvcSample/project.json similarity index 100% rename from MvcSample/project.json rename to samples/MvcSample/project.json diff --git a/samples/MvcSample/web.config b/samples/MvcSample/web.config new file mode 100644 index 0000000000..787aa09c3f --- /dev/null +++ b/samples/MvcSample/web.config @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Microsoft.AspNet.CoreServices/ActivatorUtilities.cs b/src/Microsoft.AspNet.CoreServices/ActivatorUtilities.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/ActivatorUtilities.cs rename to src/Microsoft.AspNet.CoreServices/ActivatorUtilities.cs diff --git a/Microsoft.AspNet.CoreServices/Compilation/CompilationFailedException.cs b/src/Microsoft.AspNet.CoreServices/Compilation/CompilationFailedException.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/Compilation/CompilationFailedException.cs rename to src/Microsoft.AspNet.CoreServices/Compilation/CompilationFailedException.cs diff --git a/Microsoft.AspNet.CoreServices/Compilation/CompilationMessage.cs b/src/Microsoft.AspNet.CoreServices/Compilation/CompilationMessage.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/Compilation/CompilationMessage.cs rename to src/Microsoft.AspNet.CoreServices/Compilation/CompilationMessage.cs diff --git a/Microsoft.AspNet.CoreServices/Compilation/CompilationResult.cs b/src/Microsoft.AspNet.CoreServices/Compilation/CompilationResult.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/Compilation/CompilationResult.cs rename to src/Microsoft.AspNet.CoreServices/Compilation/CompilationResult.cs diff --git a/src/Microsoft.AspNet.CoreServices/Compilation/CompilerCache.cs b/src/Microsoft.AspNet.CoreServices/Compilation/CompilerCache.cs new file mode 100644 index 0000000000..b0760bfc24 --- /dev/null +++ b/src/Microsoft.AspNet.CoreServices/Compilation/CompilerCache.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Concurrent; +using System.Threading.Tasks; +using Microsoft.Owin.FileSystems; + +namespace Microsoft.AspNet.CoreServices +{ + public class CompilerCache + { + private readonly ConcurrentDictionary _cache; + + public CompilerCache() + { + _cache = new ConcurrentDictionary(StringComparer.OrdinalIgnoreCase); + } + + public async Task GetOrAdd(IFileInfo file, Func> compile) + { + // Generate a content id + string contentId = file.PhysicalPath + '|' + file.LastModified.Ticks; + + Type compiledType; + if (!_cache.TryGetValue(contentId, out compiledType)) + { + CompilationResult result = await compile(); + _cache.TryAdd(contentId, result.CompiledType); + + return result; + } + + return CompilationResult.Successful(generatedCode: null, type: compiledType); + } + } +} diff --git a/Microsoft.AspNet.CoreServices/Compilation/CscBasedCompilationService.cs b/src/Microsoft.AspNet.CoreServices/Compilation/CscBasedCompilationService.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/Compilation/CscBasedCompilationService.cs rename to src/Microsoft.AspNet.CoreServices/Compilation/CscBasedCompilationService.cs diff --git a/Microsoft.AspNet.CoreServices/Compilation/DefaultCompilationService.cs b/src/Microsoft.AspNet.CoreServices/Compilation/DefaultCompilationService.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/Compilation/DefaultCompilationService.cs rename to src/Microsoft.AspNet.CoreServices/Compilation/DefaultCompilationService.cs diff --git a/Microsoft.AspNet.CoreServices/Compilation/ICompilationService.cs b/src/Microsoft.AspNet.CoreServices/Compilation/ICompilationService.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/Compilation/ICompilationService.cs rename to src/Microsoft.AspNet.CoreServices/Compilation/ICompilationService.cs diff --git a/Microsoft.AspNet.CoreServices/Microsoft.AspNet.CoreServices.csproj b/src/Microsoft.AspNet.CoreServices/Microsoft.AspNet.CoreServices.csproj similarity index 94% rename from Microsoft.AspNet.CoreServices/Microsoft.AspNet.CoreServices.csproj rename to src/Microsoft.AspNet.CoreServices/Microsoft.AspNet.CoreServices.csproj index fef8e420fd..390e17d671 100644 --- a/Microsoft.AspNet.CoreServices/Microsoft.AspNet.CoreServices.csproj +++ b/src/Microsoft.AspNet.CoreServices/Microsoft.AspNet.CoreServices.csproj @@ -31,11 +31,10 @@ - ..\packages\Microsoft.Owin.FileSystems.2.1.0-rc1\lib\net40\Microsoft.Owin.FileSystems.dll + ..\..\packages\Microsoft.Owin.FileSystems.2.1.0-rc1\lib\net40\Microsoft.Owin.FileSystems.dll - diff --git a/Microsoft.AspNet.CoreServices/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.CoreServices/Properties/AssemblyInfo.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/Properties/AssemblyInfo.cs rename to src/Microsoft.AspNet.CoreServices/Properties/AssemblyInfo.cs diff --git a/Microsoft.AspNet.CoreServices/ServiceProvider.cs b/src/Microsoft.AspNet.CoreServices/ServiceProvider.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/ServiceProvider.cs rename to src/Microsoft.AspNet.CoreServices/ServiceProvider.cs diff --git a/Microsoft.AspNet.CoreServices/ServiceProviderExtensions.cs b/src/Microsoft.AspNet.CoreServices/ServiceProviderExtensions.cs similarity index 100% rename from Microsoft.AspNet.CoreServices/ServiceProviderExtensions.cs rename to src/Microsoft.AspNet.CoreServices/ServiceProviderExtensions.cs diff --git a/Microsoft.AspNet.CoreServices/packages.config b/src/Microsoft.AspNet.CoreServices/packages.config similarity index 100% rename from Microsoft.AspNet.CoreServices/packages.config rename to src/Microsoft.AspNet.CoreServices/packages.config diff --git a/src/Microsoft.AspNet.CoreServices/project.json b/src/Microsoft.AspNet.CoreServices/project.json new file mode 100644 index 0000000000..b3c09afd7e --- /dev/null +++ b/src/Microsoft.AspNet.CoreServices/project.json @@ -0,0 +1,9 @@ +{ + "dependencies": [ + { "Microsoft.Owin.FileSystems": { "version": "2.0.2" } } + ], + "configurations": [ + { "net45": {} }, + { "k10": {} } + ] +} \ No newline at end of file diff --git a/Microsoft.AspNet.Mvc.Razor/HtmlString.cs b/src/Microsoft.AspNet.Mvc.Razor/HtmlString.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/HtmlString.cs rename to src/Microsoft.AspNet.Mvc.Razor/HtmlString.cs diff --git a/Microsoft.AspNet.Mvc.Razor/Microsoft.AspNet.Mvc.Razor.csproj b/src/Microsoft.AspNet.Mvc.Razor/Microsoft.AspNet.Mvc.Razor.csproj similarity index 94% rename from Microsoft.AspNet.Mvc.Razor/Microsoft.AspNet.Mvc.Razor.csproj rename to src/Microsoft.AspNet.Mvc.Razor/Microsoft.AspNet.Mvc.Razor.csproj index e784f8875d..114c214bb3 100644 --- a/Microsoft.AspNet.Mvc.Razor/Microsoft.AspNet.Mvc.Razor.csproj +++ b/src/Microsoft.AspNet.Mvc.Razor/Microsoft.AspNet.Mvc.Razor.csproj @@ -32,14 +32,14 @@ False - ..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll + ..\..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll - ..\packages\Microsoft.Owin.FileSystems.2.1.0-rc1\lib\net40\Microsoft.Owin.FileSystems.dll + ..\..\packages\Microsoft.Owin.FileSystems.2.1.0-rc1\lib\net40\Microsoft.Owin.FileSystems.dll False - ..\packages\Owin.1.0\lib\net40\Owin.dll + ..\..\packages\Owin.1.0\lib\net40\Owin.dll diff --git a/Microsoft.AspNet.Mvc.Razor/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.Mvc.Razor/Properties/AssemblyInfo.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/Properties/AssemblyInfo.cs rename to src/Microsoft.AspNet.Mvc.Razor/Properties/AssemblyInfo.cs diff --git a/Microsoft.AspNet.Mvc.Razor/Razor/MvcCSharpRazorCodeGenerator.cs b/src/Microsoft.AspNet.Mvc.Razor/Razor/MvcCSharpRazorCodeGenerator.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/Razor/MvcCSharpRazorCodeGenerator.cs rename to src/Microsoft.AspNet.Mvc.Razor/Razor/MvcCSharpRazorCodeGenerator.cs diff --git a/Microsoft.AspNet.Mvc.Razor/Razor/MvcCSharpRazorCodeParser.cs b/src/Microsoft.AspNet.Mvc.Razor/Razor/MvcCSharpRazorCodeParser.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/Razor/MvcCSharpRazorCodeParser.cs rename to src/Microsoft.AspNet.Mvc.Razor/Razor/MvcCSharpRazorCodeParser.cs diff --git a/Microsoft.AspNet.Mvc.Razor/Razor/MvcRazorHost.cs b/src/Microsoft.AspNet.Mvc.Razor/Razor/MvcRazorHost.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/Razor/MvcRazorHost.cs rename to src/Microsoft.AspNet.Mvc.Razor/Razor/MvcRazorHost.cs diff --git a/Microsoft.AspNet.Mvc.Razor/Razor/RazorCompilationService.cs b/src/Microsoft.AspNet.Mvc.Razor/Razor/RazorCompilationService.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/Razor/RazorCompilationService.cs rename to src/Microsoft.AspNet.Mvc.Razor/Razor/RazorCompilationService.cs diff --git a/Microsoft.AspNet.Mvc.Razor/Razor/SetModelTypeCodeGenerator.cs b/src/Microsoft.AspNet.Mvc.Razor/Razor/SetModelTypeCodeGenerator.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/Razor/SetModelTypeCodeGenerator.cs rename to src/Microsoft.AspNet.Mvc.Razor/Razor/SetModelTypeCodeGenerator.cs diff --git a/Microsoft.AspNet.Mvc.Razor/RazorView.cs b/src/Microsoft.AspNet.Mvc.Razor/RazorView.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/RazorView.cs rename to src/Microsoft.AspNet.Mvc.Razor/RazorView.cs diff --git a/Microsoft.AspNet.Mvc.Razor/RazorViewOfT.cs b/src/Microsoft.AspNet.Mvc.Razor/RazorViewOfT.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/RazorViewOfT.cs rename to src/Microsoft.AspNet.Mvc.Razor/RazorViewOfT.cs diff --git a/Microsoft.AspNet.Mvc.Razor/ViewEngine/IVirtualPathViewFactory.cs b/src/Microsoft.AspNet.Mvc.Razor/ViewEngine/IVirtualPathViewFactory.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/ViewEngine/IVirtualPathViewFactory.cs rename to src/Microsoft.AspNet.Mvc.Razor/ViewEngine/IVirtualPathViewFactory.cs diff --git a/Microsoft.AspNet.Mvc.Razor/ViewEngine/MetadataVirtualPathViewFactory.cs b/src/Microsoft.AspNet.Mvc.Razor/ViewEngine/MetadataVirtualPathViewFactory.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/ViewEngine/MetadataVirtualPathViewFactory.cs rename to src/Microsoft.AspNet.Mvc.Razor/ViewEngine/MetadataVirtualPathViewFactory.cs diff --git a/Microsoft.AspNet.Mvc.Razor/ViewEngine/RazorViewEngine.cs b/src/Microsoft.AspNet.Mvc.Razor/ViewEngine/RazorViewEngine.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/ViewEngine/RazorViewEngine.cs rename to src/Microsoft.AspNet.Mvc.Razor/ViewEngine/RazorViewEngine.cs diff --git a/Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualFileSystem.cs b/src/Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualFileSystem.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualFileSystem.cs rename to src/Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualFileSystem.cs diff --git a/Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualPathAttribute.cs b/src/Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualPathAttribute.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualPathAttribute.cs rename to src/Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualPathAttribute.cs diff --git a/Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualPathViewFactory.cs b/src/Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualPathViewFactory.cs similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualPathViewFactory.cs rename to src/Microsoft.AspNet.Mvc.Razor/ViewEngine/VirtualPathViewFactory.cs diff --git a/Microsoft.AspNet.Mvc.Razor/packages.config b/src/Microsoft.AspNet.Mvc.Razor/packages.config similarity index 100% rename from Microsoft.AspNet.Mvc.Razor/packages.config rename to src/Microsoft.AspNet.Mvc.Razor/packages.config diff --git a/src/Microsoft.AspNet.Mvc.Razor/project.json b/src/Microsoft.AspNet.Mvc.Razor/project.json new file mode 100644 index 0000000000..8e0fca2975 --- /dev/null +++ b/src/Microsoft.AspNet.Mvc.Razor/project.json @@ -0,0 +1,19 @@ +{ + "dependencies": [ + { "Owin": { "version": "1.0" } }, + { "Newtonsoft.Json": { "version": "4.5.11" } }, + { "Microsoft.Owin": { "version": "2.0.2" } }, + { "Microsoft.Owin.FileSystems": { "version": "2.0.2" } }, + { "Microsoft.AspNet.WebApi.Client": { "version": "5.0.0" } }, + { "Microsoft.AspNet.CoreServices" : { } } + ], + "configurations": [ + { "net45": { + "dependencies": [ + { "System.Net.Http" : { } } + ] + }, + "k10" : { } + } + ] +} \ No newline at end of file diff --git a/Microsoft.AspNet.Mvc/ActionDescriptor.cs b/src/Microsoft.AspNet.Mvc/ActionDescriptor.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionDescriptor.cs rename to src/Microsoft.AspNet.Mvc/ActionDescriptor.cs diff --git a/Microsoft.AspNet.Mvc/ActionDescriptorProvider.cs b/src/Microsoft.AspNet.Mvc/ActionDescriptorProvider.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionDescriptorProvider.cs rename to src/Microsoft.AspNet.Mvc/ActionDescriptorProvider.cs diff --git a/Microsoft.AspNet.Mvc/ActionInvokerFactory.cs b/src/Microsoft.AspNet.Mvc/ActionInvokerFactory.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionInvokerFactory.cs rename to src/Microsoft.AspNet.Mvc/ActionInvokerFactory.cs diff --git a/Microsoft.AspNet.Mvc/ActionInvokerProvider.cs b/src/Microsoft.AspNet.Mvc/ActionInvokerProvider.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionInvokerProvider.cs rename to src/Microsoft.AspNet.Mvc/ActionInvokerProvider.cs diff --git a/Microsoft.AspNet.Mvc/ActionResultFactory.cs b/src/Microsoft.AspNet.Mvc/ActionResultFactory.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionResultFactory.cs rename to src/Microsoft.AspNet.Mvc/ActionResultFactory.cs diff --git a/Microsoft.AspNet.Mvc/ActionResultHelper.cs b/src/Microsoft.AspNet.Mvc/ActionResultHelper.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionResultHelper.cs rename to src/Microsoft.AspNet.Mvc/ActionResultHelper.cs diff --git a/Microsoft.AspNet.Mvc/ActionResultHelperExtensions.cs b/src/Microsoft.AspNet.Mvc/ActionResultHelperExtensions.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionResultHelperExtensions.cs rename to src/Microsoft.AspNet.Mvc/ActionResultHelperExtensions.cs diff --git a/Microsoft.AspNet.Mvc/ActionResults/ContentResult.cs b/src/Microsoft.AspNet.Mvc/ActionResults/ContentResult.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionResults/ContentResult.cs rename to src/Microsoft.AspNet.Mvc/ActionResults/ContentResult.cs diff --git a/Microsoft.AspNet.Mvc/ActionResults/NegotiatedContentResult.cs b/src/Microsoft.AspNet.Mvc/ActionResults/NegotiatedContentResult.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionResults/NegotiatedContentResult.cs rename to src/Microsoft.AspNet.Mvc/ActionResults/NegotiatedContentResult.cs diff --git a/Microsoft.AspNet.Mvc/ActionResults/NoContentResult.cs b/src/Microsoft.AspNet.Mvc/ActionResults/NoContentResult.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionResults/NoContentResult.cs rename to src/Microsoft.AspNet.Mvc/ActionResults/NoContentResult.cs diff --git a/Microsoft.AspNet.Mvc/ActionResults/ObjectContent.cs b/src/Microsoft.AspNet.Mvc/ActionResults/ObjectContent.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ActionResults/ObjectContent.cs rename to src/Microsoft.AspNet.Mvc/ActionResults/ObjectContent.cs diff --git a/Microsoft.AspNet.Mvc/Controller.cs b/src/Microsoft.AspNet.Mvc/Controller.cs similarity index 100% rename from Microsoft.AspNet.Mvc/Controller.cs rename to src/Microsoft.AspNet.Mvc/Controller.cs diff --git a/Microsoft.AspNet.Mvc/ControllerActionInvoker.cs b/src/Microsoft.AspNet.Mvc/ControllerActionInvoker.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ControllerActionInvoker.cs rename to src/Microsoft.AspNet.Mvc/ControllerActionInvoker.cs diff --git a/Microsoft.AspNet.Mvc/ControllerBasedActionDescriptor.cs b/src/Microsoft.AspNet.Mvc/ControllerBasedActionDescriptor.cs similarity index 100% rename from Microsoft.AspNet.Mvc/ControllerBasedActionDescriptor.cs rename to src/Microsoft.AspNet.Mvc/ControllerBasedActionDescriptor.cs diff --git a/Microsoft.AspNet.Mvc/DefaultContentNegotiator.cs b/src/Microsoft.AspNet.Mvc/DefaultContentNegotiator.cs similarity index 100% rename from Microsoft.AspNet.Mvc/DefaultContentNegotiator.cs rename to src/Microsoft.AspNet.Mvc/DefaultContentNegotiator.cs diff --git a/Microsoft.AspNet.Mvc/DefaultControllerFactory.cs b/src/Microsoft.AspNet.Mvc/DefaultControllerFactory.cs similarity index 100% rename from Microsoft.AspNet.Mvc/DefaultControllerFactory.cs rename to src/Microsoft.AspNet.Mvc/DefaultControllerFactory.cs diff --git a/Microsoft.AspNet.Mvc/EmptyResult.cs b/src/Microsoft.AspNet.Mvc/EmptyResult.cs similarity index 100% rename from Microsoft.AspNet.Mvc/EmptyResult.cs rename to src/Microsoft.AspNet.Mvc/EmptyResult.cs diff --git a/Microsoft.AspNet.Mvc/Extensions/IEnumerableExtensions.cs b/src/Microsoft.AspNet.Mvc/Extensions/IEnumerableExtensions.cs similarity index 100% rename from Microsoft.AspNet.Mvc/Extensions/IEnumerableExtensions.cs rename to src/Microsoft.AspNet.Mvc/Extensions/IEnumerableExtensions.cs diff --git a/Microsoft.AspNet.Mvc/Extensions/TypeExtensions.cs b/src/Microsoft.AspNet.Mvc/Extensions/TypeExtensions.cs similarity index 100% rename from Microsoft.AspNet.Mvc/Extensions/TypeExtensions.cs rename to src/Microsoft.AspNet.Mvc/Extensions/TypeExtensions.cs diff --git a/Microsoft.AspNet.Mvc/Formatters/JQeryMvcForUrlEncodedFormatter.cs b/src/Microsoft.AspNet.Mvc/Formatters/JQeryMvcForUrlEncodedFormatter.cs similarity index 100% rename from Microsoft.AspNet.Mvc/Formatters/JQeryMvcForUrlEncodedFormatter.cs rename to src/Microsoft.AspNet.Mvc/Formatters/JQeryMvcForUrlEncodedFormatter.cs diff --git a/Microsoft.AspNet.Mvc/FormattingUtilities.cs b/src/Microsoft.AspNet.Mvc/FormattingUtilities.cs similarity index 100% rename from Microsoft.AspNet.Mvc/FormattingUtilities.cs rename to src/Microsoft.AspNet.Mvc/FormattingUtilities.cs diff --git a/Microsoft.AspNet.Mvc/HttpResponseMessageActionResult.cs b/src/Microsoft.AspNet.Mvc/HttpResponseMessageActionResult.cs similarity index 100% rename from Microsoft.AspNet.Mvc/HttpResponseMessageActionResult.cs rename to src/Microsoft.AspNet.Mvc/HttpResponseMessageActionResult.cs diff --git a/Microsoft.AspNet.Mvc/HttpStatusCodeResult.cs b/src/Microsoft.AspNet.Mvc/HttpStatusCodeResult.cs similarity index 100% rename from Microsoft.AspNet.Mvc/HttpStatusCodeResult.cs rename to src/Microsoft.AspNet.Mvc/HttpStatusCodeResult.cs diff --git a/Microsoft.AspNet.Mvc/IActionDescriptorProvider.cs b/src/Microsoft.AspNet.Mvc/IActionDescriptorProvider.cs similarity index 100% rename from Microsoft.AspNet.Mvc/IActionDescriptorProvider.cs rename to src/Microsoft.AspNet.Mvc/IActionDescriptorProvider.cs diff --git a/Microsoft.AspNet.Mvc/IActionInvoker.cs b/src/Microsoft.AspNet.Mvc/IActionInvoker.cs similarity index 100% rename from Microsoft.AspNet.Mvc/IActionInvoker.cs rename to src/Microsoft.AspNet.Mvc/IActionInvoker.cs diff --git a/Microsoft.AspNet.Mvc/IActionInvokerFactory.cs b/src/Microsoft.AspNet.Mvc/IActionInvokerFactory.cs similarity index 100% rename from Microsoft.AspNet.Mvc/IActionInvokerFactory.cs rename to src/Microsoft.AspNet.Mvc/IActionInvokerFactory.cs diff --git a/Microsoft.AspNet.Mvc/IActionInvokerProvider.cs b/src/Microsoft.AspNet.Mvc/IActionInvokerProvider.cs similarity index 100% rename from Microsoft.AspNet.Mvc/IActionInvokerProvider.cs rename to src/Microsoft.AspNet.Mvc/IActionInvokerProvider.cs diff --git a/Microsoft.AspNet.Mvc/IActionResult.cs b/src/Microsoft.AspNet.Mvc/IActionResult.cs similarity index 100% rename from Microsoft.AspNet.Mvc/IActionResult.cs rename to src/Microsoft.AspNet.Mvc/IActionResult.cs diff --git a/Microsoft.AspNet.Mvc/IActionResultFactory.cs b/src/Microsoft.AspNet.Mvc/IActionResultFactory.cs similarity index 100% rename from Microsoft.AspNet.Mvc/IActionResultFactory.cs rename to src/Microsoft.AspNet.Mvc/IActionResultFactory.cs diff --git a/Microsoft.AspNet.Mvc/IActionResultHelper.cs b/src/Microsoft.AspNet.Mvc/IActionResultHelper.cs similarity index 100% rename from Microsoft.AspNet.Mvc/IActionResultHelper.cs rename to src/Microsoft.AspNet.Mvc/IActionResultHelper.cs diff --git a/Microsoft.AspNet.Mvc/IControllerFactory.cs b/src/Microsoft.AspNet.Mvc/IControllerFactory.cs similarity index 100% rename from Microsoft.AspNet.Mvc/IControllerFactory.cs rename to src/Microsoft.AspNet.Mvc/IControllerFactory.cs diff --git a/Microsoft.AspNet.Mvc/IOwinContentNegotiator.cs b/src/Microsoft.AspNet.Mvc/IOwinContentNegotiator.cs similarity index 100% rename from Microsoft.AspNet.Mvc/IOwinContentNegotiator.cs rename to src/Microsoft.AspNet.Mvc/IOwinContentNegotiator.cs diff --git a/Microsoft.AspNet.Mvc/Microsoft.AspNet.Mvc.csproj b/src/Microsoft.AspNet.Mvc/Microsoft.AspNet.Mvc.csproj similarity index 95% rename from Microsoft.AspNet.Mvc/Microsoft.AspNet.Mvc.csproj rename to src/Microsoft.AspNet.Mvc/Microsoft.AspNet.Mvc.csproj index af56f7c519..35d60e3ec6 100644 --- a/Microsoft.AspNet.Mvc/Microsoft.AspNet.Mvc.csproj +++ b/src/Microsoft.AspNet.Mvc/Microsoft.AspNet.Mvc.csproj @@ -31,13 +31,13 @@ - ..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll + ..\..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll - ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll - ..\packages\Owin.1.0\lib\net40\Owin.dll + ..\..\packages\Owin.1.0\lib\net40\Owin.dll diff --git a/Microsoft.AspNet.Mvc/MvcHandler.cs b/src/Microsoft.AspNet.Mvc/MvcHandler.cs similarity index 100% rename from Microsoft.AspNet.Mvc/MvcHandler.cs rename to src/Microsoft.AspNet.Mvc/MvcHandler.cs diff --git a/Microsoft.AspNet.Mvc/MvcServices.cs b/src/Microsoft.AspNet.Mvc/MvcServices.cs similarity index 100% rename from Microsoft.AspNet.Mvc/MvcServices.cs rename to src/Microsoft.AspNet.Mvc/MvcServices.cs diff --git a/Microsoft.AspNet.Mvc/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.Mvc/Properties/AssemblyInfo.cs similarity index 100% rename from Microsoft.AspNet.Mvc/Properties/AssemblyInfo.cs rename to src/Microsoft.AspNet.Mvc/Properties/AssemblyInfo.cs diff --git a/Microsoft.AspNet.Mvc/RequestContext.cs b/src/Microsoft.AspNet.Mvc/RequestContext.cs similarity index 100% rename from Microsoft.AspNet.Mvc/RequestContext.cs rename to src/Microsoft.AspNet.Mvc/RequestContext.cs diff --git a/Microsoft.AspNet.Mvc/Routing/IRouteData.cs b/src/Microsoft.AspNet.Mvc/Routing/IRouteData.cs similarity index 100% rename from Microsoft.AspNet.Mvc/Routing/IRouteData.cs rename to src/Microsoft.AspNet.Mvc/Routing/IRouteData.cs diff --git a/Microsoft.AspNet.Mvc/View/CompositeViewEngine.cs b/src/Microsoft.AspNet.Mvc/View/CompositeViewEngine.cs similarity index 100% rename from Microsoft.AspNet.Mvc/View/CompositeViewEngine.cs rename to src/Microsoft.AspNet.Mvc/View/CompositeViewEngine.cs diff --git a/Microsoft.AspNet.Mvc/View/IView.cs b/src/Microsoft.AspNet.Mvc/View/IView.cs similarity index 100% rename from Microsoft.AspNet.Mvc/View/IView.cs rename to src/Microsoft.AspNet.Mvc/View/IView.cs diff --git a/Microsoft.AspNet.Mvc/View/IViewEngine.cs b/src/Microsoft.AspNet.Mvc/View/IViewEngine.cs similarity index 100% rename from Microsoft.AspNet.Mvc/View/IViewEngine.cs rename to src/Microsoft.AspNet.Mvc/View/IViewEngine.cs diff --git a/Microsoft.AspNet.Mvc/View/ViewContext.cs b/src/Microsoft.AspNet.Mvc/View/ViewContext.cs similarity index 100% rename from Microsoft.AspNet.Mvc/View/ViewContext.cs rename to src/Microsoft.AspNet.Mvc/View/ViewContext.cs diff --git a/Microsoft.AspNet.Mvc/View/ViewDataDictionary.cs b/src/Microsoft.AspNet.Mvc/View/ViewDataDictionary.cs similarity index 100% rename from Microsoft.AspNet.Mvc/View/ViewDataDictionary.cs rename to src/Microsoft.AspNet.Mvc/View/ViewDataDictionary.cs diff --git a/Microsoft.AspNet.Mvc/View/ViewEngineResult.cs b/src/Microsoft.AspNet.Mvc/View/ViewEngineResult.cs similarity index 100% rename from Microsoft.AspNet.Mvc/View/ViewEngineResult.cs rename to src/Microsoft.AspNet.Mvc/View/ViewEngineResult.cs diff --git a/Microsoft.AspNet.Mvc/View/ViewResult.cs b/src/Microsoft.AspNet.Mvc/View/ViewResult.cs similarity index 100% rename from Microsoft.AspNet.Mvc/View/ViewResult.cs rename to src/Microsoft.AspNet.Mvc/View/ViewResult.cs diff --git a/Microsoft.AspNet.Mvc/packages.config b/src/Microsoft.AspNet.Mvc/packages.config similarity index 100% rename from Microsoft.AspNet.Mvc/packages.config rename to src/Microsoft.AspNet.Mvc/packages.config diff --git a/Microsoft.AspNet.Mvc/project.json b/src/Microsoft.AspNet.Mvc/project.json similarity index 100% rename from Microsoft.AspNet.Mvc/project.json rename to src/Microsoft.AspNet.Mvc/project.json