diff --git a/.gitignore b/.gitignore index 1b6e30413e..37e2db660f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ packages/ artifacts/ PublishProfiles/ .vs/ +.vscode/ bower_components/ node_modules/ debugSettings.json @@ -36,4 +37,5 @@ nuget.exe node_modules *launchSettings.json *.orig -BuildInfo.generated.cs \ No newline at end of file +BuildInfo.generated.cs +msbuild.log \ No newline at end of file diff --git a/RazorViewCompilation.sln b/RazorViewCompilation.sln index 5d7269e8ea..6b652d4198 100644 --- a/RazorViewCompilation.sln +++ b/RazorViewCompilation.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26014.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design", "src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.xproj", "{4339FC9B-AEC6-442A-B413-A41555ED76C7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation", "src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj", "{4339FC9B-AEC6-442A-B413-A41555ED76C7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFiles", "SolutionFiles", "{01707B64-7DC7-4B5A-B0BB-7CD2773AA297}" ProjectSection(SolutionItems) = preProject @@ -13,51 +13,77 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFiles", "SolutionFi EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{02F7AA35-91AF-491E-9F0E-03CFAF86C720}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools", "src\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.xproj", "{F8BF7D95-0633-407F-BB0B-02563F13C068}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0398AFFF-505E-4283-89DA-BBD9D28B53DB}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests", "test\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests.xproj", "{46C9A4B2-8B1C-451B-B670-C194901D66AC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests", "test\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests.csproj", "{46C9A4B2-8B1C-451B-B670-C194901D66AC}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test", "test\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test.xproj", "{B58E3380-D451-4E54-B522-CD21404FCD58}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test", "test\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test.xproj", "{E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test", "test\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test.csproj", "{E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}" EndProject + Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Debug|x64.ActiveCfg = Debug|x64 + {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Debug|x64.Build.0 = Debug|x64 + {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Debug|x86.ActiveCfg = Debug|x86 + {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Debug|x86.Build.0 = Debug|x86 {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Release|Any CPU.ActiveCfg = Release|Any CPU {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Release|Any CPU.Build.0 = Release|Any CPU - {F8BF7D95-0633-407F-BB0B-02563F13C068}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F8BF7D95-0633-407F-BB0B-02563F13C068}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F8BF7D95-0633-407F-BB0B-02563F13C068}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F8BF7D95-0633-407F-BB0B-02563F13C068}.Release|Any CPU.Build.0 = Release|Any CPU + {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Release|x64.ActiveCfg = Release|x64 + {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Release|x64.Build.0 = Release|x64 + {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Release|x86.ActiveCfg = Release|x86 + {4339FC9B-AEC6-442A-B413-A41555ED76C7}.Release|x86.Build.0 = Release|x86 {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Debug|x64.ActiveCfg = Debug|x64 + {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Debug|x64.Build.0 = Debug|x64 + {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Debug|x86.ActiveCfg = Debug|x86 + {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Debug|x86.Build.0 = Debug|x86 {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Release|Any CPU.ActiveCfg = Release|Any CPU {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Release|Any CPU.Build.0 = Release|Any CPU - {B58E3380-D451-4E54-B522-CD21404FCD58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B58E3380-D451-4E54-B522-CD21404FCD58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B58E3380-D451-4E54-B522-CD21404FCD58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B58E3380-D451-4E54-B522-CD21404FCD58}.Release|Any CPU.Build.0 = Release|Any CPU + {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Release|x64.ActiveCfg = Release|x64 + {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Release|x64.Build.0 = Release|x64 + {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Release|x86.ActiveCfg = Release|x86 + {46C9A4B2-8B1C-451B-B670-C194901D66AC}.Release|x86.Build.0 = Release|x86 {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Debug|x64.ActiveCfg = Debug|x64 + {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Debug|x64.Build.0 = Debug|x64 + {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Debug|x86.ActiveCfg = Debug|x86 + {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Debug|x86.Build.0 = Debug|x86 {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|Any CPU.ActiveCfg = Release|Any CPU {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|Any CPU.Build.0 = Release|Any CPU + {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|x64.ActiveCfg = Release|x64 + {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|x64.Build.0 = Release|x64 + {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|x86.ActiveCfg = Release|x86 + {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F}.Release|x86.Build.0 = Release|x86 + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Debug|x64.ActiveCfg = Debug|x64 + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Debug|x64.Build.0 = Debug|x64 + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Debug|x86.ActiveCfg = Debug|x86 + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Debug|x86.Build.0 = Debug|x86 + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Release|Any CPU.Build.0 = Release|Any CPU + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Release|x64.ActiveCfg = Release|x64 + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Release|x64.Build.0 = Release|x64 + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Release|x86.ActiveCfg = Release|x86 + {1140C5E1-1C9A-4895-BB7E-C2AB2C320472}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {4339FC9B-AEC6-442A-B413-A41555ED76C7} = {02F7AA35-91AF-491E-9F0E-03CFAF86C720} - {F8BF7D95-0633-407F-BB0B-02563F13C068} = {02F7AA35-91AF-491E-9F0E-03CFAF86C720} {46C9A4B2-8B1C-451B-B670-C194901D66AC} = {0398AFFF-505E-4283-89DA-BBD9D28B53DB} - {B58E3380-D451-4E54-B522-CD21404FCD58} = {0398AFFF-505E-4283-89DA-BBD9D28B53DB} {E0D75B4E-839F-4F80-9B1F-B33F616BCC5F} = {0398AFFF-505E-4283-89DA-BBD9D28B53DB} EndGlobalSection EndGlobal diff --git a/build.ps1 b/build.ps1 index 8f2f99691a..0605b59c01 100644 --- a/build.ps1 +++ b/build.ps1 @@ -33,7 +33,7 @@ cd $PSScriptRoot $repoFolder = $PSScriptRoot $env:REPO_FOLDER = $repoFolder -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/feature/msbuild.zip" if ($env:KOREBUILD_ZIP) { $koreBuildZip=$env:KOREBUILD_ZIP diff --git a/build.sh b/build.sh index 4fd7ede788..f986d4f4df 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" +koreBuildZip="https://github.com/aspnet/KoreBuild/archive/feature/msbuild/dev.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi diff --git a/tools/Key.snk b/build/Key.snk similarity index 100% rename from tools/Key.snk rename to build/Key.snk diff --git a/build/common.props b/build/common.props new file mode 100644 index 0000000000..95f3fa44d2 --- /dev/null +++ b/build/common.props @@ -0,0 +1,21 @@ + + + + + + Microsoft ASP.NET Core + https://github.com/aspnet/MvcPrecompilation + git + $(MSBuildThisFileDirectory)../build/Key.snk + true + true + + + + + + + \ No newline at end of file diff --git a/global.json b/global.json deleted file mode 100644 index 9ecb1c6efa..0000000000 --- a/global.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "projects": [ - "src", - "samples" - ], - "sdk": { - "version": "1.0.0-preview2-1-003180" - } -} \ No newline at end of file diff --git a/makefile.shade b/makefile.shade deleted file mode 100644 index 84b5ff3c02..0000000000 --- a/makefile.shade +++ /dev/null @@ -1,20 +0,0 @@ -use namespace="System.IO" - --BuildQuality = "preview4"; -use-standard-lifecycle -k-standard-goals - -#repo-initialize target='initialize' - use-volatile-feed - @{ - var directoriesToRestore = "test"; - if (Directory.Exists("src")) - { - directoriesToRestore = "src " + directoriesToRestore; - } - } - dotnet command='restore ${directoriesToRestore} ${E("KOREBUILD_DOTNET_RESTORE_OPTIONS")}' workingDir='${Directory.GetCurrentDirectory()}' if='!NoRestore' - - Directory.CreateDirectory(Path.Combine(Directory.GetCurrentDirectory(), "artifacts", "build")); - -#xunit-test - - // Temporarily no-op until we have a resolution for https://github.com/aspnet/MvcPrecompilation/issues/48 \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.xproj b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.xproj deleted file mode 100644 index 253d7491f8..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 4339fc9b-aec6-442a-b413-a41555ed76c7 - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Program.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Program.cs deleted file mode 100644 index d0d272d07a..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Program.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Linq; -using System.Reflection; -using Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal; - -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design -{ - public class Program - { - private readonly static Type ProgramType = typeof(Program); - - public static int Main(string[] args) - { -#if DEBUG - DebugHelper.HandleDebugSwitch(ref args); -#endif - - EnsureValidDispatchRecipient(ref args); - - var app = new PrecompilationApplication(ProgramType); - new PrecompileRunCommand().Configure(app); - return app.Execute(args); - } - - private static void EnsureValidDispatchRecipient(ref string[] args) - { - const string DispatcherVersionArgumentName = "--dispatcher-version"; - - var dispatcherArgumentIndex = Array.FindIndex( - args, - (value) => string.Equals(value, DispatcherVersionArgumentName, StringComparison.OrdinalIgnoreCase)); - - if (dispatcherArgumentIndex < 0) - { - return; - } - - var dispatcherArgumentValueIndex = dispatcherArgumentIndex + 1; - if (dispatcherArgumentValueIndex < args.Length) - { - var dispatcherVersion = args[dispatcherArgumentValueIndex]; - - var thisAssembly = ProgramType.GetTypeInfo().Assembly; - var version = thisAssembly.GetCustomAttribute() - ?.InformationalVersion - ?? thisAssembly.GetName().Version.ToString(); - - if (string.Equals(dispatcherVersion, version, StringComparison.Ordinal)) - { - // Remove dispatcher arguments from - var preDispatcherArgument = args.Take(dispatcherArgumentIndex); - var postDispatcherArgument = args.Skip(dispatcherArgumentIndex + 2); - var newProgramArguments = preDispatcherArgument.Concat(postDispatcherArgument); - args = newProgramArguments.ToArray(); - return; - } - } - - // Could not validate the dispatcher version. - throw new InvalidOperationException("Could not invoke tool"); - } - } -} diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Properties/AssemblyInfo.cs deleted file mode 100644 index 2dc4003a17..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Reflection; -using System.Resources; - -[assembly: AssemblyMetadata("Serviceable", "True")] -[assembly: NeutralResourcesLanguage("en-us")] -[assembly: AssemblyCompany("Microsoft Corporation.")] -[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] -[assembly: AssemblyProduct("Microsoft ASP.NET Core")] diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/project.json b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/project.json deleted file mode 100644 index ffa4e27989..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/project.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "version": "1.2.0-*", - "description": "Build-time references required to enable Razor view compilation as part of building the application.", - "packOptions": { - "repository": { - "type": "git", - "url": "git://github.com/AspNet/Mvc" - }, - "tags": [ - "cshtml", - "razor", - "compilation", - "precompilation", - "aspnetcore" - ] - }, - "buildOptions": { - "keyFile": "../../tools/Key.snk", - "warningsAsErrors": true, - "emitEntryPoint": true, - "nowarn": [ - "CS1591" - ], - "xmlDoc": true - }, - "dependencies": { - "Microsoft.AspNetCore.Hosting": "1.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor": "1.2.0-*", - "Microsoft.Extensions.CommandLineUtils": "1.2.0-*" - }, - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.1.0-*" - } - } - }, - "net451": {} - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Internal/PrecompileDispatchCommand.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Internal/PrecompileDispatchCommand.cs deleted file mode 100644 index 8d73479987..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Internal/PrecompileDispatchCommand.cs +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal; -using Microsoft.DotNet.InternalAbstractions; -using Microsoft.DotNet.ProjectModel; -using Microsoft.Extensions.CommandLineUtils; -using Microsoft.Extensions.Internal; -using NuGet.Frameworks; - -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal -{ - public class PrecompileDispatchCommand - { - private CommandLineApplication Application { get; set; } - - private CommonOptions Options { get; } = new CommonOptions(); - - private CommandOption FrameworkOption { get; set; } - - private CommandOption ConfigurationOption { get; set; } - - private CommandOption OutputPathOption { get; set; } - - private CommandOption BuildBasePathOption { get; set; } - - private NuGetFramework TargetFramework { get; set; } - - private CommandOption DumpFilesOption { get; set; } - - private string ProjectPath { get; set; } - - private string Configuration { get; set; } - - private string OutputPath { get; set; } - - public void Configure(CommandLineApplication app) - { - Application = app; - Options.Configure(app); - FrameworkOption = app.Option( - "-f|--framework", - "Target Framework", - CommandOptionType.SingleValue); - - ConfigurationOption = app.Option( - "-c|--configuration", - "Configuration", - CommandOptionType.SingleValue); - - OutputPathOption = app.Option( - "-o|--output-path", - "Output path.", - CommandOptionType.SingleValue); - - app.OnExecute(() => Execute()); - } - - private int Execute() - { - if (!ParseArguments()) - { - return 1; - } - - var runtimeContext = GetRuntimeContext(); - - var outputPaths = runtimeContext.GetOutputPaths(Configuration); - var applicationName = Path.GetFileNameWithoutExtension(outputPaths.CompilationFiles.Assembly); - var dispatchArgs = new List - { - ProjectPath, - PrecompileRunCommand.ApplicationNameTemplate, - applicationName, - PrecompileRunCommand.OutputPathTemplate, - OutputPath, - CommonOptions.ContentRootTemplate, - Options.ContentRootOption.Value() ?? Directory.GetCurrentDirectory(), - }; - - if (Options.ConfigureCompilationType.HasValue()) - { - dispatchArgs.Add(CommonOptions.ConfigureCompilationTypeTemplate); - dispatchArgs.Add(Options.ConfigureCompilationType.Value()); - } - - if (Options.EmbedViewSourcesOption.HasValue()) - { - dispatchArgs.Add(CommonOptions.EmbedViewSourceTemplate); - } - - var compilerOptions = runtimeContext.ProjectFile.GetCompilerOptions(runtimeContext.TargetFramework, Configuration); - if (!string.IsNullOrEmpty(compilerOptions.KeyFile)) - { - dispatchArgs.Add(StrongNameOptions.StrongNameKeyPath); - var keyFilePath = Path.GetFullPath(Path.Combine(runtimeContext.ProjectDirectory, compilerOptions.KeyFile)); - dispatchArgs.Add(keyFilePath); - - if (compilerOptions.DelaySign ?? false) - { - dispatchArgs.Add(StrongNameOptions.DelaySignTemplate); - } - - if (compilerOptions.PublicSign ?? false) - { - dispatchArgs.Add(StrongNameOptions.PublicSignTemplate); - } - } - -#if DEBUG - var commandLineArgs = Environment.GetCommandLineArgs(); - if (commandLineArgs.Length > 1 && commandLineArgs[1] == "--debug") - { - dispatchArgs.Insert(0, commandLineArgs[1]); - } -#endif - - var toolName = typeof(Design.Program).GetTypeInfo().Assembly.GetName().Name; - var dispatchCommand = DotnetToolDispatcher.CreateDispatchCommand( - dispatchArgs, - runtimeContext.TargetFramework, - Configuration, - outputPath: outputPaths.RuntimeOutputPath, - buildBasePath: null, - projectDirectory: ProjectPath, - toolName: toolName); - - var commandExitCode = dispatchCommand - .ForwardStdErr(Application.Error) - .ForwardStdOut(Application.Out) - .Execute() - .ExitCode; - - return commandExitCode; - } - - private bool ParseArguments() - { - ProjectPath = GetProjectPath(Options.ProjectArgument.Value); - Configuration = ConfigurationOption.Value() ?? DotNet.Cli.Utils.Constants.DefaultConfiguration; - - if (FrameworkOption.HasValue()) - { - TargetFramework = NuGetFramework.Parse(FrameworkOption.Value()); - } - - if (!OutputPathOption.HasValue()) - { - Application.Error.WriteLine($"Option {OutputPathOption.Template} does not have a value."); - return false; - } - OutputPath = OutputPathOption.Value(); - - return true; - } - - public static string GetProjectPath(string projectArgument) - { - string projectPath; - if (!string.IsNullOrEmpty(projectArgument)) - { - projectPath = Path.GetFullPath(projectArgument); - if (string.Equals(Path.GetFileName(projectPath), "project.json", StringComparison.OrdinalIgnoreCase)) - { - projectPath = Path.GetDirectoryName(projectPath); - } - - if (!Directory.Exists(projectPath)) - { - throw new InvalidOperationException($"Could not find directory {projectPath}."); - } - } - else - { - projectPath = Directory.GetCurrentDirectory(); - } - - return projectPath; - } - - private ProjectContext GetRuntimeContext() - { - var workspace = new BuildWorkspace(ProjectReaderSettings.ReadFromEnvironment()); - var projectContexts = ProjectContext.CreateContextForEachFramework(ProjectPath).ToArray(); - ProjectContext projectContext; - if (TargetFramework != null) - { - projectContext = projectContexts.FirstOrDefault(context => context.TargetFramework.Equals(TargetFramework)); - if (projectContext == null) - { - throw new InvalidOperationException($"Project '{ProjectPath}' does not support framework: {FrameworkOption.Value()}"); - } - } - else if (projectContexts.Length == 1) - { - projectContext = projectContexts[0]; - } - else - { - throw new InvalidOperationException($"Project '{ProjectPath}' targets multiple frameworks. Specify one using '{FrameworkOption.Template}."); - } - - return workspace.GetRuntimeContext( - projectContext, - RuntimeEnvironmentRidExtensions.GetAllCandidateRuntimeIdentifiers()); - } - } -} diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.xproj b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.xproj deleted file mode 100644 index 6b5961a59f..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - f8bf7d95-0633-407f-bb0b-02563f13c068 - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Properties/AssemblyInfo.cs deleted file mode 100644 index 2dc4003a17..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Reflection; -using System.Resources; - -[assembly: AssemblyMetadata("Serviceable", "True")] -[assembly: NeutralResourcesLanguage("en-us")] -[assembly: AssemblyCompany("Microsoft Corporation.")] -[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] -[assembly: AssemblyProduct("Microsoft ASP.NET Core")] diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/project.json b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/project.json deleted file mode 100644 index 4d33093c28..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/project.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "version": "1.2.0-*", - "description": "Razor view compilation for compiling CSHTML files into DLLs.", - "packOptions": { - "repository": { - "type": "git", - "url": "git://github.com/AspNet/Mvc" - }, - "tags": [ - "cshtml", - "razor", - "compilation", - "precompilation", - "aspnetcore" - ] - }, - "buildOptions": { - "outputName": "dotnet-razor-precompile", - "keyFile": "../../tools/Key.snk", - "warningsAsErrors": true, - "emitEntryPoint": true, - "nowarn": [ - "CS1591" - ], - "xmlDoc": true - }, - "dependencies": { - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design": { - "target": "project" - }, - "Microsoft.DotNet.Cli.Utils": "1.0.0-preview2-003121", - "Microsoft.Extensions.CommandLineUtils": "1.2.0-*", - "Microsoft.Extensions.DotnetToolDispatcher.Sources": { - "type": "build", - "version": "1.2.0-*" - } - }, - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.DotNet.InternalAbstractions": "1.0.0", - "Microsoft.DotNet.ProjectModel.Loader": "1.0.0-preview2-003121", - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.1.0-*" - }, - "System.Runtime.Serialization.Primitives": "4.3.0-*" - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/CommonOptions.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/CommonOptions.cs similarity index 95% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/CommonOptions.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/CommonOptions.cs index 6a705c347c..5f954cf7b5 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/CommonOptions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/CommonOptions.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.CommandLineUtils; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal { public class CommonOptions { diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/DebugHelper.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/DebugHelper.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/DebugHelper.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/DebugHelper.cs index fb4f36a0c1..1999e85041 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/DebugHelper.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/DebugHelper.cs @@ -6,7 +6,7 @@ using System; using System.Diagnostics; using System.Linq; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal { public static class DebugHelper { diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/MvcServiceProvider.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/MvcServiceProvider.cs similarity index 98% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/MvcServiceProvider.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/MvcServiceProvider.cs index a4d33d32dc..1c9146757b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/MvcServiceProvider.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/MvcServiceProvider.cs @@ -14,7 +14,7 @@ using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.ObjectPool; using Microsoft.Extensions.Options; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal { public class MvcServiceProvider { diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/PrecompilationApplication.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/PrecompilationApplication.cs similarity index 65% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/PrecompilationApplication.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/PrecompilationApplication.cs index fc62ff1596..bd1ac8a803 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/PrecompilationApplication.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/PrecompilationApplication.cs @@ -2,10 +2,12 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Collections.Generic; +using System.IO; using System.Reflection; using Microsoft.Extensions.CommandLineUtils; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal { public class PrecompilationApplication : CommandLineApplication { @@ -33,7 +35,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal { try { - return base.Execute(args); + return base.Execute(ExpandResponseFiles(args)); } catch (Exception ex) { @@ -49,5 +51,24 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal var attribute = assembly.GetCustomAttribute(); return attribute.InformationalVersion; } + + private static string[] ExpandResponseFiles(string[] args) + { + var expandedArgs = new List(); + foreach (var arg in args) + { + if (!arg.StartsWith("@", StringComparison.Ordinal)) + { + expandedArgs.Add(arg); + } + else + { + var fileName = arg.Substring(1); + expandedArgs.AddRange(File.ReadLines(fileName)); + } + } + + return expandedArgs.ToArray(); + } } } diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/PrecompileRunCommand.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/PrecompileRunCommand.cs similarity index 96% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/PrecompileRunCommand.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/PrecompileRunCommand.cs index b68ef54157..91c6f8ef81 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/PrecompileRunCommand.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/PrecompileRunCommand.cs @@ -19,7 +19,7 @@ using Microsoft.CodeAnalysis.Text; using Microsoft.Extensions.CommandLineUtils; using Microsoft.Extensions.FileProviders; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal { public class PrecompileRunCommand { @@ -76,9 +76,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal Options.ContentRootOption.Value(), Options.ConfigureCompilationType.Value()); - Application.Out.WriteLine("Running Razor view precompilation."); - - var stopWatch = Stopwatch.StartNew(); var results = GenerateCode(); var success = true; foreach (var result in results) @@ -119,9 +116,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal return 1; } - stopWatch.Stop(); - Application.Out.WriteLine($"Precompiled views emitted to {assemblyPath}."); - Application.Out.WriteLine($"Successfully compiled {results.Length} Razor views in {stopWatch.ElapsedMilliseconds}ms."); return 0; } diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/SnkUtils.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/SnkUtils.cs similarity index 97% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/SnkUtils.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/SnkUtils.cs index 7f5d052686..dfe3edb258 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/SnkUtils.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/SnkUtils.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Immutable; using System.IO; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal { // Copied from https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.DotNet.ProjectModel.Workspaces/SnkUtils.cs public static class SnkUtils diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/StrongNameOptions.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/StrongNameOptions.cs similarity index 95% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/StrongNameOptions.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/StrongNameOptions.cs index 0fac0f178d..d22580bc1e 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/StrongNameOptions.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/StrongNameOptions.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.CommandLineUtils; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal { public class StrongNameOptions { diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/ViewCompilationInfo.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/ViewCompilationInfo.cs similarity index 90% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/ViewCompilationInfo.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/ViewCompilationInfo.cs index 56e14123e8..8630b3f456 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/ViewCompilationInfo.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/ViewCompilationInfo.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc.Razor.Compilation; using Microsoft.AspNetCore.Razor.CodeGenerators; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal { public class ViewCompilationInfo { diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/ViewInfoContainerCodeGenerator.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/ViewInfoContainerCodeGenerator.cs similarity index 94% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/ViewInfoContainerCodeGenerator.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/ViewInfoContainerCodeGenerator.cs index 0d7942553b..4c02f27d0a 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design/Internal/ViewInfoContainerCodeGenerator.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Internal/ViewInfoContainerCodeGenerator.cs @@ -13,7 +13,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal { public class ViewInfoContainerCodeGenerator { @@ -63,15 +63,16 @@ namespace {ViewsFeatureProvider.ViewInfoContainerNamespace} if (!string.IsNullOrEmpty(strongNameOptions.KeyFile)) { var updatedOptions = Compilation.Options.WithStrongNameProvider(new DesktopStrongNameProvider()); + var keyFilePath = Path.GetFullPath(strongNameOptions.KeyFile); if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || strongNameOptions.PublicSign) { updatedOptions = updatedOptions.WithCryptoPublicKey( - SnkUtils.ExtractPublicKey(File.ReadAllBytes(strongNameOptions.KeyFile))); + SnkUtils.ExtractPublicKey(File.ReadAllBytes(keyFilePath))); } else { - updatedOptions = updatedOptions.WithCryptoKeyFile(strongNameOptions.KeyFile) + updatedOptions = updatedOptions.WithCryptoKeyFile(keyFilePath) .WithDelaySign(strongNameOptions.DelaySign); } diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj new file mode 100644 index 0000000000..ee6ef8451b --- /dev/null +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj @@ -0,0 +1,31 @@ + + + + Build-time references required to enable Razor view compilation as part of building the application. + netcoreapp1.1;net451 + win7-x64 + cshtml;razor;compilation;precompilation;aspnetcore + true + exe + + + build + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Program.cs b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Program.cs similarity index 59% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Program.cs rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Program.cs index 5a44ee550d..5a2232444b 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools/Program.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Program.cs @@ -1,21 +1,25 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal; +using System; +using System.Linq; +using System.Reflection; using Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation { public class Program { + private readonly static Type ProgramType = typeof(Program); + public static int Main(string[] args) { #if DEBUG DebugHelper.HandleDebugSwitch(ref args); #endif - var app = new PrecompilationApplication(typeof(Program)); - new PrecompileDispatchCommand().Configure(app); + var app = new PrecompilationApplication(ProgramType); + new PrecompileRunCommand().Configure(app); return app.Execute(args); } } diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/common.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/common.targets new file mode 100644 index 0000000000..9eb5b3f030 --- /dev/null +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/common.targets @@ -0,0 +1,57 @@ + + + <_MvcRazorOutputPath Condition="'$(MvcRazorOutputPath)'!=''">$([MSBuild]::EnsureTrailingSlash('$(MvcRazorOutputPath)')) + <_MvcRazorOutputPath Condition="'$(_MvcRazorOutputPath)'==''">$(IntermediateOutputPath) + <_MvcRazorOutputFullPath>$([System.IO.Path]::Combine($([System.IO.Path]::GetFullPath('$(_MvcRazorOutputPath)')), '$(MSBuildProjectName).PrecompiledViews.dll')) + <_MvcRazorResponseFilePath>$(IntermediateOutputPath)microsoft.aspnetcore.mvc.razor.viewcompilation.rsp + + $(MSBuildProjectDirectory) + + + + <_MvcRazorContentFiles Include="$([MSBuild]::EnsureTrailingSlash('$(MvcRazorOutputPath)'))**\*.cshtml" /> + + + + + + + + + + + + + + + + + + + + + + + $([System.IO.Path]::GetFileName('$(_MvcRazorOutputFullPath)')) + + + + + diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net451/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net451/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets new file mode 100644 index 0000000000..84f8b9c78b --- /dev/null +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net451/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets @@ -0,0 +1,38 @@ + + + + + + + + + $(OutputPath)$(MSBuildThisFileName).exe.config + + + $(OutputPath)$(MSBuildThisFileName).exe + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp1.1/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp1.1/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets new file mode 100644 index 0000000000..ef0b15f8d0 --- /dev/null +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp1.1/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets @@ -0,0 +1,29 @@ + + + + + + + + --runtimeconfig "$(ProjectRuntimeConfigFilePath)" + $(ExecArgs) --depsfile "$(ProjectDepsFilePath)" + $(ExecArgs) "$(MSBuildThisFileDirectory)$(MSBuildThisFileName).dll" + $(ExecArgs) @"$(_MvcRazorResponseFilePath)" + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/buildCrossTargeting/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/buildCrossTargeting/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets new file mode 100644 index 0000000000..0521e16543 --- /dev/null +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/buildCrossTargeting/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test.xproj b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test.xproj deleted file mode 100644 index 8edf50470d..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - e0d75b4e-839f-4f80-9b1f-b33f616bcc5f - .\obj - .\bin\ - - - 2.0 - - - - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test/project.json b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test/project.json deleted file mode 100644 index 56001c8dda..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test/project.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "dependencies": { - "dotnet-test-xunit": "2.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.2.0-*", - "xunit": "2.2.0-*" - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.1.0-*" - } - }, - "net451": {} - } - }, - "testRunner": "xunit" -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationConsumingPrecompiledViews.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationConsumingPrecompiledViews.cs index 05eeb2506b..ea26c9ae34 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationConsumingPrecompiledViews.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/ApplicationConsumingPrecompiledViews.cs @@ -59,37 +59,24 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation protected override void Restore() { CreateClassLibraryPackage(); - RestoreProject(ApplicationPath, new[] { _packOutputDirectory }); + RestoreProject(ApplicationPath, new[] { _packOutputDirectory, "https://api.nuget.org/v3/index.json" }); } private void CreateClassLibraryPackage() { RestoreProject(ClassLibraryPath); - ExecuteForClassLibrary(Command.CreateDotNet("build", new[] { ClassLibraryPath, "-c", "Release" })); - - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // Don't run precompile tool for net451 on xplat. - ExecuteForClassLibrary(Command.CreateDotNet( - "razor-precompile", - GetPrecompileArguments("net451"))); - } - ExecuteForClassLibrary(Command.CreateDotNet( - "razor-precompile", - GetPrecompileArguments("netcoreapp1.1"))); - - var timestamp = "z" + DateTime.UtcNow.Ticks.ToString().PadLeft(18, '0'); + "build", + new[] { "-c", "Release" })); var packCommand = Command - .CreateDotNet("pack", new[] { "--no-build", "-c", "Release", "-o", _packOutputDirectory }) - .EnvironmentVariable("DOTNET_BUILD_VERSION", timestamp); + .CreateDotNet("pack", new[] { "-c", "Release", "-o", _packOutputDirectory }); ExecuteForClassLibrary(packCommand); } private void ExecuteForClassLibrary(ICommand command) { - Console.WriteLine($"Running {command.CommandName} {command.CommandArgs}"); + Console.WriteLine($"Running {command.CommandName} {command.CommandArgs} in {ClassLibraryPath}"); command .WorkingDirectory(ClassLibraryPath) .EnvironmentVariable(NuGetPackagesEnvironmentKey, TempRestoreDirectory) @@ -100,20 +87,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation .EnsureSuccessful(); } - private string[] GetPrecompileArguments(string targetFramework) - { - return new[] - { - ClassLibraryPath, - "-c", - "Release", - "-f", - $"{targetFramework}", - "-o", - $"obj/precompiled/{targetFramework}", - }; - } - public override void Dispose() { TryDeleteDirectory(_packOutputDirectory); diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/ApplicationTestFixture.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/ApplicationTestFixture.cs index 7bcbb53650..c1d27d43e5 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/ApplicationTestFixture.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Infrastructure/ApplicationTestFixture.cs @@ -111,11 +111,9 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation } protected void RestoreProject(string applicationDirectory, string[] additionalFeeds = null) - { - var packagesDirectory = GetNuGetPackagesDirectory(); + { var args = new List { - Path.Combine(applicationDirectory, "project.json"), "--packages", TempRestoreDirectory, }; @@ -124,7 +122,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation { foreach (var feed in additionalFeeds) { - args.Add("-f"); + args.Add("-s"); args.Add(feed); } } @@ -134,6 +132,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation .EnvironmentVariable(DotnetSkipFirstTimeExperience, "true") .ForwardStdErr(Console.Error) .ForwardStdOut(Console.Out) + .WorkingDirectory(applicationDirectory) .Execute() .EnsureSuccessful(); } diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests.csproj b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests.csproj new file mode 100644 index 0000000000..91d58054b2 --- /dev/null +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests.csproj @@ -0,0 +1,23 @@ + + + + netcoreapp1.1 + $(DefineConstants);__remove_this_to__GENERATE_BASELINES + + + + + + + + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests.xproj b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests.xproj deleted file mode 100644 index 9299b84636..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 46c9a4b2-8b1c-451b-b670-c194901d66ac - .\obj - .\bin\ - v4.6.1 - - - 2.0 - - - - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/project.json b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/project.json deleted file mode 100644 index 6d150ac283..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.FunctionalTests/project.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "buildOptions": { - "define": [ - "__remove_this_to__GENERATE_BASELINES" - ], - "embed": "Resources/*" - }, - "dependencies": { - "dotnet-test-xunit": "2.2.0-*", - "Microsoft.AspNetCore.Server.IntegrationTesting": "0.3.0-*", - "Microsoft.DotNet.Cli.Utils": "1.0.0-*", - "Microsoft.Extensions.Logging": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*", - "Microsoft.Extensions.PlatformAbstractions": "1.2.0-*", - "xunit": "2.2.0-*" - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.1.0-*" - } - } - } - }, - "testRunner": "xunit" -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test.csproj b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test.csproj new file mode 100644 index 0000000000..d03a5493e9 --- /dev/null +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test.csproj @@ -0,0 +1,21 @@ + + + + netcoreapp1.1 + + + + + + + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test/PrecompileRunCommandTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/PrecompileRunCommandTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test/PrecompileRunCommandTest.cs rename to test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/PrecompileRunCommandTest.cs index 8493d81934..feae75e96d 100644 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Test/PrecompileRunCommandTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Test/PrecompileRunCommandTest.cs @@ -5,13 +5,13 @@ using System; using System.IO; using System.Linq; using System.Reflection; -using Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal; +using Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Emit; using Xunit; -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools +namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation { public class PrecompileRunCommandTest { diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test.xproj b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test.xproj deleted file mode 100644 index c5140ed5fd..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - b58e3380-d451-4e54-b522-cd21404fcd58 - .\obj - .\bin\ - - - 2.0 - - - - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test/PrecompileDispatchCommandTest.cs b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test/PrecompileDispatchCommandTest.cs deleted file mode 100644 index c90c7e17c6..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test/PrecompileDispatchCommandTest.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.IO; -using System.Linq; -using System.Reflection; -using Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design.Internal; -using Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal; -using Xunit; - -namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools -{ - public class PrecompileDispatchCommandTest - { - [Fact] - public void RunPrintsHelp_WhenHelpOptionIsSpecified() - { - // Arrange - var expected = -$@"Microsoft Razor Precompilation Utility {GetToolVersion()} - -Usage: razor-precompile [arguments] [options] - -Arguments: - project The path to the project (project folder or project.json) with precompilation. - -Options: - -?|-h|--help Show help information - --configure-compilation-type Type with Configure method - --content-root The application's content root. - --embed-view-sources Embed view sources as resources in the generated assembly. - -f|--framework Target Framework - -c|--configuration Configuration - -o|--output-path Output path."; - var args = new[] - { - "--help" - }; - - // Act - var result = Execute(args); - - // Assert - Assert.Equal(0, result.ExitCode); - Assert.Equal(expected, result.Out.Trim(), ignoreLineEndingDifferences: true); - Assert.Empty(result.Error); - } - - [Fact] - public void RunPrintsHelp_WhenInvalidOptionsAreSpecified() - { - // Arrange - var expectedOut = @"Specify --help for a list of available options and commands."; - var expectedError = @"Unrecognized option '--bad-option'"; - var args = new[] - { - "--bad-option" - }; - - // Act - var result = Execute(args); - - // Assert - Assert.Equal(1, result.ExitCode); - Assert.Equal(expectedOut, result.Out.Trim()); - Assert.Equal( - expectedError, - result.Error.Split(new[] { Environment.NewLine }, StringSplitOptions.None).First()); - } - - [Fact] - public void RunPrintsError_IfOutputPathIfNotSpecified() - { - // Arrange - var expected = "Option -o|--output-path does not have a value."; - var args = new[] - { - "-f", - "framework" - }; - - // Act - var result = Execute(args); - - // Assert - Assert.Equal(1, result.ExitCode); - Assert.Empty(result.Out); - Assert.Equal(expected, result.Error.Trim()); - } - - [Theory] - [InlineData(null)] - [InlineData("")] - public void GetProjectPath_ReturnsCurrentDirectoryIfArgumentIsNullOrEmpty(string projectPath) - { - // Act - var actual = PrecompileDispatchCommand.GetProjectPath(projectPath); - - // Assert - Assert.Equal(Directory.GetCurrentDirectory(), actual); - } - - public static TheoryData GetProjectPath_ReturnsArgumentIfNotNullOrEmptyData - { - get - { - return new TheoryData - { - { "", Directory.GetCurrentDirectory() }, - { "project.json", Directory.GetCurrentDirectory() }, - { Path.GetTempPath(), Path.GetTempPath() }, - }; - } - } - - [Theory] - [MemberData(nameof(GetProjectPath_ReturnsArgumentIfNotNullOrEmptyData))] - public void GetProjectPath_ReturnsArgumentIfNotNullOrEmpty(string projectPath, string expected) - { - // Act - var actual = PrecompileDispatchCommand.GetProjectPath(projectPath); - - // Assert - Assert.Equal(expected, actual); - } - - [Fact] - public void GetProjectPath_ThrowsIfDirectoryDoesNotExist() - { - // Arrange - var nonExistent = Path.GetRandomFileName(); - - // Act & Assert - var ex = Assert.Throws( - () => PrecompileDispatchCommand.GetProjectPath(nonExistent)); - Assert.Equal($"Could not find directory {Path.GetFullPath(nonExistent)}.", ex.Message); - } - - private static string GetToolVersion() - { - return typeof(Program) - .GetTypeInfo() - .Assembly - .GetCustomAttribute() - .InformationalVersion; - } - - private class ExecuteResult - { - public string Out { get; set; } - - public string Error { get; set; } - - public int ExitCode { get; set; } - } - - private ExecuteResult Execute(string[] args) - { - using (var outputWriter = new StringWriter()) - using (var errorWriter = new StringWriter()) - { - var app = new PrecompilationApplication(typeof(Program)) - { - Out = outputWriter, - Error = errorWriter, - }; - new PrecompileDispatchCommand().Configure(app); - var exitCode = app.Execute(args); - - return new ExecuteResult - { - ExitCode = exitCode, - Out = outputWriter.ToString(), - Error = errorWriter.ToString(), - }; - } - } - } -} diff --git a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test/project.json b/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test/project.json deleted file mode 100644 index 05c8abe762..0000000000 --- a/test/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools.Test/project.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "dependencies": { - "dotnet-test-xunit": "2.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.2.0-*", - "xunit": "2.2.0-*" - }, - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.1.0-*" - } - }, - "net451": {} - } - }, - "testRunner": "xunit" -} \ No newline at end of file diff --git a/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj b/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj new file mode 100644 index 0000000000..76b9bb0338 --- /dev/null +++ b/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.csproj @@ -0,0 +1,22 @@ + + + + netcoreapp1.1;net451 + true + Exe + win7-x64 + true + + + + + + + + + + + + + + diff --git a/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.xproj b/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.xproj deleted file mode 100644 index 0559856e9a..0000000000 --- a/testapps/ApplicationUsingPrecompiledViewClassLibrary/ApplicationUsingPrecompiledViewClassLibrary.xproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - cef718e4-4556-422f-b64f-9d9671218e67 - ApplicationUsingPrecompiledViewClassLibrary - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/testapps/ApplicationUsingPrecompiledViewClassLibrary/project.json b/testapps/ApplicationUsingPrecompiledViewClassLibrary/project.json deleted file mode 100644 index 7eaf709b58..0000000000 --- a/testapps/ApplicationUsingPrecompiledViewClassLibrary/project.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "ClassLibraryWithPrecompiledViews": { - "target": "package", - "version": "1.0.0-*" - }, - "Microsoft.AspNetCore.Mvc": "1.2.0-*", - "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*" - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - } - } - }, - "net451": {} - }, - "publishOptions": { - "include": [ - "wwwroot", - "appsettings.json", - "web.config" - ] - } -} \ No newline at end of file diff --git a/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj b/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj new file mode 100644 index 0000000000..cf50cd50e2 --- /dev/null +++ b/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj @@ -0,0 +1,25 @@ + + + + netcoreapp1.1;net451 + true + Exe + win7-x64 + true + + + + + 1.1.0-* + All + + + + + + + + + + + diff --git a/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.xproj b/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.xproj deleted file mode 100644 index 9cb473104c..0000000000 --- a/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.xproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - e2eaeb85-91d5-478e-9ce2-964f68de20d0 - ApplicationWithConfigureMvc - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/testapps/ApplicationWithConfigureMvc/project.json b/testapps/ApplicationWithConfigureMvc/project.json deleted file mode 100644 index 417b72ff93..0000000000 --- a/testapps/ApplicationWithConfigureMvc/project.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.AspNetCore.Mvc": "1.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design": { - "version": "1.2.0-*", - "target": "package", - "type": "build" - }, - "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*" - }, - "tools": { - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.2.0-*" - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - } - } - }, - "net451": {} - }, - "publishOptions": { - "include": [ - "wwwroot", - "appsettings.json", - "web.config" - ] - }, - "scripts": { - "postpublish": "dotnet razor-precompile --configuration %publish:Configuration% --framework %publish:TargetFramework% --output-path %publish:OutputPath% %publish:ProjectPath%" - } -} \ No newline at end of file diff --git a/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj b/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj new file mode 100644 index 0000000000..831009ac40 --- /dev/null +++ b/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj @@ -0,0 +1,31 @@ + + + + netcoreapp1.1;net451 + win7-x64 + true + Exe + win7-x64 + true + + + + + + + + + + 1.1.0-* + All + + + + + + + + + + + diff --git a/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.xproj b/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.xproj deleted file mode 100644 index 5c14063cb2..0000000000 --- a/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.xproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 2079872f-e8f9-4db1-a340-c0d897807b86 - ApplicationWithTagHelpers - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/testapps/ApplicationWithTagHelpers/Components/CopyrightViewComponent.cs b/testapps/ApplicationWithTagHelpers/Components/CopyrightViewComponent.cs new file mode 100644 index 0000000000..a52e8e7436 --- /dev/null +++ b/testapps/ApplicationWithTagHelpers/Components/CopyrightViewComponent.cs @@ -0,0 +1,22 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using Microsoft.AspNetCore.Mvc; + +namespace ApplicationWithTagHelpers +{ + public class CopyrightViewComponent : ViewComponent + { + public IViewComponentResult Invoke(string website, int year) + { + var dict = new Dictionary + { + ["website"] = website, + ["year"] = year + }; + + return View(dict); + } + } +} diff --git a/testapps/ApplicationWithTagHelpers/Views/Shared/Components/Copyright/Default.cshtml b/testapps/ApplicationWithTagHelpers/Views/Shared/Components/Copyright/Default.cshtml new file mode 100644 index 0000000000..25ef152a39 --- /dev/null +++ b/testapps/ApplicationWithTagHelpers/Views/Shared/Components/Copyright/Default.cshtml @@ -0,0 +1,2 @@ +@model Dictionary +© @Model["year"] - @Model["website"] \ No newline at end of file diff --git a/testapps/ApplicationWithTagHelpers/Views/Shared/_Layout.cshtml b/testapps/ApplicationWithTagHelpers/Views/Shared/_Layout.cshtml index d62ae2daab..29b1f0740e 100644 --- a/testapps/ApplicationWithTagHelpers/Views/Shared/_Layout.cshtml +++ b/testapps/ApplicationWithTagHelpers/Views/Shared/_Layout.cshtml @@ -1,4 +1,5 @@ - +@addTagHelper *, ApplicationWithTagHelpers + @ViewData["Title"] - ApplicationWithTagHelpers @@ -11,7 +12,7 @@ @RenderBody()
-

© 2016 - ApplicationWithTagHelpers

+

@RenderSection("scripts", required: false) diff --git a/testapps/ApplicationWithTagHelpers/project.json b/testapps/ApplicationWithTagHelpers/project.json deleted file mode 100644 index 7ebf0000b2..0000000000 --- a/testapps/ApplicationWithTagHelpers/project.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "ClassLibraryTagHelper": { - "target": "project" - }, - "Microsoft.AspNetCore.Mvc": "1.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design": { - "version": "1.2.0-*", - "target": "package", - "type": "build" - }, - "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*", - "TagHelperSamples.Bootstrap": "1.1.1" - }, - "tools": { - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.2.0-*" - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - } - } - }, - "net451": {} - }, - "publishOptions": { - "include": [ - "wwwroot", - "appsettings.json", - "web.config" - ] - }, - "scripts": { - "postpublish": "dotnet razor-precompile --configuration %publish:Configuration% --framework %publish:TargetFramework% --output-path %publish:OutputPath% %publish:ProjectPath%" - } -} \ No newline at end of file diff --git a/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj b/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj new file mode 100644 index 0000000000..c49d7ee9e6 --- /dev/null +++ b/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.csproj @@ -0,0 +1,13 @@ + + + + netstandard1.6;net451 + + + + + + + + + \ No newline at end of file diff --git a/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.xproj b/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.xproj deleted file mode 100644 index 80d42837fa..0000000000 --- a/testapps/ClassLibraryTagHelper/ClassLibraryTagHelper.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - 39efa075-3673-49ab-95f3-aa5e88df6c30 - ClassLibraryTagHelpers - .\obj - .\bin\ - v4.6.1 - - - - 2.0 - - - diff --git a/testapps/ClassLibraryTagHelper/project.json b/testapps/ClassLibraryTagHelper/project.json deleted file mode 100644 index c2217f8c42..0000000000 --- a/testapps/ClassLibraryTagHelper/project.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dependencies": { - "Microsoft.AspNetCore.Razor.Runtime": "1.2.0-*", - "NETStandard.Library": "1.6.1-*" - }, - "frameworks": { - "netstandard1.6": {}, - "net451": {} - } -} \ No newline at end of file diff --git a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj new file mode 100644 index 0000000000..4ee98030b9 --- /dev/null +++ b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj @@ -0,0 +1,37 @@ + + + + 1.0.0-z$([System.DateTime]::UtcNow.Ticks) + netcoreapp1.1;net451 + true + Exe + win7-x64 + obj\precompiled\$(TargetFramework) + + + + + + + + + + 1.1.0-* + All + + + + + + + + + + diff --git a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.xproj b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.xproj deleted file mode 100644 index 217dde2a8b..0000000000 --- a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.xproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 4684de8b-3fbe-421b-8798-56c3d6698b76 - ClassLibraryWithPrecompiledViews - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/testapps/ClassLibraryWithPrecompiledViews/project.json b/testapps/ClassLibraryWithPrecompiledViews/project.json deleted file mode 100644 index de239955d3..0000000000 --- a/testapps/ClassLibraryWithPrecompiledViews/project.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "preserveCompilationContext": true, - "emitEntryPoint": true - }, - "packOptions": { - "files": { - "mappings": { - "lib/": "obj/precompiled/" - } - } - }, - "dependencies": { - "Microsoft.AspNetCore.Mvc": "1.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design": { - "version": "1.2.0-*", - "target": "package", - "type": "build" - } - }, - "tools": { - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.2.0-*" - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - } - } - }, - "net451": {} - } -} \ No newline at end of file diff --git a/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj b/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj new file mode 100644 index 0000000000..d1b8e2c03a --- /dev/null +++ b/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj @@ -0,0 +1,26 @@ + + + + netcoreapp1.1;net451 + true + Exe + win7-x64 + true + true + + + + + + 1.1.0-* + All + + + + + + + + + + diff --git a/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.xproj b/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.xproj deleted file mode 100644 index 25dace6505..0000000000 --- a/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - e3462190-3068-40f0-9aa5-34779fe252ac - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/testapps/PublishWithEmbedViewSources/project.json b/testapps/PublishWithEmbedViewSources/project.json deleted file mode 100644 index 685da88d63..0000000000 --- a/testapps/PublishWithEmbedViewSources/project.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.AspNetCore.Mvc": "1.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design": { - "version": "1.2.0-*", - "target": "package", - "type": "build" - }, - "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*" - }, - "tools": { - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.2.0-*" - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - } - } - }, - "net451": {} - }, - "publishOptions": { - "include": [ - "wwwroot", - "appsettings.json", - "web.config" - ] - }, - "scripts": { - "postpublish": "dotnet razor-precompile --embed-view-sources --configuration %publish:Configuration% --framework %publish:TargetFramework% --output-path %publish:OutputPath% %publish:ProjectPath%" - } -} \ No newline at end of file diff --git a/testapps/SimpleApp/SimpleApp.csproj b/testapps/SimpleApp/SimpleApp.csproj new file mode 100644 index 0000000000..365349be1a --- /dev/null +++ b/testapps/SimpleApp/SimpleApp.csproj @@ -0,0 +1,22 @@ + + + netcoreapp1.1;net451 + true + Exe + win7-x64 + true + + + + 1.1.0-* + All + + + + + + + + + + diff --git a/testapps/SimpleApp/SimpleApp.xproj b/testapps/SimpleApp/SimpleApp.xproj deleted file mode 100644 index 0ab0e1618e..0000000000 --- a/testapps/SimpleApp/SimpleApp.xproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 8fa176ed-c29e-48d6-bc7a-1c3a862cb15f - SimpleApp - .\obj - .\bin\ - v4.6.1 - - - 2.0 - - - - - - - diff --git a/testapps/SimpleApp/project.json b/testapps/SimpleApp/project.json deleted file mode 100644 index 417b72ff93..0000000000 --- a/testapps/SimpleApp/project.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.AspNetCore.Mvc": "1.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design": { - "version": "1.2.0-*", - "target": "package", - "type": "build" - }, - "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*" - }, - "tools": { - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.2.0-*" - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - } - } - }, - "net451": {} - }, - "publishOptions": { - "include": [ - "wwwroot", - "appsettings.json", - "web.config" - ] - }, - "scripts": { - "postpublish": "dotnet razor-precompile --configuration %publish:Configuration% --framework %publish:TargetFramework% --output-path %publish:OutputPath% %publish:ProjectPath%" - } -} \ No newline at end of file diff --git a/testapps/SimpleAppDesktopOnly/SimpleAppDesktopOnly.csproj b/testapps/SimpleAppDesktopOnly/SimpleAppDesktopOnly.csproj new file mode 100644 index 0000000000..ff561a4be7 --- /dev/null +++ b/testapps/SimpleAppDesktopOnly/SimpleAppDesktopOnly.csproj @@ -0,0 +1,21 @@ + + + + net451 + win7-x64 + true + Exe + true + + + + + + 1.1.0-* + All + + + + + + diff --git a/testapps/SimpleAppDesktopOnly/SimpleAppDesktopOnly.xproj b/testapps/SimpleAppDesktopOnly/SimpleAppDesktopOnly.xproj deleted file mode 100644 index c57afbe851..0000000000 --- a/testapps/SimpleAppDesktopOnly/SimpleAppDesktopOnly.xproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - a0b0a141-a32b-4f33-b85f-5ca8c107105f - SimpleAppDesktopOnly - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/testapps/SimpleAppDesktopOnly/project.json b/testapps/SimpleAppDesktopOnly/project.json deleted file mode 100644 index 721d2fdd4a..0000000000 --- a/testapps/SimpleAppDesktopOnly/project.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "dependencies": { - "Microsoft.AspNetCore.Mvc": "1.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design": { - "version": "1.2.0-*", - "target": "package", - "type": "build" - }, - "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*" - }, - "tools": { - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.2.0-*" - }, - "frameworks": { - "net451": {} - }, - "publishOptions": { - "include": [ - "wwwroot", - "appsettings.json", - "web.config" - ] - }, - "scripts": { - "postpublish": "dotnet razor-precompile --configuration %publish:Configuration% --framework %publish:TargetFramework% --output-path %publish:OutputPath% %publish:ProjectPath%" - } -} \ No newline at end of file diff --git a/testapps/StrongNamedApp/StrongNamedApp.csproj b/testapps/StrongNamedApp/StrongNamedApp.csproj new file mode 100644 index 0000000000..0f10baa02e --- /dev/null +++ b/testapps/StrongNamedApp/StrongNamedApp.csproj @@ -0,0 +1,27 @@ + + + + netcoreapp1.1;net451 + true + Exe + ../../build/Key.snk + true + true + win7-x64 + true + + + + + + 1.1.0-* + + + + + + + + + + diff --git a/testapps/StrongNamedApp/StrongNamedApp.xproj b/testapps/StrongNamedApp/StrongNamedApp.xproj deleted file mode 100644 index 3cc9e35815..0000000000 --- a/testapps/StrongNamedApp/StrongNamedApp.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 88903be5-0676-4667-8160-b24646e0b76e - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/testapps/StrongNamedApp/project.json b/testapps/StrongNamedApp/project.json deleted file mode 100644 index 13dbe0afc4..0000000000 --- a/testapps/StrongNamedApp/project.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true, - "keyFile": "../../tools/Key.snk" - }, - "dependencies": { - "Microsoft.AspNetCore.Mvc": "1.2.0-*", - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Design": { - "version": "1.2.0-*", - "target": "package", - "type": "build" - }, - "Microsoft.AspNetCore.Server.Kestrel": "1.2.0-*", - "Microsoft.Extensions.Configuration.CommandLine": "1.2.0-*", - "Microsoft.Extensions.Logging.Console": "1.2.0-*" - }, - "tools": { - "Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.2.0-*" - }, - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - } - } - }, - "net451": {} - }, - "publishOptions": { - "include": [ - "wwwroot", - "appsettings.json", - "web.config" - ] - }, - "scripts": { - "postpublish": "dotnet razor-precompile --configuration %publish:Configuration% --framework %publish:TargetFramework% --output-path %publish:OutputPath% %publish:ProjectPath%" - } -} \ No newline at end of file diff --git a/TestApps.sln b/testapps/TestApps.sln similarity index 60% rename from TestApps.sln rename to testapps/TestApps.sln index 718673b08a..c5bd8609a1 100644 --- a/TestApps.sln +++ b/testapps/TestApps.sln @@ -1,29 +1,27 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26014.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SimpleApp", "testapps\SimpleApp\SimpleApp.xproj", "{8FA176ED-C29E-48D6-BC7A-1C3A862CB15F}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{43488AEE-CCF2-4A90-B890-05320282BE29}" ProjectSection(SolutionItems) = preProject - testapps\global.json = testapps\global.json - testapps\NuGet.config = testapps\NuGet.config + global.json = global.json + NuGet.config = NuGet.config EndProjectSection EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ApplicationWithTagHelpers", "testapps\ApplicationWithTagHelpers\ApplicationWithTagHelpers.xproj", "{2079872F-E8F9-4DB1-A340-C0D897807B86}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationWithTagHelpers", "ApplicationWithTagHelpers\ApplicationWithTagHelpers.csproj", "{2079872F-E8F9-4DB1-A340-C0D897807B86}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ClassLibraryTagHelper", "testapps\ClassLibraryTagHelper\ClassLibraryTagHelper.xproj", "{39EFA075-3673-49AB-95F3-AA5E88DF6C30}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibraryTagHelper", "ClassLibraryTagHelper\ClassLibraryTagHelper.csproj", "{39EFA075-3673-49AB-95F3-AA5E88DF6C30}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ApplicationWithConfigureMvc", "testapps\ApplicationWithConfigureMvc\ApplicationWithConfigureMvc.xproj", "{E2EAEB85-91D5-478E-9CE2-964F68DE20D0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationWithConfigureMvc", "ApplicationWithConfigureMvc\ApplicationWithConfigureMvc.csproj", "{E2EAEB85-91D5-478E-9CE2-964F68DE20D0}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ClassLibraryWithPrecompiledViews", "testapps\ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.xproj", "{4684DE8B-3FBE-421B-8798-56C3D6698B76}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClassLibraryWithPrecompiledViews", "ClassLibraryWithPrecompiledViews\ClassLibraryWithPrecompiledViews.csproj", "{4684DE8B-3FBE-421B-8798-56C3D6698B76}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "PublishWIthEmbedViewSources", "testapps\PublishWIthEmbedViewSources\PublishWIthEmbedViewSources.xproj", "{E3462190-3068-40F0-9AA5-34779FE252AC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PublishWIthEmbedViewSources", "PublishWIthEmbedViewSources\PublishWIthEmbedViewSources.csproj", "{E3462190-3068-40F0-9AA5-34779FE252AC}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "StrongNamedApp", "testapps\StrongNamedApp\StrongNamedApp.xproj", "{88903BE5-0676-4667-8160-B24646E0B76E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StrongNamedApp", "StrongNamedApp\StrongNamedApp.csproj", "{88903BE5-0676-4667-8160-B24646E0B76E}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SimpleAppDesktopOnly", "testapps\SimpleAppDesktopOnly\SimpleAppDesktopOnly.xproj", "{A0B0A141-A32B-4F33-B85F-5CA8C107105F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleAppDesktopOnly", "SimpleAppDesktopOnly\SimpleAppDesktopOnly.csproj", "{A0B0A141-A32B-4F33-B85F-5CA8C107105F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -31,10 +29,6 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8FA176ED-C29E-48D6-BC7A-1C3A862CB15F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8FA176ED-C29E-48D6-BC7A-1C3A862CB15F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8FA176ED-C29E-48D6-BC7A-1C3A862CB15F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8FA176ED-C29E-48D6-BC7A-1C3A862CB15F}.Release|Any CPU.Build.0 = Release|Any CPU {2079872F-E8F9-4DB1-A340-C0D897807B86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2079872F-E8F9-4DB1-A340-C0D897807B86}.Debug|Any CPU.Build.0 = Debug|Any CPU {2079872F-E8F9-4DB1-A340-C0D897807B86}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/testapps/global.json b/testapps/global.json deleted file mode 100644 index 77c126f953..0000000000 --- a/testapps/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "projects": [], - "sdk": { - "version": "1.0.0-preview2-1-003180" - } -} \ No newline at end of file diff --git a/version.props b/version.props new file mode 100644 index 0000000000..f2d5fa5b07 --- /dev/null +++ b/version.props @@ -0,0 +1,7 @@ + + + + 1.1.0 + msbuild3 + + \ No newline at end of file