Can't Load Assembly (.DLL) that's visible

2019-07-12 02:45发布

As shown in the screenshot, VS 2010 is failing to load my OAuth reference despite the fact that it is RIGHT THERE in my References folder. What am I doing wrong? I have already restarted VS 2010.

enter image description here

Thanks for your help.

2条回答
疯言疯语
2楼-- · 2019-07-12 03:29

An assembly (the DLL) does not necessarily need to use the same names for namespaces as the DLL name. This means that your assembly (EvernoteOAuthNet.dll) may use a completely different namespace structure, ie: Evernote.OAuth. You can double-click on the assembly in References to view it in the Object Browser, and inspect what types it contains, including their namespaces. This may help you pick the right namespace for your using .

查看更多
一纸荒年 Trace。
3楼-- · 2019-07-12 03:30

The problem was VS 2010 was deleting the assembly every time I would try to build. I found the solution:

You need to change your target framework from ".NET Framework 4 Client Profile" to ".NET Framework 4"

Ref. http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1537c41b-52b9-4e47-91b2-2e38b8fdfbfa/

查看更多
登录 后发表回答