gpt4 book ai didi

visual-studio - 通过NuGet获取的MVVM Light-找不到Command.cs

转载 作者:行者123 更新时间:2023-12-03 10:14:11 24 4
gpt4 key购买 nike

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

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文件并引用了它们,但仍然遇到相同的错误。我认为制作一个新项目并迁移数据可能值得。但是,如果有人对如何解决此问题有任何想法,我会非常高兴。

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

更新:在解决方案中打开 packages.config时,我收到一条警告,指出“未声明'packages'元素。”这可能有意义吗?

最佳答案

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

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

关于visual-studio - 通过NuGet获取的MVVM Light-找不到Command.cs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16901736/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com