diff --git a/.gitignore b/.gitignore index 5ce31f8898..5c48a48699 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,5 @@ project.lock.json *.*sdf *.ipch .build/ -.vs/ \ No newline at end of file +.vs/ +launchSettings.json \ No newline at end of file diff --git a/Razor.sln b/Razor.sln index c136a645d3..d75d12a28b 100644 --- a/Razor.sln +++ b/Razor.sln @@ -1,18 +1,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26009.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3C0D6505-79B3-49D0-B4C3-176F0F1836ED}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{92463391-81BE-462B-AC3C-78C6C760741F}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Razor", "src\Microsoft.AspNetCore.Razor\Microsoft.AspNetCore.Razor.xproj", "{EDA30434-C567-44DC-B8B6-2566A7F77163}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor", "src\Microsoft.AspNetCore.Razor\Microsoft.AspNetCore.Razor.csproj", "{EDA30434-C567-44DC-B8B6-2566A7F77163}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Razor.Test", "test\Microsoft.AspNetCore.Razor.Test\Microsoft.AspNetCore.Razor.Test.xproj", "{87C7338B-0C06-4C7B-BE75-A2368AE26797}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test", "test\Microsoft.AspNetCore.Razor.Test\Microsoft.AspNetCore.Razor.Test.csproj", "{87C7338B-0C06-4C7B-BE75-A2368AE26797}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Razor.Runtime", "src\Microsoft.AspNetCore.Razor.Runtime\Microsoft.AspNetCore.Razor.Runtime.xproj", "{D0196096-1B01-4133-AACE-1A10A0F7247C}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Razor.Runtime.Test", "test\Microsoft.AspNetCore.Razor.Runtime.Test\Microsoft.AspNetCore.Razor.Runtime.Test.xproj", "{0535998A-E32C-4D1A-80D1-0B15A513C471}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Runtime", "src\Microsoft.AspNetCore.Razor.Runtime\Microsoft.AspNetCore.Razor.Runtime.csproj", "{D0196096-1B01-4133-AACE-1A10A0F7247C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F8C12DD6-659D-405A-AA27-FB22AD92A010}" ProjectSection(SolutionItems) = preProject @@ -20,52 +18,108 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution NuGet.config = NuGet.config EndProjectSection EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RazorPageGenerator", "src\RazorPageGenerator\RazorPageGenerator.xproj", "{7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RazorPageGenerator", "src\RazorPageGenerator\RazorPageGenerator.csproj", "{7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Razor.Evolution", "src\Microsoft.AspNetCore.Razor.Evolution\Microsoft.AspNetCore.Razor.Evolution.xproj", "{932F3C9C-A6C0-40D3-BA50-9309886242FC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Evolution", "src\Microsoft.AspNetCore.Razor.Evolution\Microsoft.AspNetCore.Razor.Evolution.csproj", "{932F3C9C-A6C0-40D3-BA50-9309886242FC}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Razor.Evolution.Test", "test\Microsoft.AspNetCore.Razor.Evolution.Test\Microsoft.AspNetCore.Razor.Evolution.Test.xproj", "{969357A4-CCF1-46D9-B002-9AA072AFC75C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Evolution.Test", "test\Microsoft.AspNetCore.Razor.Evolution.Test\Microsoft.AspNetCore.Razor.Evolution.Test.csproj", "{969357A4-CCF1-46D9-B002-9AA072AFC75C}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources", "src\Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources\Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources.xproj", "{F247C7B7-0D29-4AED-B948-EE5C420B0DD3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Runtime.Test", "test\Microsoft.AspNetCore.Razor.Runtime.Test\Microsoft.AspNetCore.Razor.Runtime.Test.csproj", "{277AB67E-9C8D-4799-A18C-C628E70A8664}" 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 {EDA30434-C567-44DC-B8B6-2566A7F77163}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EDA30434-C567-44DC-B8B6-2566A7F77163}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDA30434-C567-44DC-B8B6-2566A7F77163}.Debug|x64.ActiveCfg = Debug|x64 + {EDA30434-C567-44DC-B8B6-2566A7F77163}.Debug|x64.Build.0 = Debug|x64 + {EDA30434-C567-44DC-B8B6-2566A7F77163}.Debug|x86.ActiveCfg = Debug|x86 + {EDA30434-C567-44DC-B8B6-2566A7F77163}.Debug|x86.Build.0 = Debug|x86 {EDA30434-C567-44DC-B8B6-2566A7F77163}.Release|Any CPU.ActiveCfg = Release|Any CPU {EDA30434-C567-44DC-B8B6-2566A7F77163}.Release|Any CPU.Build.0 = Release|Any CPU + {EDA30434-C567-44DC-B8B6-2566A7F77163}.Release|x64.ActiveCfg = Release|x64 + {EDA30434-C567-44DC-B8B6-2566A7F77163}.Release|x64.Build.0 = Release|x64 + {EDA30434-C567-44DC-B8B6-2566A7F77163}.Release|x86.ActiveCfg = Release|x86 + {EDA30434-C567-44DC-B8B6-2566A7F77163}.Release|x86.Build.0 = Release|x86 {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Debug|x64.ActiveCfg = Debug|x64 + {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Debug|x64.Build.0 = Debug|x64 + {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Debug|x86.ActiveCfg = Debug|x86 + {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Debug|x86.Build.0 = Debug|x86 {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Release|Any CPU.ActiveCfg = Release|Any CPU {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Release|Any CPU.Build.0 = Release|Any CPU + {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Release|x64.ActiveCfg = Release|x64 + {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Release|x64.Build.0 = Release|x64 + {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Release|x86.ActiveCfg = Release|x86 + {87C7338B-0C06-4C7B-BE75-A2368AE26797}.Release|x86.Build.0 = Release|x86 {D0196096-1B01-4133-AACE-1A10A0F7247C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D0196096-1B01-4133-AACE-1A10A0F7247C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0196096-1B01-4133-AACE-1A10A0F7247C}.Debug|x64.ActiveCfg = Debug|x64 + {D0196096-1B01-4133-AACE-1A10A0F7247C}.Debug|x64.Build.0 = Debug|x64 + {D0196096-1B01-4133-AACE-1A10A0F7247C}.Debug|x86.ActiveCfg = Debug|x86 + {D0196096-1B01-4133-AACE-1A10A0F7247C}.Debug|x86.Build.0 = Debug|x86 {D0196096-1B01-4133-AACE-1A10A0F7247C}.Release|Any CPU.ActiveCfg = Release|Any CPU {D0196096-1B01-4133-AACE-1A10A0F7247C}.Release|Any CPU.Build.0 = Release|Any CPU - {0535998A-E32C-4D1A-80D1-0B15A513C471}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0535998A-E32C-4D1A-80D1-0B15A513C471}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0535998A-E32C-4D1A-80D1-0B15A513C471}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0535998A-E32C-4D1A-80D1-0B15A513C471}.Release|Any CPU.Build.0 = Release|Any CPU + {D0196096-1B01-4133-AACE-1A10A0F7247C}.Release|x64.ActiveCfg = Release|x64 + {D0196096-1B01-4133-AACE-1A10A0F7247C}.Release|x64.Build.0 = Release|x64 + {D0196096-1B01-4133-AACE-1A10A0F7247C}.Release|x86.ActiveCfg = Release|x86 + {D0196096-1B01-4133-AACE-1A10A0F7247C}.Release|x86.Build.0 = Release|x86 {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Debug|x64.ActiveCfg = Debug|x64 + {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Debug|x64.Build.0 = Debug|x64 + {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Debug|x86.ActiveCfg = Debug|x86 + {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Debug|x86.Build.0 = Debug|x86 {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Release|Any CPU.ActiveCfg = Release|Any CPU {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Release|Any CPU.Build.0 = Release|Any CPU + {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Release|x64.ActiveCfg = Release|x64 + {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Release|x64.Build.0 = Release|x64 + {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Release|x86.ActiveCfg = Release|x86 + {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}.Release|x86.Build.0 = Release|x86 {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Debug|x64.ActiveCfg = Debug|x64 + {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Debug|x64.Build.0 = Debug|x64 + {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Debug|x86.ActiveCfg = Debug|x86 + {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Debug|x86.Build.0 = Debug|x86 {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Release|Any CPU.ActiveCfg = Release|Any CPU {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Release|Any CPU.Build.0 = Release|Any CPU + {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Release|x64.ActiveCfg = Release|x64 + {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Release|x64.Build.0 = Release|x64 + {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Release|x86.ActiveCfg = Release|x86 + {932F3C9C-A6C0-40D3-BA50-9309886242FC}.Release|x86.Build.0 = Release|x86 {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Debug|x64.ActiveCfg = Debug|x64 + {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Debug|x64.Build.0 = Debug|x64 + {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Debug|x86.ActiveCfg = Debug|x86 + {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Debug|x86.Build.0 = Debug|x86 {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Release|Any CPU.ActiveCfg = Release|Any CPU {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Release|Any CPU.Build.0 = Release|Any CPU - {F247C7B7-0D29-4AED-B948-EE5C420B0DD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F247C7B7-0D29-4AED-B948-EE5C420B0DD3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F247C7B7-0D29-4AED-B948-EE5C420B0DD3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F247C7B7-0D29-4AED-B948-EE5C420B0DD3}.Release|Any CPU.Build.0 = Release|Any CPU + {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Release|x64.ActiveCfg = Release|x64 + {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Release|x64.Build.0 = Release|x64 + {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Release|x86.ActiveCfg = Release|x86 + {969357A4-CCF1-46D9-B002-9AA072AFC75C}.Release|x86.Build.0 = Release|x86 + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Debug|Any CPU.Build.0 = Debug|Any CPU + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Debug|x64.ActiveCfg = Debug|x64 + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Debug|x64.Build.0 = Debug|x64 + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Debug|x86.ActiveCfg = Debug|x86 + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Debug|x86.Build.0 = Debug|x86 + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Release|Any CPU.ActiveCfg = Release|Any CPU + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Release|Any CPU.Build.0 = Release|Any CPU + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Release|x64.ActiveCfg = Release|x64 + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Release|x64.Build.0 = Release|x64 + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Release|x86.ActiveCfg = Release|x86 + {277AB67E-9C8D-4799-A18C-C628E70A8664}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -74,10 +128,9 @@ Global {EDA30434-C567-44DC-B8B6-2566A7F77163} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED} {87C7338B-0C06-4C7B-BE75-A2368AE26797} = {92463391-81BE-462B-AC3C-78C6C760741F} {D0196096-1B01-4133-AACE-1A10A0F7247C} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED} - {0535998A-E32C-4D1A-80D1-0B15A513C471} = {92463391-81BE-462B-AC3C-78C6C760741F} {7BE58880-36AD-4CD5-9E16-2A5AFEA790EF} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED} {932F3C9C-A6C0-40D3-BA50-9309886242FC} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED} {969357A4-CCF1-46D9-B002-9AA072AFC75C} = {92463391-81BE-462B-AC3C-78C6C760741F} - {F247C7B7-0D29-4AED-B948-EE5C420B0DD3} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED} + {277AB67E-9C8D-4799-A18C-C628E70A8664} = {92463391-81BE-462B-AC3C-78C6C760741F} 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..07997d6c83 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.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..fc709ce1f5 --- /dev/null +++ b/build/common.props @@ -0,0 +1,21 @@ + + + + + + Microsoft ASP.NET Core + https://github.com/aspnet/Razor + git + $(MSBuildThisFileDirectory)Key.snk + true + true + + + + + + + \ No newline at end of file diff --git a/global.json b/global.json deleted file mode 100644 index f45e8cc925..0000000000 --- a/global.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "projects": [ - "src" - ], - "sdk": { - "version": "1.0.0-preview2-1-003177" - } -} \ No newline at end of file diff --git a/makefile.shade b/makefile.shade new file mode 100644 index 0000000000..f5ea5ac9eb --- /dev/null +++ b/makefile.shade @@ -0,0 +1,8 @@ + +var VERSION='0.1' +var FULL_VERSION='0.1' +use-standard-lifecycle +k-standard-goals + +#pack-sources target='build-pack' + dotnet command='msbuild shared/build.proj /t:Pack /v:n' diff --git a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperAttributeComparer.cs b/shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperAttributeComparer.cs similarity index 100% rename from src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperAttributeComparer.cs rename to shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperAttributeComparer.cs diff --git a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperDescriptorComparer.cs b/shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperDescriptorComparer.cs similarity index 100% rename from src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperDescriptorComparer.cs rename to shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperDescriptorComparer.cs diff --git a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperRequiredAttributeDescriptorComparer.cs b/shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperRequiredAttributeDescriptorComparer.cs similarity index 100% rename from src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperRequiredAttributeDescriptorComparer.cs rename to shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/CaseSensitiveTagHelperRequiredAttributeDescriptorComparer.cs diff --git a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperAttributeDescriptorComparer.cs b/shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperAttributeDescriptorComparer.cs similarity index 100% rename from src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperAttributeDescriptorComparer.cs rename to shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperAttributeDescriptorComparer.cs diff --git a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperAttributeDesignTimeDescriptorComparer.cs b/shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperAttributeDesignTimeDescriptorComparer.cs similarity index 100% rename from src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperAttributeDesignTimeDescriptorComparer.cs rename to shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperAttributeDesignTimeDescriptorComparer.cs diff --git a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperDesignTimeDescriptorComparer.cs b/shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperDesignTimeDescriptorComparer.cs similarity index 100% rename from src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperDesignTimeDescriptorComparer.cs rename to shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/TagHelperDesignTimeDescriptorComparer.cs diff --git a/shared/build.proj b/shared/build.proj new file mode 100644 index 0000000000..1631b44fad --- /dev/null +++ b/shared/build.proj @@ -0,0 +1,24 @@ + + + + + $(MSBuildThisFileDirectory)..\artifacts\build + $(VersionPrefix) + $(Version)-$(VersionSuffix) + + + + + + + + + + + \ No newline at end of file diff --git a/shared/sources.nuspec b/shared/sources.nuspec new file mode 100644 index 0000000000..0eb708b9b8 --- /dev/null +++ b/shared/sources.nuspec @@ -0,0 +1,19 @@ + + + + $id$ + $version$ + Microsoft + Microsoft + false + $id$ + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.csproj b/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.csproj new file mode 100644 index 0000000000..425acbb1c3 --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.csproj @@ -0,0 +1,31 @@ + + + + + + Razor is a markup syntax for adding server-side logic to web pages. This package contains the Razor parser and code generation infrastructure. + net451;netstandard1.3 + $(NoWarn);CS1591 + true + aspnetcore;cshtml;razor + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.xproj b/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.xproj deleted file mode 100644 index 512eca6ab0..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 932f3c9c-a6c0-40d3-ba50-9309886242fc - Microsoft.AspNetCore.Razor.Evolution - .\obj - .\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Razor.Evolution/Properties/AssemblyInfo.cs index c2bb4a169f..e053d27350 100644 --- a/src/Microsoft.AspNetCore.Razor.Evolution/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Razor.Evolution/Properties/AssemblyInfo.cs @@ -1,14 +1,7 @@ // 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; using System.Runtime.CompilerServices; -[assembly: AssemblyMetadata("Serviceable", "True")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Evolution.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] -[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.Razor.Evolution/__TemporarySources__/HashCodeCombiner.cs b/src/Microsoft.AspNetCore.Razor.Evolution/__TemporarySources__/HashCodeCombiner.cs new file mode 100644 index 0000000000..3cf41ff3f8 --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor.Evolution/__TemporarySources__/HashCodeCombiner.cs @@ -0,0 +1,86 @@ +// 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; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 + +namespace Microsoft.Extensions.Internal +{ + internal struct HashCodeCombiner + { + private long _combinedHash64; + + public int CombinedHash + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return _combinedHash64.GetHashCode(); } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private HashCodeCombiner(long seed) + { + _combinedHash64 = seed; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(IEnumerable e) + { + if (e == null) + { + Add(0); + } + else + { + var count = 0; + foreach (object o in e) + { + Add(o); + count++; + } + Add(count); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int(HashCodeCombiner self) + { + return self.CombinedHash; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(int i) + { + _combinedHash64 = ((_combinedHash64 << 5) + _combinedHash64) ^ i; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(string s) + { + var hashCode = (s != null) ? s.GetHashCode() : 0; + Add(hashCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(object o) + { + var hashCode = (o != null) ? o.GetHashCode() : 0; + Add(hashCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(TValue value, IEqualityComparer comparer) + { + var hashCode = value != null ? comparer.GetHashCode(value) : 0; + Add(hashCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static HashCodeCombiner Start() + { + return new HashCodeCombiner(0x1505L); + } + } +} diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/project.json b/src/Microsoft.AspNetCore.Razor.Evolution/project.json deleted file mode 100644 index 368e7f6e7f..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Evolution/project.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "description": "Razor is a markup syntax for adding server-side logic to web pages. This package contains the Razor parser and code generation infrastructure.", - "version": "1.0.0-*", - "buildOptions": { - "warningsAsErrors": true, - "keyFile": "../../tools/Key.snk", - "nowarn": [ - "CS1591" - ], - "xmlDoc": true - }, - "packOptions": { - "repository": { - "type": "git", - "url": "git://github.com/aspnet/razor" - }, - "tags": [ - "aspnetcore", - "cshtml", - "razor" - ] - }, - "dependencies": { - "Microsoft.Extensions.HashCodeCombiner.Sources": { - "type": "build", - "version": "1.2.0-*" - } - }, - "frameworks": { - "net451": {}, - "netstandard1.3": { - "dependencies": { - "NETStandard.Library": "1.6.1-*" - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.csproj b/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.csproj new file mode 100644 index 0000000000..5a4ab1152d --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.csproj @@ -0,0 +1,49 @@ + + + + + + Runtime components for rendering Razor pages and implementing tag helpers. +Commonly used types: +Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNameAttribute +Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute +Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper + net451;netstandard1.5 + $(NoWarn);CS1591 + true + true + aspnetcore;cshtml;razor;taghelper;taghelpers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.xproj b/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.xproj deleted file mode 100644 index 2194ff6f6e..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.xproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - d0196096-1b01-4133-aace-1a10a0f7247c - .\obj - .\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Razor.Runtime/Properties/AssemblyInfo.cs index 34eedbe2e7..fe4a34e5e5 100644 --- a/src/Microsoft.AspNetCore.Razor.Runtime/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Razor.Runtime/Properties/AssemblyInfo.cs @@ -1,13 +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.Reflection; -using System.Resources; using System.Runtime.CompilerServices; -[assembly: AssemblyMetadata("Serviceable", "True")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Runtime.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[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.Razor.Runtime/__TemporarySources__/ClosedGenericMatcher.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/ClosedGenericMatcher.cs new file mode 100644 index 0000000000..b10fabde98 --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/ClosedGenericMatcher.cs @@ -0,0 +1,108 @@ +// 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; + +// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 + +namespace Microsoft.Extensions.Internal +{ + /// + /// Helper related to generic interface definitions and implementing classes. + /// + internal static class ClosedGenericMatcher + { + /// + /// Determine whether is or implements a closed generic + /// created from . + /// + /// The of interest. + /// The open generic to match. Usually an interface. + /// + /// The closed generic created from that + /// is or implements. null if the two s have no such + /// relationship. + /// + /// + /// This method will return if is + /// typeof(KeyValuePair{,}), and is + /// typeof(KeyValuePair{string, object}). + /// + public static Type ExtractGenericInterface(Type queryType, Type interfaceType) + { + if (queryType == null) + { + throw new ArgumentNullException(nameof(queryType)); + } + + if (interfaceType == null) + { + throw new ArgumentNullException(nameof(interfaceType)); + } + + if (IsGenericInstantiation(queryType, interfaceType)) + { + // queryType matches (i.e. is a closed generic type created from) the open generic type. + return queryType; + } + + // Otherwise check all interfaces the type implements for a match. + // - If multiple different generic instantiations exists, we want the most derived one. + // - If that doesn't break the tie, then we sort alphabetically so that it's deterministic. + // + // We do this by looking at interfaces on the type, and recursing to the base type + // if we don't find any matches. + return GetGenericInstantiation(queryType, interfaceType); + } + + private static bool IsGenericInstantiation(Type candidate, Type interfaceType) + { + return + candidate.GetTypeInfo().IsGenericType && + candidate.GetGenericTypeDefinition() == interfaceType; + } + + private static Type GetGenericInstantiation(Type queryType, Type interfaceType) + { + Type bestMatch = null; + var interfaces = queryType.GetInterfaces(); + foreach (var @interface in interfaces) + { + if (IsGenericInstantiation(@interface, interfaceType)) + { + if (bestMatch == null) + { + bestMatch = @interface; + } + else if (StringComparer.Ordinal.Compare(@interface.FullName, bestMatch.FullName) < 0) + { + bestMatch = @interface; + } + else + { + // There are two matches at this level of the class hierarchy, but @interface is after + // bestMatch in the sort order. + } + } + } + + if (bestMatch != null) + { + return bestMatch; + } + + // BaseType will be null for object and interfaces, which means we've reached 'bottom'. + var baseType = queryType?.GetTypeInfo().BaseType; + if (baseType == null) + { + return null; + } + else + { + return GetGenericInstantiation(baseType, interfaceType); + } + } + } +} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionary.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionary.cs new file mode 100644 index 0000000000..f3bbef4736 --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionary.cs @@ -0,0 +1,157 @@ +// 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; +using System.Collections.Generic; + +// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 + +namespace Microsoft.Extensions.Internal +{ + internal class CopyOnWriteDictionary : IDictionary + { + private readonly IDictionary _sourceDictionary; + private readonly IEqualityComparer _comparer; + private IDictionary _innerDictionary; + + public CopyOnWriteDictionary( + IDictionary sourceDictionary, + IEqualityComparer comparer) + { + if (sourceDictionary == null) + { + throw new ArgumentNullException(nameof(sourceDictionary)); + } + + if (comparer == null) + { + throw new ArgumentNullException(nameof(comparer)); + } + + _sourceDictionary = sourceDictionary; + _comparer = comparer; + } + + private IDictionary ReadDictionary + { + get + { + return _innerDictionary ?? _sourceDictionary; + } + } + + private IDictionary WriteDictionary + { + get + { + if (_innerDictionary == null) + { + _innerDictionary = new Dictionary(_sourceDictionary, + _comparer); + } + + return _innerDictionary; + } + } + + public virtual ICollection Keys + { + get + { + return ReadDictionary.Keys; + } + } + + public virtual ICollection Values + { + get + { + return ReadDictionary.Values; + } + } + + public virtual int Count + { + get + { + return ReadDictionary.Count; + } + } + + public virtual bool IsReadOnly + { + get + { + return false; + } + } + + public virtual TValue this[TKey key] + { + get + { + return ReadDictionary[key]; + } + set + { + WriteDictionary[key] = value; + } + } + + public virtual bool ContainsKey(TKey key) + { + return ReadDictionary.ContainsKey(key); + } + + public virtual void Add(TKey key, TValue value) + { + WriteDictionary.Add(key, value); + } + + public virtual bool Remove(TKey key) + { + return WriteDictionary.Remove(key); + } + + public virtual bool TryGetValue(TKey key, out TValue value) + { + return ReadDictionary.TryGetValue(key, out value); + } + + public virtual void Add(KeyValuePair item) + { + WriteDictionary.Add(item); + } + + public virtual void Clear() + { + WriteDictionary.Clear(); + } + + public virtual bool Contains(KeyValuePair item) + { + return ReadDictionary.Contains(item); + } + + public virtual void CopyTo(KeyValuePair[] array, int arrayIndex) + { + ReadDictionary.CopyTo(array, arrayIndex); + } + + public bool Remove(KeyValuePair item) + { + return WriteDictionary.Remove(item); + } + + public virtual IEnumerator> GetEnumerator() + { + return ReadDictionary.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionaryHolder.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionaryHolder.cs new file mode 100644 index 0000000000..891c89dbb3 --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionaryHolder.cs @@ -0,0 +1,168 @@ +// 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; + +// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 + +namespace Microsoft.Extensions.Internal +{ + internal struct CopyOnWriteDictionaryHolder + { + private readonly Dictionary _source; + private Dictionary _copy; + + public CopyOnWriteDictionaryHolder(Dictionary source) + { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } + + _source = source; + _copy = null; + } + + public CopyOnWriteDictionaryHolder(CopyOnWriteDictionaryHolder source) + { + _source = source._copy ?? source._source; + _copy = null; + } + + public bool HasBeenCopied => _copy != null; + + public Dictionary ReadDictionary + { + get + { + if (_copy != null) + { + return _copy; + } + else if (_source != null) + { + return _source; + } + else + { + // Default-Constructor case + _copy = new Dictionary(); + return _copy; + } + } + } + + public Dictionary WriteDictionary + { + get + { + if (_copy == null && _source == null) + { + // Default-Constructor case + _copy = new Dictionary(); + } + else if (_copy == null) + { + _copy = new Dictionary(_source, _source.Comparer); + } + + return _copy; + } + } + + public Dictionary.KeyCollection Keys + { + get + { + return ReadDictionary.Keys; + } + } + + public Dictionary.ValueCollection Values + { + get + { + return ReadDictionary.Values; + } + } + + public int Count + { + get + { + return ReadDictionary.Count; + } + } + + public bool IsReadOnly + { + get + { + return false; + } + } + + public TValue this[TKey key] + { + get + { + return ReadDictionary[key]; + } + set + { + WriteDictionary[key] = value; + } + } + + public bool ContainsKey(TKey key) + { + return ReadDictionary.ContainsKey(key); + } + + public void Add(TKey key, TValue value) + { + WriteDictionary.Add(key, value); + } + + public bool Remove(TKey key) + { + return WriteDictionary.Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + return ReadDictionary.TryGetValue(key, out value); + } + + public void Add(KeyValuePair item) + { + ((ICollection>)WriteDictionary).Add(item); + } + + public void Clear() + { + WriteDictionary.Clear(); + } + + public bool Contains(KeyValuePair item) + { + return ((ICollection>)ReadDictionary).Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + ((ICollection>)ReadDictionary).CopyTo(array, arrayIndex); + } + + public bool Remove(KeyValuePair item) + { + return ((ICollection>)WriteDictionary).Remove(item); + } + + public Dictionary.Enumerator GetEnumerator() + { + return ReadDictionary.GetEnumerator(); + } + } +} diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/HashCodeCombiner.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/HashCodeCombiner.cs new file mode 100644 index 0000000000..3cf41ff3f8 --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/HashCodeCombiner.cs @@ -0,0 +1,86 @@ +// 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; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 + +namespace Microsoft.Extensions.Internal +{ + internal struct HashCodeCombiner + { + private long _combinedHash64; + + public int CombinedHash + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return _combinedHash64.GetHashCode(); } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private HashCodeCombiner(long seed) + { + _combinedHash64 = seed; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(IEnumerable e) + { + if (e == null) + { + Add(0); + } + else + { + var count = 0; + foreach (object o in e) + { + Add(o); + count++; + } + Add(count); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int(HashCodeCombiner self) + { + return self.CombinedHash; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(int i) + { + _combinedHash64 = ((_combinedHash64 << 5) + _combinedHash64) ^ i; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(string s) + { + var hashCode = (s != null) ? s.GetHashCode() : 0; + Add(hashCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(object o) + { + var hashCode = (o != null) ? o.GetHashCode() : 0; + Add(hashCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(TValue value, IEqualityComparer comparer) + { + var hashCode = value != null ? comparer.GetHashCode(value) : 0; + Add(hashCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static HashCodeCombiner Start() + { + return new HashCodeCombiner(0x1505L); + } + } +} diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCache.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCache.cs new file mode 100644 index 0000000000..9c6fdeb49e --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCache.cs @@ -0,0 +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 System.Threading.Tasks; + +// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 + +namespace Microsoft.Extensions.Internal +{ + internal static class TaskCache + { + /// + /// A that's already completed successfully. + /// + /// + /// We're caching this in a static readonly field to make it more inlinable and avoid the volatile lookup done + /// by Task.CompletedTask. + /// +#if NET451 + public static readonly Task CompletedTask = Task.FromResult(0); +#else + public static readonly Task CompletedTask = Task.CompletedTask; +#endif + } +} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCacheOfT.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCacheOfT.cs new file mode 100644 index 0000000000..1abf64b91f --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCacheOfT.cs @@ -0,0 +1,18 @@ +// 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.Threading.Tasks; + +// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 + +namespace Microsoft.Extensions.Internal +{ + internal static class TaskCache + { + /// + /// Gets a completed with the value of default(T). + /// + public static Task DefaultCompletedTask { get; } = Task.FromResult(default(T)); + } + +} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/project.json b/src/Microsoft.AspNetCore.Razor.Runtime/project.json deleted file mode 100644 index 0962b846d8..0000000000 --- a/src/Microsoft.AspNetCore.Razor.Runtime/project.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "description": "Runtime components for rendering Razor pages and implementing tag helpers.\r\nCommonly used types:\r\nMicrosoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNameAttribute\r\nMicrosoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute\r\nMicrosoft.AspNetCore.Razor.TagHelpers.ITagHelper", - "version": "1.2.0-*", - "buildOptions": { - "allowUnsafe": true, - "keyFile": "../../tools/Key.snk", - "warningsAsErrors": true, - "nowarn": [ - "CS1591" - ], - "xmlDoc": true - }, - "packOptions": { - "repository": { - "type": "git", - "url": "git://github.com/aspnet/razor" - }, - "tags": [ - "aspnetcore", - "cshtml", - "razor", - "taghelper", - "taghelpers" - ] - }, - "dependencies": { - "Microsoft.AspNetCore.Html.Abstractions": "1.2.0-*", - "Microsoft.AspNetCore.Razor": { - "target": "project" - }, - "Microsoft.Extensions.ClosedGenericMatcher.Sources": { - "type": "build", - "version": "1.2.0-*" - }, - "Microsoft.Extensions.CopyOnWriteDictionary.Sources": { - "type": "build", - "version": "1.2.0-*" - }, - "Microsoft.Extensions.HashCodeCombiner.Sources": { - "type": "build", - "version": "1.2.0-*" - }, - "Microsoft.Extensions.TaskCache.Sources": { - "version": "1.2.0-*", - "type": "build" - }, - "NETStandard.Library": "1.6.1-*" - }, - "frameworks": { - "net451": { - "frameworkAssemblies": { - "System.Runtime": { - "type": "build" - }, - "System.IO": { - "type": "build" - }, - "System.Xml": "4.0.0.0", - "System.Xml.Linq": "4.0.0.0" - } - }, - "netstandard1.5": { - "dependencies": { - "System.Reflection.TypeExtensions": "4.3.0-*" - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources.xproj b/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources.xproj deleted file mode 100644 index 2bfe3cf12b..0000000000 --- a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources.xproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - f247c7b7-0d29-4aed-b948-ee5c420b0dd3 - .\obj - .\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/project.json b/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/project.json deleted file mode 100644 index b27831bf19..0000000000 --- a/src/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources/project.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "1.2.0-*", - "shared": "*.cs", - "dependencies": { - "NETStandard.Library": "1.6.1-*", - "xunit.assert": "2.2.0-*" - }, - "frameworks": { - "net451": {}, - "netstandard1.3": {} - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.csproj b/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.csproj new file mode 100644 index 0000000000..733bf29ebe --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.csproj @@ -0,0 +1,32 @@ + + + + + + Razor is a markup syntax for adding server-side logic to web pages. This package contains the Razor parser and code generation infrastructure. + net451;netstandard1.3 + $(NoWarn);CS1591 + true + aspnetcore;cshtml;razor + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.xproj b/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.xproj deleted file mode 100644 index 9a2163fc2d..0000000000 --- a/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.xproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - eda30434-c567-44dc-b8b6-2566a7f77163 - .\obj - .\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.Razor/Properties/AssemblyInfo.cs index 0f57011822..f8047a6b54 100644 --- a/src/Microsoft.AspNetCore.Razor/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNetCore.Razor/Properties/AssemblyInfo.cs @@ -1,13 +1,7 @@ // 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; using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[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.Razor/__TemporarySources__/HashCodeCombiner.cs b/src/Microsoft.AspNetCore.Razor/__TemporarySources__/HashCodeCombiner.cs new file mode 100644 index 0000000000..3cf41ff3f8 --- /dev/null +++ b/src/Microsoft.AspNetCore.Razor/__TemporarySources__/HashCodeCombiner.cs @@ -0,0 +1,86 @@ +// 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; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 + +namespace Microsoft.Extensions.Internal +{ + internal struct HashCodeCombiner + { + private long _combinedHash64; + + public int CombinedHash + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get { return _combinedHash64.GetHashCode(); } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private HashCodeCombiner(long seed) + { + _combinedHash64 = seed; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(IEnumerable e) + { + if (e == null) + { + Add(0); + } + else + { + var count = 0; + foreach (object o in e) + { + Add(o); + count++; + } + Add(count); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator int(HashCodeCombiner self) + { + return self.CombinedHash; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(int i) + { + _combinedHash64 = ((_combinedHash64 << 5) + _combinedHash64) ^ i; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(string s) + { + var hashCode = (s != null) ? s.GetHashCode() : 0; + Add(hashCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(object o) + { + var hashCode = (o != null) ? o.GetHashCode() : 0; + Add(hashCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Add(TValue value, IEqualityComparer comparer) + { + var hashCode = value != null ? comparer.GetHashCode(value) : 0; + Add(hashCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static HashCodeCombiner Start() + { + return new HashCodeCombiner(0x1505L); + } + } +} diff --git a/src/Microsoft.AspNetCore.Razor/project.json b/src/Microsoft.AspNetCore.Razor/project.json deleted file mode 100644 index 3a9bd43583..0000000000 --- a/src/Microsoft.AspNetCore.Razor/project.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "description": "Razor is a markup syntax for adding server-side logic to web pages. This package contains the Razor parser and code generation infrastructure.", - "version": "1.2.0-*", - "buildOptions": { - "warningsAsErrors": true, - "keyFile": "../../tools/Key.snk", - "nowarn": [ - "CS1591" - ], - "xmlDoc": true - }, - "packOptions": { - "repository": { - "type": "git", - "url": "git://github.com/aspnet/razor" - }, - "tags": [ - "aspnetcore", - "cshtml", - "razor" - ] - }, - "dependencies": { - "Microsoft.Extensions.HashCodeCombiner.Sources": { - "type": "build", - "version": "1.2.0-*" - }, - "NETStandard.Library": "1.6.1-*" - }, - "frameworks": { - "net451": {}, - "netstandard1.3": { - "dependencies": { - "System.Threading.Thread": "4.3.0-*" - } - } - } -} \ No newline at end of file diff --git a/src/RazorPageGenerator/RazorPageGenerator.csproj b/src/RazorPageGenerator/RazorPageGenerator.csproj new file mode 100644 index 0000000000..2437783592 --- /dev/null +++ b/src/RazorPageGenerator/RazorPageGenerator.csproj @@ -0,0 +1,21 @@ + + + + + + Builds Razor pages for views in a project. For internal use only. + netcoreapp1.0 + dotnet-razorpagegenerator + RazorPageGenerator + Exe + + + + + + + + + + + diff --git a/src/RazorPageGenerator/RazorPageGenerator.xproj b/src/RazorPageGenerator/RazorPageGenerator.xproj deleted file mode 100644 index 0c73d8f421..0000000000 --- a/src/RazorPageGenerator/RazorPageGenerator.xproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 7be58880-36ad-4cd5-9e16-2a5afea790ef - RazorPageGenerator - .\obj - .\bin\ - - - - 2.0 - - - \ No newline at end of file diff --git a/src/RazorPageGenerator/project.json b/src/RazorPageGenerator/project.json deleted file mode 100644 index ed7be00d4b..0000000000 --- a/src/RazorPageGenerator/project.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": "1.2.0-*", - "description": "Builds Razor pages for views in a project. For internal use only.", - "buildOptions": { - "warningsAsErrors": true, - "emitEntryPoint": true, - "outputName": "dotnet-razorpagegenerator" - }, - "dependencies": { - "Microsoft.AspNetCore.Razor": { - "target": "project" - }, - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - } - }, - "frameworks": { - "netcoreapp1.0": {} - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/IntegrationTestBase.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/IntegrationTestBase.cs index 7ef9650441..e74f8ffbad 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/IntegrationTestBase.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/IntegrationTestBase.cs @@ -24,7 +24,11 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests private static string FindTestProjectRoot() { - var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); +#if NET451 + var currentDirectory = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory); +#else + var currentDirectory = new DirectoryInfo(AppContext.BaseDirectory); +#endif while (currentDirectory != null && !string.Equals(currentDirectory.Name, ThisProjectName, StringComparison.Ordinal)) diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj b/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj new file mode 100644 index 0000000000..3ec08826dc --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj @@ -0,0 +1,39 @@ + + + + + + netcoreapp1.0;net451 + $(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.xproj b/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.xproj deleted file mode 100644 index b6da6a80ca..0000000000 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0.25420 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 969357a4-ccf1-46d9-b002-9aa072afc75c - Microsoft.AspNetCore.Razor.Evolution.Test - .\obj - .\bin\ - - - 2.0 - - - - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/project.json b/test/Microsoft.AspNetCore.Razor.Evolution.Test/project.json deleted file mode 100644 index 51aa927daa..0000000000 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/project.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "version": "1.0.0", - "dependencies": { - "dotnet-test-xunit": "2.2.0-*", - "Microsoft.AspNetCore.Razor.Evolution": "1.0.0-*", - "Microsoft.AspNetCore.Testing": "1.2.0-*", - "Moq": "4.6.36-*", - "xunit": "2.2.0-*" - }, - "testRunner": "xunit", - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-*", - "type": "platform" - } - } - }, - "net451": { - "frameworkAssemblies": { - "System.Runtime": "", - "System.Threading.Tasks": "" - } - } - }, - "buildOptions": { - "define": [ - "__RemoveThisBitTo__GENERATE_BASELINES" - ], - "warningsAsErrors": true, - "keyFile": "../../tools/Key.snk", - "embed": { - "include": "TestFiles/**/*" - }, - "compile": { - "include": "**/*.cs", - "exclude": [ - "TestFiles/**/*", - "bin", - "obj" - ] - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj new file mode 100644 index 0000000000..b67823e256 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj @@ -0,0 +1,54 @@ + + + + + + netcoreapp1.1;net451 + + + + + + + + + + + + true + + + + + + true + + + true + + + + true + + + true + + + + + + + + + + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.xproj b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.xproj deleted file mode 100644 index a96cfaf864..0000000000 --- a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 0535998a-e32c-4d1a-80d1-0b15a513c471 - .\obj - .\bin\ - - - 2.0 - - - - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactoryTest.cs b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactoryTest.cs index 350597844b..44538e00cc 100644 --- a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactoryTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactoryTest.cs @@ -29,14 +29,17 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers "TagHelpers.DocumentedTagHelper.SummaryProperty\" />"; + private static readonly string BaseDir = +#if NET451 + AppDomain.CurrentDomain.BaseDirectory; +#else + AppContext.BaseDirectory; +#endif + // These test assemblies don't really exist. They are used to look up corresponding XML for a fake assembly // which is based on the DocumentedTagHelper type. - public static readonly string TestRoot = -#if NET451 - Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..")); -#else - Directory.GetCurrentDirectory(); -#endif + public static readonly string TestRoot = Path.GetFullPath(Path.Combine(BaseDir, "..", "..", "..")); + public static readonly string DocumentedAssemblyLocation = Path.Combine(TestRoot, "TestFiles", "NotLocalized", "TagHelperDocumentation.dll"); public static readonly string LocalizedDocumentedAssemblyLocation = diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/XmlDocumentationProviderTest.cs b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/XmlDocumentationProviderTest.cs index db0cfd96b0..c5afc57e22 100644 --- a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/XmlDocumentationProviderTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Runtime/TagHelpers/XmlDocumentationProviderTest.cs @@ -13,12 +13,15 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers { public class XmlDocumentationProviderTest { - private static readonly string TestRoot = + private static readonly string BaseDir = #if NET451 - Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..")); + AppDomain.CurrentDomain.BaseDirectory; #else - Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..")); + AppContext.BaseDirectory; #endif + + private static readonly string TestRoot = Path.GetFullPath(Path.Combine(BaseDir, "..", "..", "..")); + private static readonly string XmlTestFileLocation = TestRoot + "/TestFiles/NotLocalized/TagHelperDocumentation.xml"; private static readonly TypeInfo DocumentedTagHelperTypeInfo = typeof(DocumentedTagHelper).GetTypeInfo(); diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/TagHelpers/TagHelperOutputTest.cs b/test/Microsoft.AspNetCore.Razor.Runtime.Test/TagHelpers/TagHelperOutputTest.cs index ed8899f9ca..9d203102bd 100644 --- a/test/Microsoft.AspNetCore.Razor.Runtime.Test/TagHelpers/TagHelperOutputTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Runtime.Test/TagHelpers/TagHelperOutputTest.cs @@ -108,7 +108,7 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers [Theory] [MemberData(nameof(HtmlEncoderData))] - public async Task GetChildContentAsync_CallsGetChildContentAsync(HtmlEncoder encoder) + public async Task GetChildContentAsync_CallsGetChildContentAsyncWithEncoder(HtmlEncoder encoder) { // Arrange bool? passedUseCacheResult = null; @@ -137,7 +137,7 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers [Theory] [InlineData(false)] [InlineData(true)] - public async Task GetChildContentAsync_CallsGetChildContentAsync(bool useCachedResult) + public async Task GetChildContentAsync_CallsGetChildContentAsyncWithCachedResult(bool useCachedResult) { // Arrange bool? passedUseCacheResult = null; @@ -183,7 +183,7 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers [Theory] [MemberData(nameof(UseCachedResultAndHtmlEncoderData))] - public async Task GetChildContentAsync_CallsGetChildContentAsync(bool useCachedResult, HtmlEncoder encoder) + public async Task GetChildContentAsync_CallsGetChildContentAsyncWithCacheAndEncoder(bool useCachedResult, HtmlEncoder encoder) { // Arrange bool? passedUseCacheResult = null; diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/project.json b/test/Microsoft.AspNetCore.Razor.Runtime.Test/project.json deleted file mode 100644 index 0ad697ce8d..0000000000 --- a/test/Microsoft.AspNetCore.Razor.Runtime.Test/project.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "version": "1.0.0", - "buildOptions": { - "warningsAsErrors": true, - "keyFile": "../../tools/Key.snk" - }, - "dependencies": { - "dotnet-test-xunit": "2.2.0-*", - "Microsoft.AspNetCore.Razor.Runtime": "1.2.0-*", - "Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources": { - "version": "1.2.0-*", - "type": "build" - }, - "Microsoft.AspNetCore.Testing": "1.2.0-*", - "Microsoft.Extensions.WebEncoders": "1.2.0-*", - "Moq": "4.6.36-*", - "xunit": "2.2.0-*" - }, - "testRunner": "xunit", - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - }, - "System.Diagnostics.TraceSource": "4.3.0-*" - } - }, - "net451": { - "frameworkAssemblies": { - "System.Runtime": { - "type": "build" - }, - "System.IO": { - "type": "build" - }, - "System.Threading.Tasks": "", - "System.Xml": "4.0.0.0", - "System.Xml.Linq": "4.0.0.0" - } - } - } -} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj b/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj new file mode 100644 index 0000000000..bee09007d9 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj @@ -0,0 +1,54 @@ + + + + + + netcoreapp1.1;net451 + $(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES + + + + + + + + + + + + + + + + + true + + + true + + + true + + + true + + + + + + + + + + + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.xproj b/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.xproj deleted file mode 100644 index 87f8720e64..0000000000 --- a/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.xproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 87c7338b-0c06-4c7b-be75-a2368ae26797 - .\obj - .\bin\ - - - 2.0 - - - - - - - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Razor.Test/project.json b/test/Microsoft.AspNetCore.Razor.Test/project.json deleted file mode 100644 index b39a51d785..0000000000 --- a/test/Microsoft.AspNetCore.Razor.Test/project.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "version": "1.0.0", - "dependencies": { - "dotnet-test-xunit": "2.2.0-*", - "Microsoft.AspNetCore.Razor": "1.2.0-*", - "Microsoft.AspNetCore.Razor.Runtime": "1.2.0-*", - "Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources": { - "version": "1.2.0-*", - "type": "build" - }, - "Microsoft.AspNetCore.Testing": "1.2.0-*", - "Moq": "4.6.36-*", - "Newtonsoft.Json": "9.0.1", - "xunit": "2.2.0-*" - }, - "testRunner": "xunit", - "frameworks": { - "netcoreapp1.1": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0-*", - "type": "platform" - }, - "System.Diagnostics.TraceSource": "4.3.0-*" - } - }, - "net451": { - "frameworkAssemblies": { - "System.Runtime": "", - "System.Threading.Tasks": "" - } - } - }, - "buildOptions": { - "define": [ - "__RemoveThisBitTo__GENERATE_BASELINES" - ], - "warningsAsErrors": true, - "keyFile": "../../tools/Key.snk", - "embed": { - "include": "TestFiles/**/*" - }, - "compile": { - "include": "**/*.cs", - "exclude": [ - "TestFiles/**/*", - "bin", - "obj" - ] - } - } -} \ No newline at end of file diff --git a/version.props b/version.props new file mode 100644 index 0000000000..e77c8d9c38 --- /dev/null +++ b/version.props @@ -0,0 +1,7 @@ + + + + 1.2.0 + preview1 + + \ No newline at end of file