Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
802 views
in Technique[技术] by (71.8m points)

visual studio - MVVM Light obtained via NuGet - RelayCommand.cs not found

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:GalaSoftmydotnetMvvmLightSourceGalaSoft.MvvmLightGalaSoft.MvvmLight (NET35)CommandRelayCommand.cs'. Checksum: MD5 {9c e1 3c 59 78 15 34 23 2b e 9b 39 ef 5d eb d0}
The file 'd:GalaSoftmydotnetMvvmLightSourceGalaSoft.MvvmLightGalaSoft.MvvmLight (NET35)CommandRelayCommand.cs' does not exist.
Looking in script documents for 'd:GalaSoftmydotnetMvvmLightSourceGalaSoft.MvvmLightGalaSoft.MvvmLight (NET35)CommandRelayCommand.cs'...
Looking in the projects for 'd:GalaSoftmydotnetMvvmLightSourceGalaSoft.MvvmLightGalaSoft.MvvmLight (NET35)CommandRelayCommand.cs'.
The file was not found in a project.
Looking in directory 'C:Program Files (x86)Microsoft Visual Studio 11.0VCcrtsrc'...
Looking in directory 'C:Program Files (x86)Microsoft Visual Studio 11.0VCcrtsrcvccorlib'...
Looking in directory 'C:Program Files (x86)Microsoft Visual Studio 11.0VCatlmfcsrcmfc'...
Looking in directory 'C:Program Files (x86)Microsoft Visual Studio 11.0VCatlmfcsrcatl'...
Looking in directory 'C:Program Files (x86)Microsoft Visual Studio 11.0VCatlmfcinclude'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: d:GalaSoftmydotnetMvvmLightSourceGalaSoft.MvvmLightGalaSoft.MvvmLight (NET35)CommandRelayCommand.cs.
The debugger could not locate the source file 'd:GalaSoftmydotnetMvvmLightSourceGalaSoft.MvvmLightGalaSoft.MvvmLight (NET35)CommandRelayCommand.cs'.

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.

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.

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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:

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...