Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit 55718fd

Browse files
committed
Added required packages for K and fixed the build
1 parent ad31129 commit 55718fd

File tree

3 files changed

+55
-16
lines changed

3 files changed

+55
-16
lines changed

samples/StaticFileSample/project.json

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version" : "0.1-alpha-*",
2+
"version": "0.1-alpha-*",
33
"dependencies": {
44
"Microsoft.AspNet.FileSystems": "0.1-alpha-*",
55
"Microsoft.AspNet.StaticFiles": "",
@@ -8,14 +8,33 @@
88
"configurations": {
99
"net45": {
1010
"dependencies": {
11-
"Owin": "1.0",
12-
"Microsoft.Owin": "2.1.0",
13-
"Microsoft.Owin.Diagnostics": "2.1.0",
14-
"Microsoft.Owin.Hosting": "2.1.0",
15-
"Microsoft.Owin.Host.HttpListener": "2.1.0",
16-
"Microsoft.AspNet.AppBuilderSupport": "0.1-alpha-*"
17-
}
11+
"Owin": "1.0",
12+
"Microsoft.Owin": "2.1.0",
13+
"Microsoft.Owin.Diagnostics": "2.1.0",
14+
"Microsoft.Owin.Hosting": "2.1.0",
15+
"Microsoft.Owin.Host.HttpListener": "2.1.0",
16+
"Microsoft.AspNet.AppBuilderSupport": "0.1-alpha-*"
17+
}
1818
},
19-
"k10" : { }
19+
"k10": {
20+
"dependencies": {
21+
"System.Console": "4.0.0.0",
22+
"System.Collections": "4.0.0.0",
23+
"System.Diagnostics.Debug": "4.0.10.0",
24+
"System.Diagnostics.Tools": "4.0.0.0",
25+
"System.Globalization": "4.0.10.0",
26+
"System.IO": "4.0.0.0",
27+
"System.IO.FileSystem": "4.0.0.0",
28+
"System.IO.FileSystem.Primitives": "4.0.0.0",
29+
"System.Linq": "4.0.0.0",
30+
"System.Reflection": "4.0.10.0",
31+
"System.Resources.ResourceManager": "4.0.0.0",
32+
"System.Runtime": "4.0.20.0",
33+
"System.Runtime.Extensions": "4.0.10.0",
34+
"System.Runtime.InteropServices": "4.0.10.0",
35+
"System.Text.Encoding": "4.0.10.0",
36+
"System.Threading.Tasks": "4.0.0.0"
37+
}
38+
}
2039
}
2140
}

src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@ public async Task SendFileAsync(string fileName, long offset, long? length, Canc
7979
throw new ArgumentOutOfRangeException("length", length, string.Empty);
8080
}
8181

82-
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64,
8382
#if NET45
83+
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64,
8484
FileOptions.Asynchronous | FileOptions.SequentialScan);
8585
#else
86-
useAsync: true);
86+
// TODO: Bring back async when the contract gets it
87+
Stream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 1024 * 64);
8788
#endif
8889
try
8990
{
Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
11
{
22
"version": "0.1-alpha-*",
33
"dependencies": {
4-
"Microsoft.AspNet.Abstractions" : "0.1-alpha-*",
5-
"Microsoft.AspNet.HttpFeature" : "0.1-alpha-*",
6-
"Microsoft.AspNet.FileSystems" : "0.1-alpha-*"
4+
"Microsoft.AspNet.Abstractions": "0.1-alpha-*",
5+
"Microsoft.AspNet.HttpFeature": "0.1-alpha-*",
6+
"Microsoft.AspNet.FileSystems": "0.1-alpha-*"
77
},
88
"configurations": {
9-
"net45": { },
10-
"k10" : { }
9+
"net45": {},
10+
"k10": {
11+
"dependencies": {
12+
"System.Collections": "4.0.0.0",
13+
"System.Diagnostics.Debug": "4.0.10.0",
14+
"System.Diagnostics.Contracts": "4.0.0.0",
15+
"System.Diagnostics.Tools": "4.0.0.0",
16+
"System.Globalization": "4.0.10.0",
17+
"System.IO": "4.0.0.0",
18+
"System.IO.FileSystem": "4.0.0.0",
19+
"System.IO.FileSystem.Primitives": "4.0.0.0",
20+
"System.Linq": "4.0.0.0",
21+
"System.Reflection": "4.0.10.0",
22+
"System.Resources.ResourceManager": "4.0.0.0",
23+
"System.Runtime": "4.0.20.0",
24+
"System.Runtime.Extensions": "4.0.10.0",
25+
"System.Runtime.InteropServices": "4.0.10.0",
26+
"System.Text.Encoding": "4.0.10.0",
27+
"System.Threading.Tasks": "4.0.0.0"
28+
}
29+
}
1130
}
1231
}

0 commit comments

Comments
 (0)