2 u012094400 u012094400 于 2016.05.07 10:30 提问

unity+c#发布问题 web与pc

我用c#作为脚本语言发布unity项目的时候发布pc版本没问题,但是发布web版本是出现报错
错误 35 Type System.IO.FileInfo' does not contain a definition forDelete' and no extension method Delete' of typeSystem.IO.FileInfo' could be found (are you missing a using directive or an assembly reference?) Assets/Scripts/Presenter/DianTuoManager.cs 8592 29 解决方案“UnityVS.DQTD”‎(1 个项目)
然后我仔细对比发现使用两个方法发布主要是#region 程序集 mscorlib.dll, v2.0.0.0存在差异:

web版使用的****

#region 程序集 mscorlib.dll, v2.0.0.0
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v3.5\Profile\Unity Web v3.5\mscorlib.dll
#endregion

using System;
using System.Runtime.InteropServices;
using System.Security;

namespace System.IO
{
[Serializable]
[ComVisible(true)]
[SecurityCritical]
public sealed class FileInfo : FileSystemInfo
{
public FileInfo(string fileName);

    public string DirectoryName { get; }
    public override bool Exists { get; }
    public override string Name { get; }

    public StreamWriter AppendText();
    public StreamWriter CreateText();
    public FileStream Open(FileMode mode, FileAccess access);
    public FileStream Open(FileMode mode, FileAccess access, FileShare share);
    public override string ToString();
}

}
## PC版使用的
#region 程序集 mscorlib.dll, v2.0.0.0
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v3.5\Profile\Unity Subset v3.5\mscorlib.dll
#endregion

using System;
using System.Runtime.InteropServices;

namespace System.IO
{
[Serializable]
[ComVisible(true)]
public sealed class FileInfo : FileSystemInfo
{
public FileInfo(string fileName);

    public DirectoryInfo Directory { get; }
    public string DirectoryName { get; }
    public override bool Exists { get; }
    public bool IsReadOnly { get; set; }
    public long Length { get; }
    public override string Name { get; }

    public StreamWriter AppendText();
    public FileInfo CopyTo(string destFileName);
    public FileInfo CopyTo(string destFileName, bool overwrite);
    public FileStream Create();
    public StreamWriter CreateText();
    [ComVisible(false)]
    public void Decrypt();
    public override void Delete();
    [ComVisible(false)]
    public void Encrypt();
    public void MoveTo(string destFileName);
    public FileStream Open(FileMode mode);
    public FileStream Open(FileMode mode, FileAccess access);
    public FileStream Open(FileMode mode, FileAccess access, FileShare share);
    public FileStream OpenRead();
    public StreamReader OpenText();
    public FileStream OpenWrite();
    [ComVisible(false)]
    public FileInfo Replace(string destinationFileName, string destinationBackupFileName);
    [ComVisible(false)]
    public FileInfo Replace(string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors);
    public override string ToString();
}

}

1个回答

CSDNXIAON
CSDNXIAON   2016.05.07 10:42

关于Unity发布iOS平台代码混淆问题
----------------------同志你好,我是CSDN问答机器人小N,奉组织之命为你提供参考答案,编程尚未成功,同志仍需努力!

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!