diff --git a/build/dependencies.props b/build/dependencies.props
index 79507e1de0..443e054a34 100644
--- a/build/dependencies.props
+++ b/build/dependencies.props
@@ -3,7 +3,7 @@
2.0.0-*
0.4.0-*
4.3.0
- 2.0.0-*
+ 2.1.0-*
$(BundledNETStandardPackageVersion)
15.0.0
2.2.0
diff --git a/samples/StaticFileSample/StaticFileSample.csproj b/samples/StaticFileSample/StaticFileSample.csproj
index 211249b4bb..3fdf84f01b 100644
--- a/samples/StaticFileSample/StaticFileSample.csproj
+++ b/samples/StaticFileSample/StaticFileSample.csproj
@@ -3,7 +3,7 @@
- net46;netcoreapp2.0
+ netcoreapp2.0
diff --git a/src/Microsoft.AspNetCore.StaticFiles/baseline.net45.json b/src/Microsoft.AspNetCore.StaticFiles/baseline.net45.json
deleted file mode 100644
index 110db8147e..0000000000
--- a/src/Microsoft.AspNetCore.StaticFiles/baseline.net45.json
+++ /dev/null
@@ -1,1058 +0,0 @@
-{
- "AssemblyIdentity": "Microsoft.AspNetCore.StaticFiles, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60",
- "Types": [
- {
- "Name": "Microsoft.Extensions.DependencyInjection.DirectoryBrowserServiceExtensions",
- "Visibility": "Public",
- "Kind": "Class",
- "Abstract": true,
- "Static": true,
- "Sealed": true,
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "AddDirectoryBrowser",
- "Parameters": [
- {
- "Name": "services",
- "Type": "Microsoft.Extensions.DependencyInjection.IServiceCollection"
- }
- ],
- "ReturnType": "Microsoft.Extensions.DependencyInjection.IServiceCollection",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.Builder.DefaultFilesExtensions",
- "Visibility": "Public",
- "Kind": "Class",
- "Abstract": true,
- "Static": true,
- "Sealed": true,
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "UseDefaultFiles",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "UseDefaultFiles",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- },
- {
- "Name": "requestPath",
- "Type": "System.String"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "UseDefaultFiles",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- },
- {
- "Name": "options",
- "Type": "Microsoft.AspNetCore.Builder.DefaultFilesOptions"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.Builder.DefaultFilesOptions",
- "Visibility": "Public",
- "Kind": "Class",
- "BaseType": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase",
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "get_DefaultFileNames",
- "Parameters": [],
- "ReturnType": "System.Collections.Generic.IList",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_DefaultFileNames",
- "Parameters": [
- {
- "Name": "value",
- "Type": "System.Collections.Generic.IList"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [],
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [
- {
- "Name": "sharedOptions",
- "Type": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions"
- }
- ],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.Builder.DirectoryBrowserExtensions",
- "Visibility": "Public",
- "Kind": "Class",
- "Abstract": true,
- "Static": true,
- "Sealed": true,
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "UseDirectoryBrowser",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "UseDirectoryBrowser",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- },
- {
- "Name": "requestPath",
- "Type": "System.String"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "UseDirectoryBrowser",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- },
- {
- "Name": "options",
- "Type": "Microsoft.AspNetCore.Builder.DirectoryBrowserOptions"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.Builder.DirectoryBrowserOptions",
- "Visibility": "Public",
- "Kind": "Class",
- "BaseType": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase",
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "get_Formatter",
- "Parameters": [],
- "ReturnType": "Microsoft.AspNetCore.StaticFiles.IDirectoryFormatter",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_Formatter",
- "Parameters": [
- {
- "Name": "value",
- "Type": "Microsoft.AspNetCore.StaticFiles.IDirectoryFormatter"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [],
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [
- {
- "Name": "sharedOptions",
- "Type": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions"
- }
- ],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.Builder.FileServerExtensions",
- "Visibility": "Public",
- "Kind": "Class",
- "Abstract": true,
- "Static": true,
- "Sealed": true,
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "UseFileServer",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "UseFileServer",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- },
- {
- "Name": "enableDirectoryBrowsing",
- "Type": "System.Boolean"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "UseFileServer",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- },
- {
- "Name": "requestPath",
- "Type": "System.String"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "UseFileServer",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- },
- {
- "Name": "options",
- "Type": "Microsoft.AspNetCore.Builder.FileServerOptions"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.Builder.FileServerOptions",
- "Visibility": "Public",
- "Kind": "Class",
- "BaseType": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase",
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "get_StaticFileOptions",
- "Parameters": [],
- "ReturnType": "Microsoft.AspNetCore.Builder.StaticFileOptions",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_DirectoryBrowserOptions",
- "Parameters": [],
- "ReturnType": "Microsoft.AspNetCore.Builder.DirectoryBrowserOptions",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_DefaultFilesOptions",
- "Parameters": [],
- "ReturnType": "Microsoft.AspNetCore.Builder.DefaultFilesOptions",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_EnableDirectoryBrowsing",
- "Parameters": [],
- "ReturnType": "System.Boolean",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_EnableDirectoryBrowsing",
- "Parameters": [
- {
- "Name": "value",
- "Type": "System.Boolean"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_EnableDefaultFiles",
- "Parameters": [],
- "ReturnType": "System.Boolean",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_EnableDefaultFiles",
- "Parameters": [
- {
- "Name": "value",
- "Type": "System.Boolean"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.Builder.StaticFileExtensions",
- "Visibility": "Public",
- "Kind": "Class",
- "Abstract": true,
- "Static": true,
- "Sealed": true,
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "UseStaticFiles",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "UseStaticFiles",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- },
- {
- "Name": "requestPath",
- "Type": "System.String"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "UseStaticFiles",
- "Parameters": [
- {
- "Name": "app",
- "Type": "Microsoft.AspNetCore.Builder.IApplicationBuilder"
- },
- {
- "Name": "options",
- "Type": "Microsoft.AspNetCore.Builder.StaticFileOptions"
- }
- ],
- "ReturnType": "Microsoft.AspNetCore.Builder.IApplicationBuilder",
- "Static": true,
- "Extension": true,
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.Builder.StaticFileOptions",
- "Visibility": "Public",
- "Kind": "Class",
- "BaseType": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase",
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "get_ContentTypeProvider",
- "Parameters": [],
- "ReturnType": "Microsoft.AspNetCore.StaticFiles.IContentTypeProvider",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_ContentTypeProvider",
- "Parameters": [
- {
- "Name": "value",
- "Type": "Microsoft.AspNetCore.StaticFiles.IContentTypeProvider"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_DefaultContentType",
- "Parameters": [],
- "ReturnType": "System.String",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_DefaultContentType",
- "Parameters": [
- {
- "Name": "value",
- "Type": "System.String"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_ServeUnknownFileTypes",
- "Parameters": [],
- "ReturnType": "System.Boolean",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_ServeUnknownFileTypes",
- "Parameters": [
- {
- "Name": "value",
- "Type": "System.Boolean"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_OnPrepareResponse",
- "Parameters": [],
- "ReturnType": "System.Action",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_OnPrepareResponse",
- "Parameters": [
- {
- "Name": "value",
- "Type": "System.Action"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [],
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [
- {
- "Name": "sharedOptions",
- "Type": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions"
- }
- ],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.DefaultFilesMiddleware",
- "Visibility": "Public",
- "Kind": "Class",
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "Invoke",
- "Parameters": [
- {
- "Name": "context",
- "Type": "Microsoft.AspNetCore.Http.HttpContext"
- }
- ],
- "ReturnType": "System.Threading.Tasks.Task",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [
- {
- "Name": "next",
- "Type": "Microsoft.AspNetCore.Http.RequestDelegate"
- },
- {
- "Name": "hostingEnv",
- "Type": "Microsoft.AspNetCore.Hosting.IHostingEnvironment"
- },
- {
- "Name": "options",
- "Type": "Microsoft.Extensions.Options.IOptions"
- }
- ],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.DirectoryBrowserMiddleware",
- "Visibility": "Public",
- "Kind": "Class",
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "Invoke",
- "Parameters": [
- {
- "Name": "context",
- "Type": "Microsoft.AspNetCore.Http.HttpContext"
- }
- ],
- "ReturnType": "System.Threading.Tasks.Task",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [
- {
- "Name": "next",
- "Type": "Microsoft.AspNetCore.Http.RequestDelegate"
- },
- {
- "Name": "hostingEnv",
- "Type": "Microsoft.AspNetCore.Hosting.IHostingEnvironment"
- },
- {
- "Name": "encoder",
- "Type": "System.Text.Encodings.Web.HtmlEncoder"
- },
- {
- "Name": "options",
- "Type": "Microsoft.Extensions.Options.IOptions"
- }
- ],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.FileExtensionContentTypeProvider",
- "Visibility": "Public",
- "Kind": "Class",
- "ImplementedInterfaces": [
- "Microsoft.AspNetCore.StaticFiles.IContentTypeProvider"
- ],
- "Members": [
- {
- "Kind": "Method",
- "Name": "get_Mappings",
- "Parameters": [],
- "ReturnType": "System.Collections.Generic.IDictionary",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "TryGetContentType",
- "Parameters": [
- {
- "Name": "subpath",
- "Type": "System.String"
- },
- {
- "Name": "contentType",
- "Type": "System.String",
- "Direction": "Out"
- }
- ],
- "ReturnType": "System.Boolean",
- "Sealed": true,
- "Virtual": true,
- "ImplementedInterface": "Microsoft.AspNetCore.StaticFiles.IContentTypeProvider",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [],
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [
- {
- "Name": "mapping",
- "Type": "System.Collections.Generic.IDictionary"
- }
- ],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.HtmlDirectoryFormatter",
- "Visibility": "Public",
- "Kind": "Class",
- "ImplementedInterfaces": [
- "Microsoft.AspNetCore.StaticFiles.IDirectoryFormatter"
- ],
- "Members": [
- {
- "Kind": "Method",
- "Name": "GenerateContentAsync",
- "Parameters": [
- {
- "Name": "context",
- "Type": "Microsoft.AspNetCore.Http.HttpContext"
- },
- {
- "Name": "contents",
- "Type": "System.Collections.Generic.IEnumerable"
- }
- ],
- "ReturnType": "System.Threading.Tasks.Task",
- "Virtual": true,
- "ImplementedInterface": "Microsoft.AspNetCore.StaticFiles.IDirectoryFormatter",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [
- {
- "Name": "encoder",
- "Type": "System.Text.Encodings.Web.HtmlEncoder"
- }
- ],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.IContentTypeProvider",
- "Visibility": "Public",
- "Kind": "Interface",
- "Abstract": true,
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "TryGetContentType",
- "Parameters": [
- {
- "Name": "subpath",
- "Type": "System.String"
- },
- {
- "Name": "contentType",
- "Type": "System.String",
- "Direction": "Out"
- }
- ],
- "ReturnType": "System.Boolean",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.IDirectoryFormatter",
- "Visibility": "Public",
- "Kind": "Interface",
- "Abstract": true,
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "GenerateContentAsync",
- "Parameters": [
- {
- "Name": "context",
- "Type": "Microsoft.AspNetCore.Http.HttpContext"
- },
- {
- "Name": "contents",
- "Type": "System.Collections.Generic.IEnumerable"
- }
- ],
- "ReturnType": "System.Threading.Tasks.Task",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware",
- "Visibility": "Public",
- "Kind": "Class",
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "Invoke",
- "Parameters": [
- {
- "Name": "context",
- "Type": "Microsoft.AspNetCore.Http.HttpContext"
- }
- ],
- "ReturnType": "System.Threading.Tasks.Task",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [
- {
- "Name": "next",
- "Type": "Microsoft.AspNetCore.Http.RequestDelegate"
- },
- {
- "Name": "hostingEnv",
- "Type": "Microsoft.AspNetCore.Hosting.IHostingEnvironment"
- },
- {
- "Name": "options",
- "Type": "Microsoft.Extensions.Options.IOptions"
- },
- {
- "Name": "loggerFactory",
- "Type": "Microsoft.Extensions.Logging.ILoggerFactory"
- }
- ],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext",
- "Visibility": "Public",
- "Kind": "Class",
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "get_Context",
- "Parameters": [],
- "ReturnType": "Microsoft.AspNetCore.Http.HttpContext",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_File",
- "Parameters": [],
- "ReturnType": "Microsoft.Extensions.FileProviders.IFileInfo",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions",
- "Visibility": "Public",
- "Kind": "Class",
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "get_RequestPath",
- "Parameters": [],
- "ReturnType": "Microsoft.AspNetCore.Http.PathString",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_RequestPath",
- "Parameters": [
- {
- "Name": "value",
- "Type": "Microsoft.AspNetCore.Http.PathString"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_FileProvider",
- "Parameters": [],
- "ReturnType": "Microsoft.Extensions.FileProviders.IFileProvider",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_FileProvider",
- "Parameters": [
- {
- "Name": "value",
- "Type": "Microsoft.Extensions.FileProviders.IFileProvider"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [],
- "Visibility": "Public",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- },
- {
- "Name": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase",
- "Visibility": "Public",
- "Kind": "Class",
- "Abstract": true,
- "ImplementedInterfaces": [],
- "Members": [
- {
- "Kind": "Method",
- "Name": "get_SharedOptions",
- "Parameters": [],
- "ReturnType": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions",
- "Visibility": "Protected",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_RequestPath",
- "Parameters": [],
- "ReturnType": "Microsoft.AspNetCore.Http.PathString",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_RequestPath",
- "Parameters": [
- {
- "Name": "value",
- "Type": "Microsoft.AspNetCore.Http.PathString"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "get_FileProvider",
- "Parameters": [],
- "ReturnType": "Microsoft.Extensions.FileProviders.IFileProvider",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Method",
- "Name": "set_FileProvider",
- "Parameters": [
- {
- "Name": "value",
- "Type": "Microsoft.Extensions.FileProviders.IFileProvider"
- }
- ],
- "ReturnType": "System.Void",
- "Visibility": "Public",
- "GenericParameter": []
- },
- {
- "Kind": "Constructor",
- "Name": ".ctor",
- "Parameters": [
- {
- "Name": "sharedOptions",
- "Type": "Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions"
- }
- ],
- "Visibility": "Protected",
- "GenericParameter": []
- }
- ],
- "GenericParameters": []
- }
- ],
- "SourceFilters": []
-}
\ No newline at end of file
diff --git a/test/Microsoft.AspNetCore.RangeHelper.Sources.Test/Microsoft.AspNetCore.RangeHelper.Sources.Test.csproj b/test/Microsoft.AspNetCore.RangeHelper.Sources.Test/Microsoft.AspNetCore.RangeHelper.Sources.Test.csproj
index a6682111b8..1d411d54ec 100644
--- a/test/Microsoft.AspNetCore.RangeHelper.Sources.Test/Microsoft.AspNetCore.RangeHelper.Sources.Test.csproj
+++ b/test/Microsoft.AspNetCore.RangeHelper.Sources.Test/Microsoft.AspNetCore.RangeHelper.Sources.Test.csproj
@@ -3,10 +3,7 @@
- netcoreapp2.0;net46
- netcoreapp2.0
- true
- true
+ netcoreapp2.0
diff --git a/test/Microsoft.AspNetCore.StaticFiles.FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj b/test/Microsoft.AspNetCore.StaticFiles.FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj
index b6fc5d673c..12559279e7 100644
--- a/test/Microsoft.AspNetCore.StaticFiles.FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj
+++ b/test/Microsoft.AspNetCore.StaticFiles.FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj
@@ -3,11 +3,7 @@
- netcoreapp2.0;net46
- netcoreapp2.0
- win7-x64
- true
- true
+ netcoreapp2.0
diff --git a/test/Microsoft.AspNetCore.StaticFiles.FunctionalTests/StaticFileMiddlewareTests.cs b/test/Microsoft.AspNetCore.StaticFiles.FunctionalTests/StaticFileMiddlewareTests.cs
index 056eff4af7..ca1deb49dc 100644
--- a/test/Microsoft.AspNetCore.StaticFiles.FunctionalTests/StaticFileMiddlewareTests.cs
+++ b/test/Microsoft.AspNetCore.StaticFiles.FunctionalTests/StaticFileMiddlewareTests.cs
@@ -48,14 +48,14 @@ namespace Microsoft.AspNetCore.StaticFiles
var baseAddress = "http://localhost:12345";
var builder = new WebHostBuilder()
.UseKestrel()
- .UseWebRoot(TestDirectory.BaseDirectory)
+ .UseWebRoot(AppContext.BaseDirectory)
.Configure(app => app.UseStaticFiles());
using (var server = builder.Start(baseAddress))
{
using (var client = new HttpClient() { BaseAddress = new Uri(baseAddress) })
{
- var last = File.GetLastWriteTimeUtc(Path.Combine(TestDirectory.BaseDirectory, "TestDocument.txt"));
+ var last = File.GetLastWriteTimeUtc(Path.Combine(AppContext.BaseDirectory, "TestDocument.txt"));
var response = await client.GetAsync("TestDocument.txt");
var trimed = new DateTimeOffset(last.Year, last.Month, last.Day, last.Hour, last.Minute, last.Second, TimeSpan.Zero).ToUniversalTime();
@@ -89,7 +89,7 @@ namespace Microsoft.AspNetCore.StaticFiles
var baseAddress = "http://localhost:12345";
var builder = new WebHostBuilder()
.UseKestrel()
- .UseWebRoot(Path.Combine(TestDirectory.BaseDirectory, baseDir))
+ .UseWebRoot(Path.Combine(AppContext.BaseDirectory, baseDir))
.Configure(app => app.UseStaticFiles(new StaticFileOptions()
{
RequestPath = new PathString(baseUrl),
@@ -127,7 +127,7 @@ namespace Microsoft.AspNetCore.StaticFiles
var baseAddress = "http://localhost:12345";
var builder = new WebHostBuilder()
.UseKestrel()
- .UseWebRoot(Path.Combine(TestDirectory.BaseDirectory, baseDir))
+ .UseWebRoot(Path.Combine(AppContext.BaseDirectory, baseDir))
.Configure(app => app.UseStaticFiles(new StaticFileOptions()
{
RequestPath = new PathString(baseUrl),
@@ -184,7 +184,7 @@ namespace Microsoft.AspNetCore.StaticFiles
var responseComplete = new ManualResetEvent(false);
Exception exception = null;
var builder = new WebHostBuilder()
- .UseWebRoot(Path.Combine(TestDirectory.BaseDirectory))
+ .UseWebRoot(Path.Combine(AppContext.BaseDirectory))
.Configure(app =>
{
app.Use(async (context, next) =>
diff --git a/test/Microsoft.AspNetCore.StaticFiles.Tests/DefaultFilesMiddlewareTests.cs b/test/Microsoft.AspNetCore.StaticFiles.Tests/DefaultFilesMiddlewareTests.cs
index 3915a2f3e4..4ca3e6027c 100644
--- a/test/Microsoft.AspNetCore.StaticFiles.Tests/DefaultFilesMiddlewareTests.cs
+++ b/test/Microsoft.AspNetCore.StaticFiles.Tests/DefaultFilesMiddlewareTests.cs
@@ -1,6 +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;
using System.IO;
using System.Linq;
using System.Net;
@@ -52,7 +53,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task NoMatch_PassesThrough(string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(app =>
{
@@ -91,7 +92,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task FoundDirectoryWithDefaultFile_PathModified(string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(app =>
{
@@ -130,7 +131,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task NearMatch_RedirectAddSlash(string baseUrl, string baseDir, string requestUrl, string queryString)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(app => app.UseDefaultFiles(new DefaultFilesOptions
{
@@ -168,7 +169,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task PostDirectory_PassesThrough(string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvder = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvder = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(app => app.UseDefaultFiles(new DefaultFilesOptions
{
diff --git a/test/Microsoft.AspNetCore.StaticFiles.Tests/DirectoryBrowserMiddlewareTests.cs b/test/Microsoft.AspNetCore.StaticFiles.Tests/DirectoryBrowserMiddlewareTests.cs
index e3a8ebdf94..097ca9f05e 100644
--- a/test/Microsoft.AspNetCore.StaticFiles.Tests/DirectoryBrowserMiddlewareTests.cs
+++ b/test/Microsoft.AspNetCore.StaticFiles.Tests/DirectoryBrowserMiddlewareTests.cs
@@ -72,7 +72,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task NoMatch_PassesThrough(string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(
app => app.UseDirectoryBrowser(new DirectoryBrowserOptions
@@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task FoundDirectory_Served(string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(
app => app.UseDirectoryBrowser(new DirectoryBrowserOptions
@@ -151,7 +151,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task NearMatch_RedirectAddSlash(string baseUrl, string baseDir, string requestUrl, string queryString)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(
app => app.UseDirectoryBrowser(new DirectoryBrowserOptions
@@ -190,7 +190,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task PostDirectory_PassesThrough(string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(
app => app.UseDirectoryBrowser(new DirectoryBrowserOptions
@@ -226,7 +226,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task HeadDirectory_HeadersButNotBodyServed(string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(
app => app.UseDirectoryBrowser(new DirectoryBrowserOptions
diff --git a/test/Microsoft.AspNetCore.StaticFiles.Tests/Microsoft.AspNetCore.StaticFiles.Tests.csproj b/test/Microsoft.AspNetCore.StaticFiles.Tests/Microsoft.AspNetCore.StaticFiles.Tests.csproj
index f7d7201059..7e45fb823e 100644
--- a/test/Microsoft.AspNetCore.StaticFiles.Tests/Microsoft.AspNetCore.StaticFiles.Tests.csproj
+++ b/test/Microsoft.AspNetCore.StaticFiles.Tests/Microsoft.AspNetCore.StaticFiles.Tests.csproj
@@ -3,10 +3,7 @@
- netcoreapp2.0;net46
- netcoreapp2.0
- true
- true
+ netcoreapp2.0
diff --git a/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFileMiddlewareTests.cs b/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFileMiddlewareTests.cs
index 63e8016cff..e78fa7e0ec 100644
--- a/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFileMiddlewareTests.cs
+++ b/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFileMiddlewareTests.cs
@@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.StaticFiles
[Fact]
public async Task FoundFile_LastModifiedTrimsSeconds()
{
- using (var fileProvider = new PhysicalFileProvider(TestDirectory.BaseDirectory))
+ using (var fileProvider = new PhysicalFileProvider(AppContext.BaseDirectory))
{
var server = StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions
{
@@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task FoundFile_Served(string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions
{
@@ -115,7 +115,7 @@ namespace Microsoft.AspNetCore.StaticFiles
[MemberData(nameof(ExistingFiles))]
public async Task HeadFile_HeadersButNotBodyServed(string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions
{
@@ -174,7 +174,7 @@ namespace Microsoft.AspNetCore.StaticFiles
public async Task PassesThrough(string method, string baseUrl, string baseDir, string requestUrl)
{
- using (var fileProvider = new PhysicalFileProvider(Path.Combine(TestDirectory.BaseDirectory, baseDir)))
+ using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
{
var server = StaticFilesTestServer.Create(app => app.UseStaticFiles(new StaticFileOptions
{
diff --git a/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs b/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs
index af4a90373f..d4bdf06eed 100644
--- a/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs
+++ b/test/Microsoft.AspNetCore.StaticFiles.Tests/StaticFilesTestServer.cs
@@ -16,8 +16,6 @@ namespace Microsoft.AspNetCore.StaticFiles
{
public static TestServer Create(Action configureApp, Action configureServices = null)
{
- var contentRootNet46 = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
- "." : "../../../../test/Microsoft.AspNetCore.StaticFiles.Tests";
Action defaultConfigureServices = services => { };
var configuration = new ConfigurationBuilder()
.AddInMemoryCollection(new []
@@ -26,12 +24,6 @@ namespace Microsoft.AspNetCore.StaticFiles
})
.Build();
var builder = new WebHostBuilder()
-#if NET46
- .UseContentRoot(contentRootNet46)
-#elif NETCOREAPP2_0
-#else
-#error the target framework needs to be updated.
-#endif
.UseConfiguration(configuration)
.Configure(configureApp)
.ConfigureServices(configureServices ?? defaultConfigureServices);
diff --git a/test/shared/TestBaseDir.cs b/test/shared/TestBaseDir.cs
deleted file mode 100644
index 1864d23658..0000000000
--- a/test/shared/TestBaseDir.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-
-namespace Microsoft.AspNetCore.StaticFiles
-{
- public static class TestDirectory
- {
- public static readonly string BaseDirectory
-#if NET46
- = AppDomain.CurrentDomain.BaseDirectory;
-#else
- = AppContext.BaseDirectory;
-#endif
- }
-}
\ No newline at end of file