Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/324.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 无法调用函数(FileLoadException)_C#_C# 4.0 - Fatal编程技术网

C# 无法调用函数(FileLoadException)

C# 无法调用函数(FileLoadException),c#,c#-4.0,C#,C# 4.0,我试图在屏幕上显示一个3D头像,我想应用一个默认的纹理,但它甚至不会执行这个功能。MorphUserWithTemplatememberID 我不断得到相同的错误,在调试时,它只是跳过了从该函数开始的其余代码。 “System.IO.FileLoadException”类型的首次意外异常发生在 if (!File.Exists(morphedAvatar)) { string test = MorphUserWithTemplate(memberID); // This one ...

我试图在屏幕上显示一个3D头像,我想应用一个默认的纹理,但它甚至不会执行这个功能。MorphUserWithTemplatememberID

我不断得到相同的错误,在调试时,它只是跳过了从该函数开始的其余代码。 “System.IO.FileLoadException”类型的首次意外异常发生在

if (!File.Exists(morphedAvatar))
{
    string test = MorphUserWithTemplate(memberID); // This one ...

    _ucWPF = new AvatarControl(test, memberID, Constants.AVATARSNAPSHOTTC2TYPESHOP);
    elementHostWPFStaticView.Child = _ucWPF;
    _IsFirstTimeLoaded = false;
}

异常中总是有更多信息。上面说什么?MorphUserWithTemplate做什么?什么是memberID?如果您不能将其解压缩,它肯定是一个导入的库DLL。如果您试图加载morphedAvatar,请检查条件,因为您正在检查文件是否不存在MorphedHuserTemplate是某人创建的用于向化身添加模板纹理的函数,它位于同一文件中。我有一个非常好用的演示,我复制了所有的dll并做了所有相同的引用。我看到的唯一区别是框架verion,我有4个,演示版有3.5个,这可能是问题所在吗?我检查文件是否存在,因为如果不存在,我想设置模板。