Added required packages for K and fixed the build

This commit is contained in:
David Fowler 2014-03-08 03:47:38 -08:00
parent ad3112917b
commit 55718fd931
3 changed files with 55 additions and 16 deletions

View File

@ -1,5 +1,5 @@
{
"version" : "0.1-alpha-*",
"version": "0.1-alpha-*",
"dependencies": {
"Microsoft.AspNet.FileSystems": "0.1-alpha-*",
"Microsoft.AspNet.StaticFiles": "",
@ -8,14 +8,33 @@
"configurations": {
"net45": {
"dependencies": {
"Owin": "1.0",
"Microsoft.Owin": "2.1.0",
"Microsoft.Owin.Diagnostics": "2.1.0",
"Microsoft.Owin.Hosting": "2.1.0",
"Microsoft.Owin.Host.HttpListener": "2.1.0",
"Microsoft.AspNet.AppBuilderSupport": "0.1-alpha-*"
}
"Owin": "1.0",
"Microsoft.Owin": "2.1.0",
"Microsoft.Owin.Diagnostics": "2.1.0",
"Microsoft.Owin.Hosting": "2.1.0",
"Microsoft.Owin.Host.HttpListener": "2.1.0",
"Microsoft.AspNet.AppBuilderSupport": "0.1-alpha-*"
}
},
"k10" : { }
"k10": {
"dependencies": {
"System.Console": "4.0.0.0",
"System.Collections": "4.0.0.0",
"System.Diagnostics.Debug": "4.0.10.0",
"System.Diagnostics.Tools": "4.0.0.0",
"System.Globalization": "4.0.10.0",
"System.IO": "4.0.0.0",
"System.IO.FileSystem": "4.0.0.0",
"System.IO.FileSystem.Primitives": "4.0.0.0",
"System.Linq": "4.0.0.0",
"System.Reflection": "4.0.10.0",
"System.Resources.ResourceManager": "4.0.0.0",
"System.Runtime": "4.0.20.0",
"System.Runtime.Extensions": "4.0.10.0",
"System.Runtime.InteropServices": "4.0.10.0",
"System.Text.Encoding": "4.0.10.0",
"System.Threading.Tasks": "4.0.0.0"
}
}
}
}

View File

@ -79,11 +79,12 @@ namespace Microsoft.AspNet.StaticFiles
throw new ArgumentOutOfRangeException("length", length, string.Empty);
}
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64,
#if NET45
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64,
FileOptions.Asynchronous | FileOptions.SequentialScan);
#else
useAsync: true);
// TODO: Bring back async when the contract gets it
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64);
#endif
try
{

View File

@ -1,12 +1,31 @@
{
"version": "0.1-alpha-*",
"dependencies": {
"Microsoft.AspNet.Abstractions" : "0.1-alpha-*",
"Microsoft.AspNet.HttpFeature" : "0.1-alpha-*",
"Microsoft.AspNet.FileSystems" : "0.1-alpha-*"
"Microsoft.AspNet.Abstractions": "0.1-alpha-*",
"Microsoft.AspNet.HttpFeature": "0.1-alpha-*",
"Microsoft.AspNet.FileSystems": "0.1-alpha-*"
},
"configurations": {
"net45": { },
"k10" : { }
"net45": {},
"k10": {
"dependencies": {
"System.Collections": "4.0.0.0",
"System.Diagnostics.Debug": "4.0.10.0",
"System.Diagnostics.Contracts": "4.0.0.0",
"System.Diagnostics.Tools": "4.0.0.0",
"System.Globalization": "4.0.10.0",
"System.IO": "4.0.0.0",
"System.IO.FileSystem": "4.0.0.0",
"System.IO.FileSystem.Primitives": "4.0.0.0",
"System.Linq": "4.0.0.0",
"System.Reflection": "4.0.10.0",
"System.Resources.ResourceManager": "4.0.0.0",
"System.Runtime": "4.0.20.0",
"System.Runtime.Extensions": "4.0.10.0",
"System.Runtime.InteropServices": "4.0.10.0",
"System.Text.Encoding": "4.0.10.0",
"System.Threading.Tasks": "4.0.0.0"
}
}
}
}