#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 应用商店应用程序中“关闭"的定义
基础教程推荐
- C# 9 新特性——record的相关总结 2023-04-03
- 将数据集转换为列表 2022-01-01
- 如果条件可以为空 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
