n unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.Additional information: 未能加载文件或程序集“..
来源:互联网 发布:免费发布新闻稿软件 编辑:程序博客网 时间:2024/04/28 07:04
开发youtube项目,做了一个控制台程序来试验一些功能。代码如下
#include "stdafx.h"
#using <mscorlib.dll>
#using <C:/Program Files/Google/Google Data API SDK/Redist/Google.GData.YouTube.dll>
#using <C:/Program Files/Google/Google Data API SDK/Redist/Google.GData.Client.dll>
#using <C:/Program Files/Google/Google Data API SDK/Redist/Google.GData.Extensions.dll>
using namespace System;
using namespace Google::GData::YouTube;
using namespace Google::YouTube;
using namespace Google::GData::Client;
using namespace Google::GData::Extensions;
using namespace Google::GData::Extensions::MediaRss;
int _tmain(int argc, _TCHAR* argv[])
{
System::String^ authToken;
//YouTubeRequest^ request;
System::String^ AppKey = "NotifierYT";
System::String^ YTCLIENTID = "clientID";// "ytapi-FrankMantek-TestaccountforGD-sjgv537n-0";
System::String^ YTDEVKEY = "AI39si50H0HOXR09HlrMTqpChQAUG8dOl5pTyPMNjj5DFqtx1cYSJQsea6-nbRr9ZLQNu8aia5J3aR1UNOJVZ_qa7c1hF2UdSQ";// "AI39si4v3E6oIYiI60ndCNDqnPP5lCqO28DSvvDPnQt-Mqia5uPz2e4E-gMSBVwHXwyn_LF1tWox4LyM-0YQd2o4i_3GcXxa2Q";
System::String^ userName = "username**";
System::String^ passWord = "password**";
Google::YouTube::YouTubeRequestSettings^ settings = gcnew Google::YouTube::YouTubeRequestSettings(AppKey,
YTCLIENTID,
YTDEVKEY,
userName,
passWord);
// settings.PageSize = 15;
YouTubeRequest^ request = gcnew YouTubeRequest(settings);
try
{
YouTubeService^ service=request->Service;
authToken = service->QueryAuthenticationToken();
passWord = "";
}
catch(int)
{
Console::WriteLine("There was a problem with your credentials");
authToken = nullptr;
}
return 0;
}
编译链接都通过,按F5运行时报错,output窗口输出错误如下,
//BEGIN
First-chance exception at 0x7c812afb in ad.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7c812afb in ad.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
A first chance exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.Additional information: 未能加载文件或程序集“Google.GData.YouTube, Version=1.4.0.2, Culture=neutral, PublicKeyToken=af04a32718ae8833”或它的某一个依赖项。系统找不到指定的文件。
The thread 'Win32 Thread' (0x8e4) has exited with code 0 (0x0).The thread 'Main Thread' (0xc28) has exited with code 0 (0x0).The program '[2292] ad.exe: Managed' has exited with code 0 (0x0).The program '[2292] ad.exe: Native' has exited with code 0 (0x0).
//END
这个问题困扰了挺久,在网上搜答案,一篇文章的方法试了一下结果成果了。
将外部相关#using的dll文件copy到exe目录下,即本人将Google.GData.YouTube.dll, Google.GData.Client.dll 和 Google.GData.Extensions.dll拷贝到了exe文件所在的文件夹下,结果OK搞定。高兴啊
==================================================================
http://www.vtk.org/pipermail/vtkusers/2005-July/080896.html
=================================================================
Thank you, Peter, but that didn't work either! The answer is stillthe same:'DefaultDomain': Loaded'c:windowsmicrosoft.netframeworkv1.0.3705mscorlib.dll', No symbolsloaded.'ImagemJoinGeometry': Loaded 'C:Documents andSettingsPatríciaAmbiente detrabalhoImagemJoinGeometrybinDebugImagemJoinGeometry.exe', Symbolsloaded.An unhandled exception of type 'System.IO.FileLoadException' occurredin Unknown Module.Additional information: Unable to load file 'vtkDotNetWrap'.The program '[2692] ImagemJoinGeometry.exe' has exited with code 0(0x0).Does anybody know how to prevent this? What can I do?Thank you,Patrícia GonçalvesCitando Peter Schmitt :Just a guess, but double check that the .dll is in the same directoryas the executeable you make and/or maybe try setting your PATHvariable to point to the dll?
“‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘以下文字是重点’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘I think Visual Studio creates a project directory with nesteddebug/release directories that store the executables on compile... sowhen you run the executable it looks for dlls in its directory, notone up.
-PeteOn 7/19/05, patgo at sapo.pt wrote:>>> Hi,>> I have just installed VTK to work with C#. As supposed, I havecopied> vtkDotNetWrap.dll to the project's directory and use it as areference. The> solution builds just fine but the project doesn't run. It presentsme the> following text:>> An unhandled exception of type 'System.IO.FileNotFoundException'occurred in> Unknown Module.> Additional information: File or assembly name vtkDotNetWrap, or oneof its> dependencies, was not found.>> Does anybody know how to prevent this? What can I do?>> Thank you,> Patrícia Gonçalves> ___________________________________________________________________>> O SAPO já está livre de vírus com a Panda Software, fique vocêtambém!> Clique em: http://antivirus.sapo.pt>> _______________________________________________> This is the private VTK discussion list.> Please keep messages on-topic. Check the FAQ at:> http://www.vtk.org/Wiki/VTK_FAQ> Follow this link to subscribe/unsubscribe:> http://www.vtk.org/mailman/listinfo/vtkusers>>>--Pete
- n unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.Additional information: 未能加载文件或程序集“..
- An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module
- 解决 System.IO.FileNotFoundException: 未能加载文件或程序集
- System.IO.FileNotFoundException: 未能加载文件或程序集
- System.IO.FileNotFoundException: 未能加载文件或程序集 ,webservice 部署500错误
- 异常:System.IO.FileNotFoundException: 未能加载文件或程序集“Microsoft.mshtml
- vs 程序运行时跳出 An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in 。。 错误
- An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll
- System.IO.FileNotFoundException: 未能加载文件或程序集“CrystalDecisions.Windows.Forms, Version=10.2.3600.0, Culture=neutral, PublicKeyToken
- System.IO.FileNotFoundException: 未能加载文件或程序集“Microsoft.Office.Interop.Excel, Version=11.0.0.0, Cultur
- C# wcf 注册window服务 报System.IO.FileNotFoundException: 未能加载文件或程序集“file:///C:\Windows\system32\***
- C#--An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll in c#
- An unhandled exception of type "System.InvalidCastException" occurred
- 解决 System.IO.FileNotFoundException: 未能加载文件或程序集“Team.DLinqDAL”或它的某一个依赖项。系统找不到指定的文件。
- 【已解决】Windows Service 问题System.IO.FileNotFoundException: 未能加载文件或程序集“file:///”或它 的某一个依赖项。系统找不到指定的文件。。
- System.IO.FileNotFoundException:“未能加载文件或程序集“xxx”或它的某一个依赖项。系统找不到指定的文件。”
- 服务 在初始化安装时发生异常:System.IO.FileNotFoundException: 未能加载文件或******
- An unhandled exception of type 'System.StackOverflowException'
- 新的开始
- 豆腐园子汤
- 动画效果编程基础--AnimationAndroid
- linux中man文档的分类
- 从Empty class 看 is_Empty
- n unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.Additional information: 未能加载文件或程序集“..
- 为什么日本选择戴明,中国选择德鲁克?(詹文明)
- OfficeTeam-Excel 2007单元格内容的编辑与控制
- 德鲁克管理学家詹文明:职业经理人的五大工作
- 复元汤
- 在vb中利用api函数代替picture控件画图总结
- 行动-习惯-性格
- 动画效果二 ----Frame Animation
- Java中int与Integer的区别 详解