全新安装 Visual Studio 2017 后,项目抛出 System.IO.FileNotFoundException

After fresh install of Visual Studio 2017, project throws System.IO.FileNotFoundException

我刚刚重置了我的电脑,安装了 Visual Studio 2017,并启动了一个 C# WPF 项目,该项目在我重置我的机器(在 2017 RC 中)之前可以工作,现在可以在其他机器上工作。该项目引用了一个名为 Eagle.Core 的 dll。我在 Debug 中启动它,在 Eagle.Core:

中调用扩展方法 (ObservableCollection.ObservableWhere([lamda])) 时得到了 System.IO.FileNotFoundException

System.IO.FileNotFoundException occurred HResult=0x80070002 Message=Could not load file or assembly 'System.Reactive.Linq, Version=3.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263' or one of its dependencies. The system cannot find the file specified. Source=Eagle.Core StackTrace: at Eagle.Core.Utilities.PclWeakEventManager3.AddHandler(TEventSource source, TEventHandler handler, Func2 converter, Action1 add, Action1 remove) at Eagle.Core.Collections.ObservableQueriedCollection2..ctor(ICollection1 source, IEnumerable1 initItems, LambdaExpression expression) at Eagle.Core.Collections.ObservableFilteredCollection1..ctor(ICollection1 source, Expression1 filterExpression) at ObservableCollectionExtensions.ObservableWhere[T](ICollection1 source, Expression1 filterExpression) at TestWpf2017.MainWindow..ctor() in C:\Builds\Personal\Projects\TestWpf2017\TestWpf2017\MainWindow.xaml.cs:line 34

为了保险起见,我新建了一个WPF项目并引用了Eagle.Core并调用了同样的方法,果然,问题又出现了。

有什么建议吗?


更多信息


我想这与我的 Visual Studio 安装有关。我第一次安装它时遇到了一些麻烦,我已经安装了 Visual Studio 的核心(没有选择工作负载)然后修改它以添加我需要的其他东西。

出现这个问题后,我修复了Visual Studio。我希望我不必卸载并重新安装。我什至怀疑这会有所帮助。 :(

这是安装的内容(在帮助 > 关于 Microsoft Visual Studio 中找到):

Microsoft Visual Studio Enterprise 2017 Version 15.0.26228.4 D15RTWSVC Microsoft .NET Framework Version 4.6.01586

Installed Version: Enterprise

Visual Basic 2017 00369-60000-00001-AA352 Microsoft Visual Basic 2017

Visual C# 2017 00369-60000-00001-AA352 Microsoft Visual C# 2017

Visual C++ 2017 00369-60000-00001-AA352 Microsoft Visual C++ 2017

Visual F# 4.1 00369-60000-00001-AA352 Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package 8.6.00209.10 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.0.30223.0 ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2017 5.2.50127.0 For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 15.0.30209.0 Azure App Service Tools v3.0.0

Common Azure Tools 1.9 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service 2.0 JavaScript Language Service

JavaScript Project System 2.0 JavaScript Project System

JavaScript UWP Project System 2.0 JavaScript UWP Project System

KofePackagePackage Extension 1.0 KofePackagePackage Visual Studio Extension Detailed Info

Merq 1.1.13-alpha (2f64b6d) Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio Mono.Debugging.VisualStudio Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 4.0.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools 15.1.61702.140 Microsoft SQL Server Data Tools

StylerPackage Extension 1.0 StylerPackage Visual Stuido Extension Detailed Info

TFS Auto Shelve 6.0 Create a shelveset for the latest version of all pending changes, automatically. Pending changes from the local TFS workspaces will be shelved to the TFS Server every "x" number of minutes when solutions are opened.

TypeScript 2.1.5.0 TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps 15.0.26228.00 The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin 4.3.0.784 (73f58d6) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK 7.1.0.41 (9578cdc) Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 10.4.0.123 (35d1ccd) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

正如 NineBerry 在我的问题下的评论所说,在项目 nuget 中安装此 nuget 包的正确版本。org/packages/System。Reactive.Linq