dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.87k stars 781 forks source link

Problem reading assembly '..\Debug\net40\bin\FSharp.ProjectSystem.FSharp.dll' #3545

Closed vasily-kirichenko closed 6 years ago

vasily-kirichenko commented 7 years ago
Error   FS3160  Problem reading assembly 'E:\github\visualfsharp\Debug\net40\bin\FSharp.ProjectSystem.FSharp.dll': Build was not evaluated, expected the results to be ready after 'Eval' (GetCheckResultsAndImplementationsForProject, data = ("FinalizeTypeCheck", [|Id 1070; Id 1071; Id 1072; Id 1073; Id 1074|], Id 1076,
 false, None)). VisualFSharp.Unittests  E:\github\visualfsharp\vsintegration\tests\unittests\ServiceFormatting\TestHelpers.fs   1   Active

image

dsyme commented 7 years ago

I have seen this. Do you have a reliable repro?

majocha commented 7 years ago

I can repro this on current master by referencing a library in a console app. Repro

dsyme commented 7 years ago

@majocha I tried opening Library3.sln but didn't reproduce this error.

@cartermp I've marked this as "fix now" since the above error should really never happen.

majocha commented 7 years ago

@dsyme Now I had problems myself, but I think I nailed it. It appears it happens for pre-opened files only.

Repro steps

  1. current master build VisualFSharp, in-memory references enabled.
  2. clone Repro, open solution
  3. open Program.fs
  4. close and reopen solution so the Program.fs gets auto loaded into editor

ETA: building the solution is not required, it builds fine, the error shows up when the file is pre-opened on solution load.

abelbraaksma commented 6 years ago

@majocha, @dsyme, the repro from the previous post works reliably (using current nightly, in my case, not necessarily the same as current master). And as he said, you need to have tabs open from your previous session to receive this error.

Also, rebuilding, clean etc does not remove the error. Closing/reopening the offended tab does not resolve it either. You can see it in this vid, using the above repro:

fsharp_issue_3545_odd_fs3160_error

majocha commented 6 years ago

@abelbraaksma this should be already fixed on master.

abelbraaksma commented 6 years ago

@majocha, I just did another build vs, which I believe installs this and other things into VS, but I still see the same error. Though not always, i.e. I don't get it in FSharp.sln.

dsyme commented 6 years ago

@majocha, I just did another build vs, which I believe installs this and other things into VS

@abelbraaksma No, build vs doesn't install into master. See the DEVGUIDE.md for how to install the bits after you build them

bentayloruk commented 6 years ago

This problem just happened for me too, while working on a solution with two F# libs. I get the error:

FS3160  Problem reading assembly 'C:\@build\blah\source\Blah\bin\Debug\Blah.dll': Build was not evaluated, expected the results to be ready after 'Eval' (GetCheckResultsAndImplementationsForProject, data = ("FinalizeTypeCheck", [|Id 1189; Id 1190; Id 1191; Id 1192; Id 1193|], Id 1195,
 false, None)). Blah.Properties C:\@build\blah\source\Blah.Properties\Properties.fs 1   Active

I can resolve this by closing all file windows and re-opening the solution, as per @majocha work around. I'm not sure if this is fixed or if I have the fixed version (I think I'm getting nightlies), but I've included my VS info if it's any help.

Full VS info ``` Microsoft Visual Studio Professional 2017 Version 15.4.0 VisualStudio.15.Release/15.4.0+27004.2002 Microsoft .NET Framework Version 4.6.01590 Installed Version: Professional Visual Basic 2017 00369-60000-00001-AA768 Microsoft Visual Basic 2017 Visual C# 2017 00369-60000-00001-AA768 Microsoft Visual C# 2017 Visual F# 4.1 00369-60000-00001-AA768 Microsoft Visual F# 4.1 Application Insights Tools for Visual Studio Package 8.9.00809.2 Application Insights Tools for Visual Studio ASP.NET and Web Tools 2017 15.0.30925.0 ASP.NET and Web Tools 2017 ASP.NET Core Razor Language Services 1.0 Provides languages services for ASP.NET Core Razor. ASP.NET Web Frameworks and Tools 2017 5.2.50921.0 For additional information, visit https://www.asp.net/ Azure App Service Tools v3.0.0 15.0.30915.0 Azure App Service Tools v3.0.0 Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools. GhostDoc 5.4.16325.0 GhostDoc automatically generates XML documentation comments. JavaScript Language Service 2.0 JavaScript Language Service JavaScript Project System 2.0 JavaScript Project System JetBrains ReSharper Ultimate 2017.1.2 Build 108.0.20170428.75743 JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc. Microsoft Continuous Delivery Tools for Visual Studio 0.3 Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE. Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers Node.js Tools 1.4.10918.1 Adds support for developing and debugging Node.js apps in Visual Studio NuGet Package Manager 4.4.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/. SQL Server Data Tools 15.1.61707.200 Microsoft SQL Server Data Tools TestDriven.Net 4.0-beta3 Zero friction testing for Visual Studio TypeScript 2.3.5.0 TypeScript tools for Visual Studio Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio VsVim 2.4.1.0 VsVim is a Vim emulator for Visual Studio ```
cartermp commented 6 years ago

See #3899 as well - @forki sees this on 15.5 Preview 3 with his own solution as well.

forki commented 6 years ago

with paket sln and all of my private solutions.

forki commented 6 years ago

My current assumption is is that this error is hit way more often in VS 15.5 preview 3 because there seems to be an other issue with incremental build

forki commented 6 years ago

ok https://github.com/dotnet/project-system/issues/2945 is the reason why this issue here is triggered for me all the time

forki commented 6 years ago

for the record: https://github.com/dotnet/project-system/issues/2945 and this bug here are two different things

forki commented 6 years ago

so @Pilchie showed me the workaround. Disable Fast up to date check here:

omg

BentTranberg commented 6 years ago

I've seen FS3160 once in VS 15.4.3.

cartermp commented 6 years ago

This no long reproduces.