From 0bd6d135c18882a5f82b6cc2ca14177b60754f04 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 24 Oct 2018 13:35:15 -0700 Subject: [PATCH] Move targets, rzc and extension assembly in to the Sdk --- Directory.Build.targets | 2 +- NuGetPackageVerifier.json | 63 +++++----- Razor.sln | 15 +-- build/dependencies.props | 1 + build/repo.props | 2 +- build/repo.targets | 10 +- ...soft.AspNetCore.Mvc.Razor.Extensions.props | 40 ------- ...ft.AspNetCore.Mvc.Razor.Extensions.targets | 36 ------ .../Microsoft.AspNetCore.Razor.Design.csproj | 84 -------------- .../Microsoft.AspNetCore.Razor.Design.nuspec | 31 ----- .../baseline.netcore.json | 4 - .../baseline.netframework.json | 2 - .../Microsoft.AspNetCore.Razor.Design.props | 45 -------- .../Microsoft.AspNetCore.Razor.Design.props | 3 - .../Microsoft.AspNetCore.Razor.Tools.csproj | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Microsoft.NET.Sdk.Razor.csproj | 87 +++++++++++--- .../Microsoft.NET.Sdk.Razor.nuspec | 25 ++++ ...soft.NET.Sdk.Razor.CodeGeneration.targets} | 30 +++-- ...rosoft.NET.Sdk.Razor.Configuration.targets | 92 +++++++++++++++ ...Microsoft.NET.Sdk.Razor.DesignTime.targets | 6 + .../Sdk.Razor.CurrentVersion.targets | 29 ++++- .../BuildVariables.cs | 12 +- .../BuildVariables.cs.template | 4 +- .../IntegrationTests/Assert.cs | 4 +- .../BuildIncrementalismTest.cs | 0 .../IntegrationTests/BuildIntegrationTest.cs | 16 +++ .../BuildIntrospectionTest.cs | 0 .../BuildServerIntegrationTest.cs | 4 +- .../BuildServerTestFixture.cs | 0 .../ConfigurationMetadataIntegrationTest.cs | 0 .../DesignTimeBuildIntegrationTest.cs | 6 +- .../IntegrationTests/FIleThumbPrint.cs | 2 +- .../InitializeTestProjectAttribute.cs | 2 +- .../MSBuildIntegrationTestBase.cs | 4 +- .../IntegrationTests/MSBuildProcessKind.cs | 0 .../IntegrationTests/MSBuildProcessManager.cs | 0 .../IntegrationTests/MSBuildResult.cs | 2 +- .../IntegrationTests/PackIntegrationTest.cs | 2 +- .../IntegrationTests/ProjectDirectory.cs | 2 +- .../PublishIntegrationTest.cs | 8 +- .../RazorCompileIntegrationTest.cs | 4 +- .../RazorGenerateIntegrationTest.cs | 2 - .../Microsoft.NET.Sdk.Razor.Test.csproj} | 16 +-- .../xunit.runner.json | 0 .../AppWithP2PReference.csproj | 14 +-- .../testapps/ClassLibrary/ClassLibrary.csproj | 17 +-- .../ClassLibrary2/ClassLibrary2.csproj | 17 +-- test/testapps/Directory.Build.props | 2 +- test/testapps/Directory.Build.targets | 2 +- .../testapps/LargeProject/LargeProject.csproj | 15 +-- test/testapps/SimpleMvc/SimpleMvc.csproj | 16 +-- .../SimpleMvc21/Models/ErrorViewModel.cs | 11 ++ test/testapps/SimpleMvc21/Program.cs | 13 +++ test/testapps/SimpleMvc21/SimpleMvc21.csproj | 29 +++++ .../SimpleMvc21/Views/Home/About.cshtml | 7 ++ .../SimpleMvc21/Views/Home/Index.cshtml | 108 ++++++++++++++++++ .../SimpleMvc21/Views/Shared/_Layout.cshtml | 71 ++++++++++++ .../Shared/_ValidationScriptsPartial.cshtml | 18 +++ .../SimpleMvc21/Views/_ViewImports.cshtml | 3 + .../SimpleMvc21/Views/_ViewStart.cshtml | 3 + .../SimpleMvcFSharp/SimpleMvcFSharp.fsproj | 15 +-- test/testapps/SimplePages/SimplePages.csproj | 15 +-- 63 files changed, 617 insertions(+), 460 deletions(-) delete mode 100644 src/Microsoft.AspNetCore.Mvc.Razor.Extensions/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.Extensions.props delete mode 100644 src/Microsoft.AspNetCore.Mvc.Razor.Extensions/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.Extensions.targets delete mode 100644 src/Microsoft.AspNetCore.Razor.Design/Microsoft.AspNetCore.Razor.Design.csproj delete mode 100644 src/Microsoft.AspNetCore.Razor.Design/Microsoft.AspNetCore.Razor.Design.nuspec delete mode 100644 src/Microsoft.AspNetCore.Razor.Design/baseline.netcore.json delete mode 100644 src/Microsoft.AspNetCore.Razor.Design/baseline.netframework.json delete mode 100644 src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.props delete mode 100644 src/Microsoft.AspNetCore.Razor.Design/buildMultiTargeting/Microsoft.AspNetCore.Razor.Design.props create mode 100644 src/Microsoft.NET.Sdk.Razor/Microsoft.NET.Sdk.Razor.nuspec rename src/{Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets => Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.CodeGeneration.targets} (87%) create mode 100644 src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Configuration.targets rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/BuildVariables.cs (65%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/BuildVariables.cs.template (69%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/Assert.cs (99%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/BuildIncrementalismTest.cs (100%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/BuildIntegrationTest.cs (98%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/BuildIntrospectionTest.cs (100%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/BuildServerIntegrationTest.cs (99%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/BuildServerTestFixture.cs (100%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/ConfigurationMetadataIntegrationTest.cs (100%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/DesignTimeBuildIntegrationTest.cs (98%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/FIleThumbPrint.cs (98%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/InitializeTestProjectAttribute.cs (99%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/MSBuildIntegrationTestBase.cs (96%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/MSBuildProcessKind.cs (100%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/MSBuildProcessManager.cs (100%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/MSBuildResult.cs (98%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/PackIntegrationTest.cs (99%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/ProjectDirectory.cs (99%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/PublishIntegrationTest.cs (99%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/RazorCompileIntegrationTest.cs (98%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/IntegrationTests/RazorGenerateIntegrationTest.cs (99%) rename test/{Microsoft.AspNetCore.Razor.Design.Test/Microsoft.AspNetCore.Razor.Design.Test.csproj => Microsoft.NET.Sdk.Razor.Test/Microsoft.NET.Sdk.Razor.Test.csproj} (89%) rename test/{Microsoft.AspNetCore.Razor.Design.Test => Microsoft.NET.Sdk.Razor.Test}/xunit.runner.json (100%) create mode 100644 test/testapps/SimpleMvc21/Models/ErrorViewModel.cs create mode 100644 test/testapps/SimpleMvc21/Program.cs create mode 100644 test/testapps/SimpleMvc21/SimpleMvc21.csproj create mode 100644 test/testapps/SimpleMvc21/Views/Home/About.cshtml create mode 100644 test/testapps/SimpleMvc21/Views/Home/Index.cshtml create mode 100644 test/testapps/SimpleMvc21/Views/Shared/_Layout.cshtml create mode 100644 test/testapps/SimpleMvc21/Views/Shared/_ValidationScriptsPartial.cshtml create mode 100644 test/testapps/SimpleMvc21/Views/_ViewImports.cshtml create mode 100644 test/testapps/SimpleMvc21/Views/_ViewStart.cshtml diff --git a/Directory.Build.targets b/Directory.Build.targets index 78626b773e..181bfc9f70 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,8 +1,8 @@ - $(MicrosoftNETCoreApp20PackageVersion) $(MicrosoftNETCoreApp21PackageVersion) $(MicrosoftNETCoreApp22PackageVersion) + $(MicrosoftNETCoreApp30PackageVersion) $(NETStandardLibrary20PackageVersion) 99.9 diff --git a/NuGetPackageVerifier.json b/NuGetPackageVerifier.json index b62352e8b9..09f423d28d 100644 --- a/NuGetPackageVerifier.json +++ b/NuGetPackageVerifier.json @@ -18,54 +18,53 @@ "DefaultCompositeRule" ], "packages": { - "Microsoft.AspNetCore.Razor.Design": { + "Microsoft.NET.Sdk.Razor": { "exclusions": { "ASSEMBLY_DESCRIPTION": { - "tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions." + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions." }, "NEUTRAL_RESOURCES_LANGUAGE": { - "tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions." + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions." }, "ASSEMBLY_PRODUCT": { - "tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions." + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions." }, "SERVICING_ATTRIBUTE": { - "tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions." - }, - "VERSION_INFORMATIONALVERSION": { - "tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions." + "tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions." }, "WRONG_PUBLICKEYTOKEN": { - "tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions." + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions." }, "ASSEMBLY_INFORMATIONAL_VERSION_MISMATCH": { - "tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions." + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions." }, "ASSEMBLY_FILE_VERSION_MISMATCH": { - "tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions." + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions." }, "ASSEMBLY_VERSION_MISMATCH": { - "tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.", - "tools/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions." + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.", + "tools/netcoreapp2.0/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions." + }, + "BUILD_ITEMS_FRAMEWORK": { + "*": "Razor SDK does not contain any dependencies or binaries and consequently does not have a dependency group." } } } diff --git a/Razor.sln b/Razor.sln index 5bb3137be2..c32e2ce3b7 100644 --- a/Razor.sln +++ b/Razor.sln @@ -20,6 +20,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution build\dependencies.props = build\dependencies.props Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets + build\repo.props = build\repo.props + build\repo.targets = build\repo.targets build\sources.props = build\sources.props EndProjectSection EndProject @@ -77,9 +79,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.Mac. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.Mac.LanguageServices.Razor.Test", "test\Microsoft.VisualStudio.Mac.LanguageServices.Razor.Test\Microsoft.VisualStudio.Mac.LanguageServices.Razor.Test.csproj", "{B8A3E4CA-D54A-441F-A3BF-E00F060CA042}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Design", "src\Microsoft.AspNetCore.Razor.Design\Microsoft.AspNetCore.Razor.Design.csproj", "{5257B25D-330A-4DCF-ACED-B4709CFBF916}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Design.Test", "test\Microsoft.AspNetCore.Razor.Design.Test\Microsoft.AspNetCore.Razor.Design.Test.csproj", "{1D90F276-E1CA-4FDF-A173-EB889E7D3150}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Razor.Test", "test\Microsoft.NET.Sdk.Razor.Test\Microsoft.NET.Sdk.Razor.Test.csproj", "{1D90F276-E1CA-4FDF-A173-EB889E7D3150}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test", "test\Microsoft.AspNetCore.Razor.Test\Microsoft.AspNetCore.Razor.Test.csproj", "{323553F0-14AB-4FBD-9CF0-1CC0BE8056F8}" EndProject @@ -327,14 +327,6 @@ Global {B8A3E4CA-D54A-441F-A3BF-E00F060CA042}.Release|Any CPU.Build.0 = Release|Any CPU {B8A3E4CA-D54A-441F-A3BF-E00F060CA042}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU {B8A3E4CA-D54A-441F-A3BF-E00F060CA042}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {5257B25D-330A-4DCF-ACED-B4709CFBF916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5257B25D-330A-4DCF-ACED-B4709CFBF916}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5257B25D-330A-4DCF-ACED-B4709CFBF916}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {5257B25D-330A-4DCF-ACED-B4709CFBF916}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {5257B25D-330A-4DCF-ACED-B4709CFBF916}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5257B25D-330A-4DCF-ACED-B4709CFBF916}.Release|Any CPU.Build.0 = Release|Any CPU - {5257B25D-330A-4DCF-ACED-B4709CFBF916}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {5257B25D-330A-4DCF-ACED-B4709CFBF916}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU {1D90F276-E1CA-4FDF-A173-EB889E7D3150}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1D90F276-E1CA-4FDF-A173-EB889E7D3150}.Debug|Any CPU.Build.0 = Debug|Any CPU {1D90F276-E1CA-4FDF-A173-EB889E7D3150}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU @@ -432,7 +424,6 @@ Global {FAF9986F-E086-4513-9D52-F7BF5FFCF31D} = {C0CC1E1F-1559-44DE-93A8-63259CEA2AAB} {95B18DEE-8B45-4CF0-B9F8-CCBAF3B5251A} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED} {B8A3E4CA-D54A-441F-A3BF-E00F060CA042} = {92463391-81BE-462B-AC3C-78C6C760741F} - {5257B25D-330A-4DCF-ACED-B4709CFBF916} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED} {1D90F276-E1CA-4FDF-A173-EB889E7D3150} = {92463391-81BE-462B-AC3C-78C6C760741F} {323553F0-14AB-4FBD-9CF0-1CC0BE8056F8} = {92463391-81BE-462B-AC3C-78C6C760741F} {6205467F-E381-4C42-AEEC-763BD62B3D5E} = {C2C98051-0F39-47F2-80B6-E72B29159F2C} diff --git a/build/dependencies.props b/build/dependencies.props index 37ead2dfab..7d53eaeb19 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -22,6 +22,7 @@ 2.0.9 2.1.3 2.2.0-rtm-27023-02 + 3.0.0-preview1-26907-05 15.6.1 15.8.525 16.0.142-g25b7188c54 diff --git a/build/repo.props b/build/repo.props index fef2fdc0eb..275ad3421e 100644 --- a/build/repo.props +++ b/build/repo.props @@ -25,8 +25,8 @@ - + diff --git a/build/repo.targets b/build/repo.targets index 550069ec47..1c111a1c01 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -11,9 +11,9 @@ $(PrepareDependsOn);GenerateMSBuildLocationFile - $(RepositoryRoot)test\Microsoft.AspNetCore.Razor.Design.Test\ - $(RazorDesignTestProject)BuildVariables.cs.template - $(RazorDesignTestProject)obj\BuildVariables.generated.cs + $(RepositoryRoot)test\Microsoft.NET.Sdk.Razor.Test\ + $(RazorSdkTestProject)BuildVariables.cs.template + $(RazorSdkTestProject)obj\BuildVariables.generated.cs MSBuildLocation=$(VisualStudioMSBuildx86Path); - MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreApp22PackageVersion); - NETStandardLibraryPackageVersion=$(NETStandardLibrary20PackageVersion) + MicrosoftNETCoreApp30PackageVersion=$(MicrosoftNETCoreApp30PackageVersion); + NETStandardLibrary20PackageVersion=$(NETStandardLibrary20PackageVersion) diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.Extensions/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.Extensions.props b/src/Microsoft.AspNetCore.Mvc.Razor.Extensions/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.Extensions.props deleted file mode 100644 index c968ea7b3a..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.Extensions/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.Extensions.props +++ /dev/null @@ -1,40 +0,0 @@ - - - - - MVC-2.1 - - - true - - - <_MvcExtensionAssemblyPath Condition="'$(_MvcExtensionAssemblyPath)'==''">$(MSBuildThisFileDirectory)..\..\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll - - - - - - MVC-2.1;$(CustomRazorExtension) - - - - - - Microsoft.AspNetCore.Mvc.Razor.Extensions - $(_MvcExtensionAssemblyPath) - - - diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.Extensions/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.Extensions.targets b/src/Microsoft.AspNetCore.Mvc.Razor.Extensions/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.Extensions.targets deleted file mode 100644 index ffe642e283..0000000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.Extensions/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.Extensions.targets +++ /dev/null @@ -1,36 +0,0 @@ - - - - true - - - $(GenerateRazorAssemblyInfo) - - - .Views - - - Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyApplicationPartFactory, Microsoft.AspNetCore.Mvc.Razor - - - - <_RazorAssemblyAttribute Include="Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute"> - <_Parameter1>$(RazorTargetName) - - - - - - <_Parameter1>$(ProvideApplicationPartFactoryAttributeTypeName) - - - diff --git a/src/Microsoft.AspNetCore.Razor.Design/Microsoft.AspNetCore.Razor.Design.csproj b/src/Microsoft.AspNetCore.Razor.Design/Microsoft.AspNetCore.Razor.Design.csproj deleted file mode 100644 index 083a24e847..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Design/Microsoft.AspNetCore.Razor.Design.csproj +++ /dev/null @@ -1,84 +0,0 @@ - - - Razor is a markup syntax for adding server-side logic to web pages. This package contains MSBuild support for Razor. - netcoreapp2.0 - - - false - false - false - - $(MSBuildProjectName).nuspec - - - - - - - ..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj - - - - - - - - - - - - - - - - - - - - - - - - - true - - - unknown - - - id=$(PackageId); - version=$(PackageVersion); - authors=$(Authors); - description=$(Description); - tags=$(PackageTags.Replace(';', ' ')); - licenseUrl=$(PackageLicenseUrl); - projectUrl=$(PackageProjectUrl); - iconUrl=$(PackageIconUrl); - repositoryUrl=$(RepositoryUrl); - repositoryCommit=$(RepositoryCommit); - copyright=$(Copyright); - - - ToolFiles=$(OutputPath)tools\**\*; - - - - - - - - - - <_RazorTool Include="$(OutputPath)tools\**\*" /> - - - - - - diff --git a/src/Microsoft.AspNetCore.Razor.Design/Microsoft.AspNetCore.Razor.Design.nuspec b/src/Microsoft.AspNetCore.Razor.Design/Microsoft.AspNetCore.Razor.Design.nuspec deleted file mode 100644 index 47d16cd554..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Design/Microsoft.AspNetCore.Razor.Design.nuspec +++ /dev/null @@ -1,31 +0,0 @@ - - - - $id$ - $version$ - $authors$ - $description$ - true - $tags$ - $licenseUrl$ - $projectUrl$ - $iconUrl$ - - $copyright$ - - - - - - - - - - - - - - - - - diff --git a/src/Microsoft.AspNetCore.Razor.Design/baseline.netcore.json b/src/Microsoft.AspNetCore.Razor.Design/baseline.netcore.json deleted file mode 100644 index 4491a03c76..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Design/baseline.netcore.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "AssemblyIdentity": "Microsoft.AspNetCore.Razor.Design, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", - "Types": [] -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Design/baseline.netframework.json b/src/Microsoft.AspNetCore.Razor.Design/baseline.netframework.json deleted file mode 100644 index 7a73a41bfd..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Design/baseline.netframework.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.props b/src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.props deleted file mode 100644 index 81b2e3afe4..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.props +++ /dev/null @@ -1,45 +0,0 @@ - - - - true - - - $(MSBuildThisFileDirectory)Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets - - - 2.1 - - - - - <_RazorMSBuildRoot Condition="'$(_RazorMSBuildRoot)'==''">$(MSBuildThisFileDirectory)..\..\ - - - <_RazorToolAssembly Condition="'$(_RazorToolAssembly)'==''">$(_RazorMSBuildRoot)tools\rzc.dll - - - - - - - - diff --git a/src/Microsoft.AspNetCore.Razor.Design/buildMultiTargeting/Microsoft.AspNetCore.Razor.Design.props b/src/Microsoft.AspNetCore.Razor.Design/buildMultiTargeting/Microsoft.AspNetCore.Razor.Design.props deleted file mode 100644 index 227f58dea9..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Design/buildMultiTargeting/Microsoft.AspNetCore.Razor.Design.props +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/Microsoft.AspNetCore.Razor.Tools/Microsoft.AspNetCore.Razor.Tools.csproj b/src/Microsoft.AspNetCore.Razor.Tools/Microsoft.AspNetCore.Razor.Tools.csproj index e67f36e02f..d8a6b7ad56 100644 --- a/src/Microsoft.AspNetCore.Razor.Tools/Microsoft.AspNetCore.Razor.Tools.csproj +++ b/src/Microsoft.AspNetCore.Razor.Tools/Microsoft.AspNetCore.Razor.Tools.csproj @@ -7,7 +7,7 @@ Exe rzc - + false false diff --git a/src/Microsoft.AspNetCore.Razor.Tools/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Razor.Tools/Properties/AssemblyInfo.cs index 91b536e78b..3770a8065e 100644 --- a/src/Microsoft.AspNetCore.Razor.Tools/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Razor.Tools/Properties/AssemblyInfo.cs @@ -4,6 +4,6 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Tools.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Design.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.NET.Sdk.Razor.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/Microsoft.NET.Sdk.Razor/Microsoft.NET.Sdk.Razor.csproj b/src/Microsoft.NET.Sdk.Razor/Microsoft.NET.Sdk.Razor.csproj index a835c5d06a..8792b4349e 100644 --- a/src/Microsoft.NET.Sdk.Razor/Microsoft.NET.Sdk.Razor.csproj +++ b/src/Microsoft.NET.Sdk.Razor/Microsoft.NET.Sdk.Razor.csproj @@ -1,30 +1,23 @@ - + Razor is a markup syntax for adding server-side logic to web pages. This package contains MSBuild support for Razor. - netstandard2.0;net46 + netcoreapp2.2;netstandard2.0;net46 Microsoft.NET.Sdk.Razor.Tasks - false + $(MSBuildProjectName).nuspec + true + bin\$(Configuration)\sdk-output\ - - - - - - - - - - - - + + + - - + + @@ -41,4 +34,64 @@ Shared\Client.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + id=$(MSBuildProjectName); + version=$(PackageVersion); + authors=$(Authors); + licenseUrl=$(PackageLicenseUrl); + projectUrl=$(PackageProjectUrl); + iconUrl=$(PackageIconUrl); + copyright=$(Copyright); + description=$(Description); + tags=$([MSBuild]::Escape($(PackageTags))); + serviceable=$(Serviceable); + repositoryUrl=$(RepositoryUrl); + repositoryCommit=$(RepositoryCommit); + targetframework=$(TargetFramework); + outputpath=$(OutputPath)\sdk-output; + + + diff --git a/src/Microsoft.NET.Sdk.Razor/Microsoft.NET.Sdk.Razor.nuspec b/src/Microsoft.NET.Sdk.Razor/Microsoft.NET.Sdk.Razor.nuspec new file mode 100644 index 0000000000..8593fba340 --- /dev/null +++ b/src/Microsoft.NET.Sdk.Razor/Microsoft.NET.Sdk.Razor.nuspec @@ -0,0 +1,25 @@ + + + + $id$ + $version$ + $authors$ + true + $licenseUrl$ + $projectUrl$ + $iconUrl$ + $description$ + $copyright$ + $tags$ + $serviceable$ + + + + + + + + + + + diff --git a/src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets b/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.CodeGeneration.targets similarity index 87% rename from src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets rename to src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.CodeGeneration.targets index c81d741e1f..58faca83b5 100644 --- a/src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets +++ b/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.CodeGeneration.targets @@ -1,3 +1,15 @@ + + <_RazorTagHelperInputCache>$(IntermediateOutputPath)$(TargetName).TagHelpers.input.cache <_RazorTagHelperOutputCache>$(IntermediateOutputPath)$(TargetName).TagHelpers.output.cache - + <_RazorGenerateInputsHash> <_RazorGenerateInputsHashFile>$(IntermediateOutputPath)$(MSBuildProjectName).RazorCoreGenerate.cache + + <_RazorToolAssembly Condition="'$(_RazorToolAssembly)'==''">$(RazorSdkDirectoryRoot)tools\netcoreapp2.0\rzc.dll - @@ -63,7 +77,7 @@ Outputs="$(_RazorTagHelperInputCache)" Condition="'@(RazorGenerateWithTargetPath)' != ''"> - + + + + + true + + + true + + + $(GenerateRazorAssemblyInfo) + + + Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyApplicationPartFactory, Microsoft.AspNetCore.Mvc.Razor + + + true + + + + <_TargetingNETCoreApp30OrLater Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' > '2.9'">true + + + + 2.1 + + + + + MVC-2.1 + + + + + + MVC-2.1;$(CustomRazorExtension) + + + + + + Microsoft.AspNetCore.Mvc.Razor.Extensions + $(RazorSdkDirectoryRoot)extensions\mvc-2-1\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll + + + + + <_RazorAssemblyAttribute Include="Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute"> + <_Parameter1>$(RazorTargetName) + + + + + + <_Parameter1>$(ProvideApplicationPartFactoryAttributeTypeName) + + + + diff --git a/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.DesignTime.targets b/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.DesignTime.targets index 9aaafbd17c..6df58f657e 100644 --- a/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.DesignTime.targets +++ b/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.DesignTime.targets @@ -21,6 +21,12 @@ Copyright (c) .NET Foundation. All rights reserved. we use the lack of the capability to detect downlevel scenarios. --> + + + + $(MSBuildThisFileDirectory)..\..\ + $(RazorSdkDirectoryRoot)tasks\ <_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netstandard2.0 <_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46 $(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll + + <_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV')) + <_EnableAllInclusiveRazorSdk Condition="'$(_EnableInclusiveRazorSdk)' == '' AND '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' > '2.9'">true $(IntermediateOutputPath)Razor\ + + .Views + .Razor @@ -187,8 +197,8 @@ Copyright (c) .NET Foundation. All rights reserved. $(RazorCompileToolset) $(RazorCompileToolset) - - PrecompilationTool + + PrecompilationTool true @@ -219,13 +229,22 @@ Copyright (c) .NET Foundation. All rights reserved. Condition="'$(RazorCompileOnBuild)'=='true' AND '@(Content->WithMetadataValue('Extension', '.cshtml'))' != ''" /> - + + + + + Condition="'$(IsRazorCompilerReferenced)' == 'true' AND '$(RazorCodeGenerationTargetsPath)' != '' AND Exists('$(RazorCodeGenerationTargetsPath)')" /> + + + + + + diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs b/test/Microsoft.NET.Sdk.Razor.Test/BuildVariables.cs similarity index 65% rename from test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs rename to test/Microsoft.NET.Sdk.Razor.Test/BuildVariables.cs index 7c6900f9b5..00e8491e1f 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/BuildVariables.cs @@ -6,8 +6,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests internal static partial class BuildVariables { private static string _msBuildPath = string.Empty; - private static string _microsoftNETCoreAppPackageVersion = string.Empty; - private static string _netStandardLibraryPackageVersion = string.Empty; + private static string _microsoftNETCoreApp30PackageVersion = string.Empty; + private static string _netStandardLibrary20PackageVersion = string.Empty; static partial void InitializeVariables(); @@ -20,21 +20,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests } } - public static string MicrosoftNETCoreAppPackageVersion + public static string MicrosoftNETCoreApp30PackageVersion { get { InitializeVariables(); - return _microsoftNETCoreAppPackageVersion; + return _microsoftNETCoreApp30PackageVersion; } } - public static string NETStandardLibraryPackageVersion + public static string NETStandardLibrary20PackageVersion { get { InitializeVariables(); - return _netStandardLibraryPackageVersion; + return _netStandardLibrary20PackageVersion; } } } diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template b/test/Microsoft.NET.Sdk.Razor.Test/BuildVariables.cs.template similarity index 69% rename from test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template rename to test/Microsoft.NET.Sdk.Razor.Test/BuildVariables.cs.template index 128f1c90bd..4b0b995bc6 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template +++ b/test/Microsoft.NET.Sdk.Razor.Test/BuildVariables.cs.template @@ -8,8 +8,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests static partial void InitializeVariables() { _msBuildPath = @"${MSBuildLocation}"; - _microsoftNETCoreAppPackageVersion = "${MicrosoftNETCoreAppPackageVersion}"; - _netStandardLibraryPackageVersion = "${NETStandardLibraryPackageVersion}"; + _microsoftNETCoreApp30PackageVersion = "${MicrosoftNETCoreApp30PackageVersion}"; + _netStandardLibrary20PackageVersion = "${NETStandardLibrary20PackageVersion}"; } } } diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/Assert.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/Assert.cs similarity index 99% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/Assert.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/Assert.cs index 4d3d035e3b..36efe22a3d 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/Assert.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/Assert.cs @@ -186,7 +186,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests filePath = Path.Combine(result.Project.DirectoryPath, filePath); FileExists(result, filePath); - + var lines = File.ReadAllLines(filePath); for (var i = 0; i < lines.Length; i++) { @@ -651,7 +651,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests { get { - return + return $"nuspec: '{FilePath}' did not contain the expected content." + Environment.NewLine + Environment.NewLine + $"expected: {Expected}" + Environment.NewLine + diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIncrementalismTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildIncrementalismTest.cs similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIncrementalismTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildIncrementalismTest.cs diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildIntegrationTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIntegrationTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildIntegrationTest.cs index 66603a31b1..82ce3bc10f 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIntegrationTest.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildIntegrationTest.cs @@ -614,6 +614,22 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.Equal(firstAssemblyBytes, secondAssemblyBytes); } + [Fact] + [InitializeTestProject("SimpleMvc21")] + public async Task Building_NETCoreApp21TargetingProject() + { + TargetFramework = "netcoreapp2.1"; + + // Build + var result = await DotnetMSBuild("Build"); + + Assert.BuildPassed(result); + Assert.FileExists(result, OutputPath, "SimpleMvc21.dll"); + Assert.FileExists(result, OutputPath, "SimpleMvc21.pdb"); + Assert.FileExists(result, OutputPath, "SimpleMvc21.Views.dll"); + Assert.FileExists(result, OutputPath, "SimpleMvc21.Views.pdb"); + } + private static DependencyContext ReadDependencyContext(string depsFilePath) { var reader = new DependencyContextJsonReader(); diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIntrospectionTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildIntrospectionTest.cs similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildIntrospectionTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildIntrospectionTest.cs diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildServerIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildServerIntegrationTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildServerIntegrationTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildServerIntegrationTest.cs index efd1187c6e..927cc16121 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildServerIntegrationTest.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildServerIntegrationTest.cs @@ -1,8 +1,6 @@ // 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.Diagnostics; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -39,7 +37,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests private async Task Build_SimpleMvc_CanBuildSuccessfully(MSBuildProcessKind msBuildProcessKind) { var result = await DotnetMSBuild( - "Build", + "Build", "/p:_RazorForceBuildServer=true", msBuildProcessKind: msBuildProcessKind); diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildServerTestFixture.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildServerTestFixture.cs similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/BuildServerTestFixture.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/BuildServerTestFixture.cs diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/ConfigurationMetadataIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/ConfigurationMetadataIntegrationTest.cs similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/ConfigurationMetadataIntegrationTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/ConfigurationMetadataIntegrationTest.cs diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/DesignTimeBuildIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/DesignTimeBuildIntegrationTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/DesignTimeBuildIntegrationTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/DesignTimeBuildIntegrationTest.cs index c8fce36363..bf735082a6 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/DesignTimeBuildIntegrationTest.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/DesignTimeBuildIntegrationTest.cs @@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.pdb"); Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.Views.dll"); Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.Views.pdb"); - + // This target should be part of the design time build. Assert.Contains("RazorGetAssemblyAttributes", result.Output); @@ -56,11 +56,11 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Path.Combine("Views", "_ViewImports.cshtml"), Path.Combine("Views", "_ViewStart.cshtml"), }; - + foreach (var filePath in filePaths) { Assert.BuildOutputContainsLine( - result, + result, $@"RazorGenerateWithTargetPath: {filePath} {filePath} {Path.Combine(RazorIntermediateOutputPath, Path.ChangeExtension(filePath, ".g.cshtml.cs"))}"); } } diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/FIleThumbPrint.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/FIleThumbPrint.cs similarity index 98% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/FIleThumbPrint.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/FIleThumbPrint.cs index 36e204de0e..0266ecdd1b 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/FIleThumbPrint.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/FIleThumbPrint.cs @@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests public bool Equals(FileThumbPrint other) { - return + return string.Equals(Path, other.Path, StringComparison.Ordinal) && LastWriteTimeUtc == other.LastWriteTimeUtc && string.Equals(Hash, other.Hash, StringComparison.Ordinal); diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/InitializeTestProjectAttribute.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/InitializeTestProjectAttribute.cs similarity index 99% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/InitializeTestProjectAttribute.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/InitializeTestProjectAttribute.cs index bcd954bb55..f04a14c449 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/InitializeTestProjectAttribute.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/InitializeTestProjectAttribute.cs @@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests } MSBuildIntegrationTestBase.Project = ProjectDirectory.Create(_originalProjectName, _testProjectName, _baseDirectory, _additionalProjects, _language); - MSBuildIntegrationTestBase.TargetFramework = _originalProjectName.StartsWith("ClassLibrary") ? "netstandard2.0" : "netcoreapp2.2"; + MSBuildIntegrationTestBase.TargetFramework = _originalProjectName.StartsWith("ClassLibrary") ? "netstandard2.0" : "netcoreapp3.0"; } public override void After(MethodInfo methodUnderTest) diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildIntegrationTestBase.cs similarity index 96% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildIntegrationTestBase.cs index 1d44f27d4b..d4e7405627 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildIntegrationTestBase.cs @@ -71,8 +71,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests // Let the test app know it is running as part of a test. "/p:RunningAsTest=true", - $"/p:MicrosoftNETCoreAppVersion={BuildVariables.MicrosoftNETCoreAppPackageVersion}", - $"/p:NETStandardLibraryPackageVersion={BuildVariables.NETStandardLibraryPackageVersion}", + $"/p:MicrosoftNETCoreApp30PackageVersion={BuildVariables.MicrosoftNETCoreApp30PackageVersion}", + $"/p:NETStandardLibrary20PackageVersion={BuildVariables.NETStandardLibrary20PackageVersion}", }; if (!suppressRestore) diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildProcessKind.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildProcessKind.cs similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildProcessKind.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildProcessKind.cs diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildProcessManager.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildProcessManager.cs similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildProcessManager.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildProcessManager.cs diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildResult.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildResult.cs similarity index 98% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildResult.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildResult.cs index a409c06e47..d26bed720b 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildResult.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/MSBuildResult.cs @@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests public string FileName { get; } public int ExitCode { get; } - + public string Output { get; } } } diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PackIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/PackIntegrationTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PackIntegrationTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/PackIntegrationTest.cs index e0d7b86678..3037ba3171 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PackIntegrationTest.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/PackIntegrationTest.cs @@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.FileExists(result, OutputPath, "ClassLibrary.dll"); Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll"); - + if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { // Travis on OSX produces different full paths in C# and MSBuild diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/ProjectDirectory.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/ProjectDirectory.cs similarity index 99% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/ProjectDirectory.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/ProjectDirectory.cs index fcfdd30311..0eb0b9a27a 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/ProjectDirectory.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/ProjectDirectory.cs @@ -75,7 +75,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests CopyGlobalJson(solutionRoot, destinationPath); return new ProjectDirectory( - destinationPath, + destinationPath, directoryPath, newProjectFilePath); } diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PublishIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/PublishIntegrationTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PublishIntegrationTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/PublishIntegrationTest.cs index 7e9eb1f797..7734f7dc16 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PublishIntegrationTest.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/PublishIntegrationTest.cs @@ -142,7 +142,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.BuildPassed(result); - // Everything we do should noop - including building the app. + // Everything we do should noop - including building the app. Assert.FileExists(result, PublishOutputPath, "SimpleMvc.dll"); Assert.FileExists(result, PublishOutputPath, "SimpleMvc.pdb"); Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll"); @@ -160,7 +160,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.BuildPassed(result); - // Everything we do should noop - including building the app. + // Everything we do should noop - including building the app. Assert.FileExists(result, PublishOutputPath, "SimpleMvc.dll"); Assert.FileExists(result, PublishOutputPath, "SimpleMvc.pdb"); Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll"); @@ -177,7 +177,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.BuildPassed(result); - // Everything we do should noop - including building the app. + // Everything we do should noop - including building the app. Assert.FileExists(result, PublishOutputPath, "SimpleMvc.dll"); Assert.FileExists(result, PublishOutputPath, "SimpleMvc.pdb"); Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll"); @@ -411,7 +411,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests var result = await DotnetMSBuild("Publish", "/p:NoBuild=true"); Assert.BuildFailed(result); - Assert.BuildError(result, "MSB3030"); // Could not copy the file "obj/Debug/netcoreapp2.2/SimpleMvc.dll because it couldn't be found. + Assert.BuildError(result, "MSB3030"); // Could not copy the file "obj/Debug/netcoreapp3.0/SimpleMvc.dll because it couldn't be found. Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.dll"); Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll"); diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/RazorCompileIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/RazorCompileIntegrationTest.cs similarity index 98% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/RazorCompileIntegrationTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/RazorCompileIntegrationTest.cs index c375b99354..c5398f0a13 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/RazorCompileIntegrationTest.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/RazorCompileIntegrationTest.cs @@ -41,7 +41,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.BuildPassed(result); - // Everything we do should noop - including building the app. + // Everything we do should noop - including building the app. Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.dll"); Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.pdb"); Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.Views.dll"); @@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests } [Fact] - [InitializeTestProject("SimpleMvc")] + [InitializeTestProject("SimpleMvc")] public async Task RazorCompile_EmbedRazorGenerateSources_EmbedsCshtmlFiles() { var result = await DotnetMSBuild("RazorCompile", "/p:EmbedRazorGenerateSources=true"); diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/RazorGenerateIntegrationTest.cs b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/RazorGenerateIntegrationTest.cs similarity index 99% rename from test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/RazorGenerateIntegrationTest.cs rename to test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/RazorGenerateIntegrationTest.cs index e146e9c0d0..cc1df79955 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/RazorGenerateIntegrationTest.cs +++ b/test/Microsoft.NET.Sdk.Razor.Test/IntegrationTests/RazorGenerateIntegrationTest.cs @@ -1,12 +1,10 @@ // 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.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; -using Microsoft.AspNetCore.Testing.xunit; using Xunit; namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/Microsoft.AspNetCore.Razor.Design.Test.csproj b/test/Microsoft.NET.Sdk.Razor.Test/Microsoft.NET.Sdk.Razor.Test.csproj similarity index 89% rename from test/Microsoft.AspNetCore.Razor.Design.Test/Microsoft.AspNetCore.Razor.Design.Test.csproj rename to test/Microsoft.NET.Sdk.Razor.Test/Microsoft.NET.Sdk.Razor.Test.csproj index 576f355f9a..7cabd6927a 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/Microsoft.AspNetCore.Razor.Design.Test.csproj +++ b/test/Microsoft.NET.Sdk.Razor.Test/Microsoft.NET.Sdk.Razor.Test.csproj @@ -1,13 +1,13 @@  - - netcoreapp2.2 + has netcoreapp dependencies that need to be built first. + --> + netcoreapp3.0 true $(DefineConstants);PRESERVE_WORKING_DIRECTORY @@ -33,14 +33,10 @@ - - - false - false @@ -54,5 +50,5 @@ - + diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/xunit.runner.json b/test/Microsoft.NET.Sdk.Razor.Test/xunit.runner.json similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Design.Test/xunit.runner.json rename to test/Microsoft.NET.Sdk.Razor.Test/xunit.runner.json diff --git a/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj b/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj index 853f1fee6a..d5149b2be8 100644 --- a/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj +++ b/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj @@ -1,19 +1,11 @@ - <_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\ - $(RazorSdkProjectDirectory)bin\$(Configuration)\ + $(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\ - - - <_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll - - - - - netcoreapp2.2 + netcoreapp3.0 @@ -40,6 +32,4 @@ - - diff --git a/test/testapps/ClassLibrary/ClassLibrary.csproj b/test/testapps/ClassLibrary/ClassLibrary.csproj index 69d5f1b5d7..5382d77c87 100644 --- a/test/testapps/ClassLibrary/ClassLibrary.csproj +++ b/test/testapps/ClassLibrary/ClassLibrary.csproj @@ -1,18 +1,9 @@ - <_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\ - $(RazorSdkProjectDirectory)bin\$(Configuration)\ + $(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\ - - - - - <_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll - - - netstandard2.0 @@ -20,6 +11,10 @@ Razor Test Microsoft ClassLibrary Description + + <_EnableAllInclusiveRazorSdk>true + 2.1 + MVC-2.1 @@ -43,6 +38,4 @@ - - diff --git a/test/testapps/ClassLibrary2/ClassLibrary2.csproj b/test/testapps/ClassLibrary2/ClassLibrary2.csproj index c31808dea6..5a032967e6 100644 --- a/test/testapps/ClassLibrary2/ClassLibrary2.csproj +++ b/test/testapps/ClassLibrary2/ClassLibrary2.csproj @@ -1,20 +1,15 @@ - <_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\ - $(RazorSdkProjectDirectory)bin\$(Configuration)\ + $(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\ - - - - - <_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll - - - netstandard2.0 + + <_EnableAllInclusiveRazorSdk>true + 2.1 + MVC-2.1 @@ -42,6 +37,4 @@ - - diff --git a/test/testapps/Directory.Build.props b/test/testapps/Directory.Build.props index ad571d2510..c0e194b7d3 100644 --- a/test/testapps/Directory.Build.props +++ b/test/testapps/Directory.Build.props @@ -19,7 +19,7 @@ 99.9 - $(NETStandardLibraryPackageVersion) + $(NETStandardLibrary20PackageVersion) diff --git a/test/testapps/Directory.Build.targets b/test/testapps/Directory.Build.targets index f9e03832a0..39f4f47645 100644 --- a/test/testapps/Directory.Build.targets +++ b/test/testapps/Directory.Build.targets @@ -2,7 +2,7 @@ - $(MicrosoftNETCoreAppVersion) + $(MicrosoftNETCoreApp30PackageVersion) 99.9 diff --git a/test/testapps/LargeProject/LargeProject.csproj b/test/testapps/LargeProject/LargeProject.csproj index 8e7d83c73f..1ea46a55cf 100644 --- a/test/testapps/LargeProject/LargeProject.csproj +++ b/test/testapps/LargeProject/LargeProject.csproj @@ -1,20 +1,11 @@ - <_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\ - $(RazorSdkProjectDirectory)bin\$(Configuration)\ + $(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\ - - - - <_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll - - - - - netcoreapp2.2 + netcoreapp3.0 @@ -37,7 +28,5 @@ - - diff --git a/test/testapps/SimpleMvc/SimpleMvc.csproj b/test/testapps/SimpleMvc/SimpleMvc.csproj index 22b0730b7a..925a8c7194 100644 --- a/test/testapps/SimpleMvc/SimpleMvc.csproj +++ b/test/testapps/SimpleMvc/SimpleMvc.csproj @@ -1,20 +1,11 @@ - <_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\ - $(RazorSdkProjectDirectory)bin\$(Configuration)\ + $(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\ - - - - <_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll - - - - - netcoreapp2.2 + netcoreapp3.0 @@ -26,7 +17,6 @@ - @@ -38,6 +28,4 @@ - - diff --git a/test/testapps/SimpleMvc21/Models/ErrorViewModel.cs b/test/testapps/SimpleMvc21/Models/ErrorViewModel.cs new file mode 100644 index 0000000000..b4aa044914 --- /dev/null +++ b/test/testapps/SimpleMvc21/Models/ErrorViewModel.cs @@ -0,0 +1,11 @@ +using System; + +namespace SimpleMvc.Models +{ + public class ErrorViewModel + { + public string RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + } +} \ No newline at end of file diff --git a/test/testapps/SimpleMvc21/Program.cs b/test/testapps/SimpleMvc21/Program.cs new file mode 100644 index 0000000000..39ec364271 --- /dev/null +++ b/test/testapps/SimpleMvc21/Program.cs @@ -0,0 +1,13 @@ + +namespace SimpleMvc +{ + public class Program + { + public static void Main(string[] args) + { + // Just make sure we have a reference to the MVC 2.1 + var t = typeof(Microsoft.AspNetCore.Mvc.IActionResult); + System.Console.WriteLine(t.FullName); + } + } +} diff --git a/test/testapps/SimpleMvc21/SimpleMvc21.csproj b/test/testapps/SimpleMvc21/SimpleMvc21.csproj new file mode 100644 index 0000000000..c7ab69a68d --- /dev/null +++ b/test/testapps/SimpleMvc21/SimpleMvc21.csproj @@ -0,0 +1,29 @@ + + + + + + netcoreapp2.1 + + + + + false + + + + + + All + + + + + All + + + + diff --git a/test/testapps/SimpleMvc21/Views/Home/About.cshtml b/test/testapps/SimpleMvc21/Views/Home/About.cshtml new file mode 100644 index 0000000000..3674e37a86 --- /dev/null +++ b/test/testapps/SimpleMvc21/Views/Home/About.cshtml @@ -0,0 +1,7 @@ +@{ + ViewData["Title"] = "About"; +} +

@ViewData["Title"]

+

@ViewData["Message"]

+ +

Use this area to provide additional information.

diff --git a/test/testapps/SimpleMvc21/Views/Home/Index.cshtml b/test/testapps/SimpleMvc21/Views/Home/Index.cshtml new file mode 100644 index 0000000000..00afab6a0c --- /dev/null +++ b/test/testapps/SimpleMvc21/Views/Home/Index.cshtml @@ -0,0 +1,108 @@ +@{ + ViewData["Title"] = "Home Page"; +} + + + + diff --git a/test/testapps/SimpleMvc21/Views/Shared/_Layout.cshtml b/test/testapps/SimpleMvc21/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000000..1a9473e464 --- /dev/null +++ b/test/testapps/SimpleMvc21/Views/Shared/_Layout.cshtml @@ -0,0 +1,71 @@ + + + + + + @ViewData["Title"] - SimpleMvc + + + + + + + + + + + + +
+ @RenderBody() +
+
+

© 2017 - SimpleMvc

+
+
+ + + + + + + + + + + + + @RenderSection("Scripts", required: false) + + diff --git a/test/testapps/SimpleMvc21/Views/Shared/_ValidationScriptsPartial.cshtml b/test/testapps/SimpleMvc21/Views/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000000..a699aafa97 --- /dev/null +++ b/test/testapps/SimpleMvc21/Views/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/test/testapps/SimpleMvc21/Views/_ViewImports.cshtml b/test/testapps/SimpleMvc21/Views/_ViewImports.cshtml new file mode 100644 index 0000000000..da00289ea5 --- /dev/null +++ b/test/testapps/SimpleMvc21/Views/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using SimpleMvc +@using SimpleMvc.Models +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/test/testapps/SimpleMvc21/Views/_ViewStart.cshtml b/test/testapps/SimpleMvc21/Views/_ViewStart.cshtml new file mode 100644 index 0000000000..a5f10045db --- /dev/null +++ b/test/testapps/SimpleMvc21/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/test/testapps/SimpleMvcFSharp/SimpleMvcFSharp.fsproj b/test/testapps/SimpleMvcFSharp/SimpleMvcFSharp.fsproj index e15be7467f..818fd9288a 100644 --- a/test/testapps/SimpleMvcFSharp/SimpleMvcFSharp.fsproj +++ b/test/testapps/SimpleMvcFSharp/SimpleMvcFSharp.fsproj @@ -1,20 +1,11 @@  - <_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\ - $(RazorSdkProjectDirectory)bin\$(Configuration)\ + $(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\ - - - - <_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll - - - - - netcoreapp2.2 + netcoreapp3.0 @@ -43,6 +34,4 @@ - - diff --git a/test/testapps/SimplePages/SimplePages.csproj b/test/testapps/SimplePages/SimplePages.csproj index 292a128c5a..61af95cc5b 100644 --- a/test/testapps/SimplePages/SimplePages.csproj +++ b/test/testapps/SimplePages/SimplePages.csproj @@ -1,20 +1,11 @@ - <_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\ - $(RazorSdkProjectDirectory)bin\$(Configuration)\ + $(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\ - - - - <_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll - - - - - netcoreapp2.2 + netcoreapp3.0 @@ -37,7 +28,5 @@ - -