通过NuGet获取的MVVM Light-找不到Command.cs [英] MVVM Light obtained via NuGet - RelayCommand.cs not found

查看:132
本文介绍了通过NuGet获取的MVVM Light-找不到Command.cs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序通过NuGet合并了MVVM Light.直到大约5分钟前,它仍然可以正常运行,但是现在我收到一条错误消息,提示未找到RelayCommand.cs".由于我是从NuGet获得软件包的,所以我本身没有RelayCommand.cs,只有dll.我尝试卸载并重新安装MVVM Light,问题仍然存在.现在我真的很茫然.如果有人可以帮助我解决此问题,以便我继续工作,我将不胜感激.

My program incorporates a copy of MVVM Light via NuGet. Up until about 5 minutes ago it worked without a hitch, but now I'm getting an error saying "RelayCommand.cs not found". Since I got the package from NuGet, I don't have RelayCommand.cs itself, just the dll. I have tried uninstalling and reinstalling MVVM Light and the problem persists. Right now I really am at a loss. If anybody could help me fix this so that I can continue working I would greatly appreciate it.

Locating source for 'd:\GalaSoft\mydotnet\MvvmLight\Source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (NET35)\Command\RelayCommand.cs'. Checksum: MD5 {9c e1 3c 59 78 15 34 23 2b e 9b 39 ef 5d eb d0}
The file 'd:\GalaSoft\mydotnet\MvvmLight\Source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (NET35)\Command\RelayCommand.cs' does not exist.
Looking in script documents for 'd:\GalaSoft\mydotnet\MvvmLight\Source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (NET35)\Command\RelayCommand.cs'...
Looking in the projects for 'd:\GalaSoft\mydotnet\MvvmLight\Source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (NET35)\Command\RelayCommand.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\vccorlib\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc\include'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: d:\GalaSoft\mydotnet\MvvmLight\Source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (NET35)\Command\RelayCommand.cs.
The debugger could not locate the source file 'd:\GalaSoft\mydotnet\MvvmLight\Source\GalaSoft.MvvmLight\GalaSoft.MvvmLight (NET35)\Command\RelayCommand.cs'.

更新:目前,我认为这是VS的问题.我手动下载了dll文件并引用了它们,但仍然遇到相同的错误.我认为制作一个新项目并迁移我的数据可能只是值得的.但是,如果有人对如何解决此问题有任何想法,我会很高兴.

Update: At this point I'm thinking that this is a problem with VS. I downloaded the dll files manually and referenced them and I'm still getting the same error. I'm thinking it might just be worth it to make a new project and migrate my data. If anybody has any ideas on how to fix this, though, I'm all ears.

更新:我不知道这可能是问题所在,但似乎该程序正在寻找MvvmLight(NET35).我获得的(直到现在可以使用的)版本是WPF45.

Update: I don't know if this could be the issue, but it appears that the program is looking for MvvmLight (NET35). The version I obtained (and had working up until now) is WPF45.

更新:在解决方案中打开packages.config时,出现警告,提示未声明'packages'元素."这可能相关吗?

Update: When I open packages.config in my solution, I get a warning that says "The 'packages' element is not declared." Could this be relevant?

推荐答案

使用Galasoft遇到了同样的问题,并找到了您的帖子. -最终我弄清楚了,或者至少不再弹出错误:

Got just the same Problem with Galasoft and found your post. - Finally I figured it out, or at least the error no longer pops up:

转到Tools-Options...-Debugging-General并勾选Enable Just My Code,错误消失.我假设MVVM-Light是在调试模式"下编译的,现在Visual Studio查找MvvmLight pdb和cs文件,当通过nuget安装这些文件时当然不存在.

Go to Tools-Options...-Debugging-General and tick Enable Just My Code and the error disappeared. I assume MVVM-Light is compiled in Debug Mode and now Visual Studio Looks for the MvvmLight pdb and cs file which are of course not there when installed via nuget.

这篇关于通过NuGet获取的MVVM Light-找不到Command.cs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆