When try to build my Unity 3D project on Windows Store Apps, this error occurs
System.IO.Stream' does not contain a definition for 'Close' and no extension method 'Close' accepting a first argument of type 'System.IO.Stream' could be found
How can I use Streams in Windows 8?
You get that error because there is no support for Stream.Close on Windows Store Apps.
As is stated on the .Net for Windows Store apps overview page
The subset of managed types and members was designed with a clear focus on Windows Store app development. As a result, it omits the following:
[...]
- Members that cause confusion (such as the Close method on I/O types).
You will have to replace that with a Dispose()
or by using a using
statement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With