diff --git a/.gitignore b/.gitignore index 5de40f3cd7..986b55cb45 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ nuget.exe *.*sdf *.ipch project.lock.json +.vs \ No newline at end of file diff --git a/src/Microsoft.AspNet.Razor.Runtime.Precompilation/project.json b/src/Microsoft.AspNet.Razor.Runtime.Precompilation/project.json index 6e13b31ad9..de21c1284a 100644 --- a/src/Microsoft.AspNet.Razor.Runtime.Precompilation/project.json +++ b/src/Microsoft.AspNet.Razor.Runtime.Precompilation/project.json @@ -1,36 +1,37 @@ { - "description": "Supports tag helper resolution during precompilation.", - "version": "4.0.0-*", - "repository": { - "type": "git", - "url": "git://github.com/aspnet/razor" + "description": "Supports tag helper resolution during precompilation.", + "version": "4.0.0-*", + "repository": { + "type": "git", + "url": "git://github.com/aspnet/razor" + }, + "compilationOptions": { + "warningsAsErrors": true + }, + "dependencies": { + "Microsoft.Extensions.PropertyActivator.Sources": { + "version": "1.0.0-*", + "type": "build" }, - "compilationOptions": { - "warningsAsErrors": true + "Microsoft.Extensions.PropertyHelper.Sources": { + "version": "1.0.0-*", + "type": "build" }, - "dependencies": { - "Microsoft.Extensions.PropertyActivator.Sources": { - "version": "1.0.0-*", - "type": "build" - }, - "Microsoft.Extensions.PropertyHelper.Sources": { - "version": "1.0.0-*", - "type": "build" - }, - "Microsoft.AspNet.Razor.Runtime": "4.0.0-*", - "Microsoft.Dnx.Compilation.CSharp.Abstractions": "1.0.0-*" + "Microsoft.AspNet.Razor.Runtime": "4.0.0-*", + "Microsoft.Dnx.Compilation.CSharp.Abstractions": "1.0.0-*" + }, + "frameworks": { + "net451": { + "frameworkAssemblies": { + "System.Runtime": "4.0.0.0" + } }, - "frameworks": { - "dnx451": { - "frameworkAssemblies": { - "System.Runtime": "4.0.0.0" - } - }, - "dnxcore50": { - "dependencies": { - "System.Collections.Concurrent": "4.0.11-*", - "System.Linq.Expressions": "4.0.11-*" - } - } + "dotnet5.4": { + "dependencies": { + "System.Collections.Concurrent": "4.0.11-*", + "System.Linq.Expressions": "4.0.11-*", + "System.Reflection.TypeExtensions": "4.0.1-*" + } } -} + } +} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/DefaultTagHelperContent.cs b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/DefaultTagHelperContent.cs index 3f05a33920..1b00052c0a 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/DefaultTagHelperContent.cs +++ b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/DefaultTagHelperContent.cs @@ -204,7 +204,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers public bool IsWhiteSpace { get; private set; } = true; -#if DNXCORE50 +#if DOTNET5_4 // This is an abstract method in DNXCore public override void Write(char value) { diff --git a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorFactory.cs b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorFactory.cs index 47eb1df056..521c1bbcae 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorFactory.cs +++ b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDescriptorFactory.cs @@ -108,7 +108,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers { TagHelperDesignTimeDescriptor typeDesignTimeDescriptor = null; -#if !DNXCORE50 +#if !DOTNET5_4 if (designTime) { var runtimeTypeInfo = typeInfo as RuntimeTypeInfo; @@ -702,7 +702,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers { TagHelperAttributeDesignTimeDescriptor propertyDesignTimeDescriptor = null; -#if !DNXCORE50 +#if !DOTNET5_4 if (designTime) { var runtimeProperty = property as RuntimePropertyInfo; diff --git a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactory.cs b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactory.cs index 22f7ce1d36..66a484b77e 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactory.cs +++ b/src/Microsoft.AspNet.Razor.Runtime/TagHelpers/TagHelperDesignTimeDescriptorFactory.cs @@ -1,7 +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. -#if !DNXCORE50 // Cannot accurately resolve the location of the documentation XML file in coreclr. +#if !DOTNET5_4 // Cannot accurately resolve the location of the documentation XML file in coreclr. using System; using System.Collections.Generic; using System.Globalization; diff --git a/src/Microsoft.AspNet.Razor.Runtime/XMLDocumentationProvider.cs b/src/Microsoft.AspNet.Razor.Runtime/XMLDocumentationProvider.cs index c78a8e4e92..589d187199 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/XMLDocumentationProvider.cs +++ b/src/Microsoft.AspNet.Razor.Runtime/XMLDocumentationProvider.cs @@ -1,7 +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. -#if !DNXCORE50 +#if !DOTNET5_4 using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.AspNet.Razor.Runtime/project.json b/src/Microsoft.AspNet.Razor.Runtime/project.json index 48d23923ea..f209f7d887 100644 --- a/src/Microsoft.AspNet.Razor.Runtime/project.json +++ b/src/Microsoft.AspNet.Razor.Runtime/project.json @@ -22,23 +22,17 @@ } }, "frameworks": { - "net45": { + "net451": { "frameworkAssemblies": { "System.Xml": "4.0.0.0", "System.Xml.Linq": "4.0.0.0" } }, - "dnx451": { - "frameworkAssemblies": { - "System.Xml": "4.0.0.0", - "System.Xml.Linq": "4.0.0.0" - } - }, - "dnxcore50": { + "dotnet5.4": { "dependencies": { "System.Reflection.Extensions": "4.0.1-beta-*", "System.Text.RegularExpressions": "4.0.11-beta-*" } } } -} +} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Razor.Test.Sources/project.json b/src/Microsoft.AspNet.Razor.Test.Sources/project.json index 0b98b3a1eb..17cad22996 100644 --- a/src/Microsoft.AspNet.Razor.Test.Sources/project.json +++ b/src/Microsoft.AspNet.Razor.Test.Sources/project.json @@ -5,7 +5,11 @@ "xunit.assert": "2.1.0-*" }, "frameworks": { - "net45": { }, - "dotnet": { } + "net451": { }, + "dotnet5.4": { + "dependencies": { + "System.Runtime": "4.0.21-beta-*" + } + } } -} +} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Razor/CSharpRazorCodeLanguage.cs b/src/Microsoft.AspNet.Razor/CSharpRazorCodeLanguage.cs index 008b8edbd7..7c48b45c85 100644 --- a/src/Microsoft.AspNet.Razor/CSharpRazorCodeLanguage.cs +++ b/src/Microsoft.AspNet.Razor/CSharpRazorCodeLanguage.cs @@ -4,7 +4,7 @@ using Microsoft.AspNet.Razor.Chunks.Generators; using Microsoft.AspNet.Razor.CodeGenerators; using Microsoft.AspNet.Razor.Parser; -#if NET45 +#if NET451 #endif diff --git a/src/Microsoft.AspNet.Razor/Editor/BackgroundParser.cs b/src/Microsoft.AspNet.Razor/Editor/BackgroundParser.cs index 762ca2433f..9ecb8d9779 100644 --- a/src/Microsoft.AspNet.Razor/Editor/BackgroundParser.cs +++ b/src/Microsoft.AspNet.Razor/Editor/BackgroundParser.cs @@ -310,7 +310,7 @@ namespace Microsoft.AspNet.Razor.Editor RazorEditorTrace.TraceLine(RazorResources.FormatTrace_BackgroundThreadStart(fileNameOnly)); EnsureOnThread(); -#if DNXCORE50 +#if DOTNET5_4 var spinWait = new SpinWait(); #endif @@ -428,7 +428,7 @@ namespace Microsoft.AspNet.Razor.Editor else { RazorEditorTrace.TraceLine(RazorResources.FormatTrace_NoChangesArrived(fileNameOnly)); -#if DNXCORE50 +#if DOTNET5_4 // This does the equivalent of thread.yield under the covers. spinWait.SpinOnce(); #else diff --git a/src/Microsoft.AspNet.Razor/Editor/RazorEditorTrace.cs b/src/Microsoft.AspNet.Razor/Editor/RazorEditorTrace.cs index 6f1b71f418..80fa645819 100644 --- a/src/Microsoft.AspNet.Razor/Editor/RazorEditorTrace.cs +++ b/src/Microsoft.AspNet.Razor/Editor/RazorEditorTrace.cs @@ -3,7 +3,7 @@ using System; using System.Diagnostics; -#if NET45 +#if NET451 using System.Globalization; #endif @@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Razor.Editor bool enabled; if (Boolean.TryParse(Environment.GetEnvironmentVariable("RAZOR_EDITOR_TRACE"), out enabled)) { -#if NET45 +#if NET451 // No Trace in CoreCLR Trace.WriteLine(RazorResources.FormatTrace_Startup( @@ -41,7 +41,7 @@ namespace Microsoft.AspNet.Razor.Editor { if (IsEnabled()) { -#if NET45 +#if NET451 // No Trace in CoreCLR Trace.WriteLine(RazorResources.FormatTrace_Format( diff --git a/src/Microsoft.AspNet.Razor/Parser/CSharpLanguageCharacteristics.cs b/src/Microsoft.AspNet.Razor/Parser/CSharpLanguageCharacteristics.cs index c1194cb80d..b22fbc277f 100644 --- a/src/Microsoft.AspNet.Razor/Parser/CSharpLanguageCharacteristics.cs +++ b/src/Microsoft.AspNet.Razor/Parser/CSharpLanguageCharacteristics.cs @@ -143,7 +143,7 @@ namespace Microsoft.AspNet.Razor.Parser case CSharpSymbolType.GreaterThan: return CSharpSymbolType.LessThan; default: -#if NET45 +#if NET451 // No Debug.Fail Debug.Fail("FlipBracket must be called with a bracket character"); #else diff --git a/src/Microsoft.AspNet.Razor/Parser/HtmlLanguageCharacteristics.cs b/src/Microsoft.AspNet.Razor/Parser/HtmlLanguageCharacteristics.cs index 91970b5b8f..dfb1c5eed1 100644 --- a/src/Microsoft.AspNet.Razor/Parser/HtmlLanguageCharacteristics.cs +++ b/src/Microsoft.AspNet.Razor/Parser/HtmlLanguageCharacteristics.cs @@ -88,7 +88,7 @@ namespace Microsoft.AspNet.Razor.Parser case HtmlSymbolType.CloseAngle: return HtmlSymbolType.OpenAngle; default: -#if NET45 +#if NET451 // No Debug.Fail in CoreCLR Debug.Fail("FlipBracket must be called with a bracket character"); diff --git a/src/Microsoft.AspNet.Razor/Parser/ParserContext.cs b/src/Microsoft.AspNet.Razor/Parser/ParserContext.cs index 5dff26c23c..853c2fd395 100644 --- a/src/Microsoft.AspNet.Razor/Parser/ParserContext.cs +++ b/src/Microsoft.AspNet.Razor/Parser/ParserContext.cs @@ -326,7 +326,7 @@ namespace Microsoft.AspNet.Razor.Parser _infiniteLoopGuardCount++; if (_infiniteLoopGuardCount > InfiniteLoopCountThreshold) { -#if NET45 +#if NET451 // No Debug.Fail in CoreCLR Debug.Fail("An internal parser error is causing an infinite loop at this location."); diff --git a/src/Microsoft.AspNet.Razor/SourceLocation.cs b/src/Microsoft.AspNet.Razor/SourceLocation.cs index dfe1ab6175..318f6cd1aa 100644 --- a/src/Microsoft.AspNet.Razor/SourceLocation.cs +++ b/src/Microsoft.AspNet.Razor/SourceLocation.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Razor /// /// A location in a Razor file. /// -#if NET45 +#if NET451 // No Serializable attribute in CoreCLR (no need for it anymore?) [Serializable] #endif diff --git a/src/Microsoft.AspNet.Razor/Tokenizer/HtmlTokenizer.cs b/src/Microsoft.AspNet.Razor/Tokenizer/HtmlTokenizer.cs index 79d865aed8..74a3d784df 100644 --- a/src/Microsoft.AspNet.Razor/Tokenizer/HtmlTokenizer.cs +++ b/src/Microsoft.AspNet.Razor/Tokenizer/HtmlTokenizer.cs @@ -158,7 +158,7 @@ namespace Microsoft.AspNet.Razor.Tokenizer TakeCurrent(); return EndSymbol(HtmlSymbolType.DoubleHyphen); default: -#if NET45 +#if NET451 // No Debug.Fail in CoreCLR Debug.Fail("Unexpected symbol!"); diff --git a/src/Microsoft.AspNet.Razor/Tokenizer/Tokenizer.cs b/src/Microsoft.AspNet.Razor/Tokenizer/Tokenizer.cs index a334bc818e..6d72895aaa 100644 --- a/src/Microsoft.AspNet.Razor/Tokenizer/Tokenizer.cs +++ b/src/Microsoft.AspNet.Razor/Tokenizer/Tokenizer.cs @@ -281,7 +281,7 @@ namespace Microsoft.AspNet.Razor.Tokenizer [Conditional("DEBUG")] internal void AssertCurrent(char current) { -#if NET45 +#if NET451 // No Debug.Assert with this many arguments in CoreCLR Debug.Assert(CurrentCharacter == current, "CurrentCharacter Assumption violated", "Assumed that the current character would be {0}, but it is actually {1}", current, CurrentCharacter); diff --git a/src/Microsoft.AspNet.Razor/project.json b/src/Microsoft.AspNet.Razor/project.json index 2259728e79..c63466e9e4 100644 --- a/src/Microsoft.AspNet.Razor/project.json +++ b/src/Microsoft.AspNet.Razor/project.json @@ -12,9 +12,8 @@ } }, "frameworks": { - "net45": { }, - "dnx451": { }, - "dnxcore50": { + "net451": {}, + "dotnet5.4": { "dependencies": { "System.Diagnostics.Tools": "4.0.1-beta-*", "System.IO.FileSystem": "4.0.1-beta-*", @@ -24,4 +23,4 @@ } } } -} +} \ No newline at end of file