#39;System.IO.Stream#39; does not contain a definition for #39;Close#39; in Windows Store Apps(“System.IO.Stream不包含 Windows 应用商店应用程序中“关闭的定义)
问题描述
当尝试在 Windows Store Apps 上构建我的 Unity 3D 项目时,出现此错误
When try to build my Unity 3D project on Windows Store Apps, this error occurs
System.IO.Stream' 不包含Close"的定义,并且找不到接受System.IO.Stream"类型的第一个参数的扩展方法Close"
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
如何在 Windows 8 中使用 Streams?
How can I use Streams in Windows 8?
推荐答案
您收到该错误是因为 Windows 应用商店应用不支持 Stream.Close.
You get that error because there is no support for Stream.Close on Windows Store Apps.
如 .Net for Windows Store 应用概览页面
托管类型和成员子集的设计明确侧重于 Windows 应用商店应用开发.因此,它省略了以下内容:
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:
[...]
- 导致混淆的成员(例如 I/O 类型的 Close 方法).
您必须将其替换为 Dispose()
或使用 using
语句.
You will have to replace that with a Dispose()
or by using a using
statement.
这篇关于“System.IO.Stream"不包含 Windows 应用商店应用程序中“关闭"的定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“System.IO.Stream"不包含 Windows 应用商店应用程序中“关闭"的定义


基础教程推荐
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01