You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Builds against target framework net35/net40 fail with the VS16.5 update -- Cannot read or write file Fsharp.Core.dll #8739
Builds of F# projects against target framework net35 fail with the VS16.5 update. This happens with both old-style long-form projects or the new lightweight ones.
Repro steps
The simplest repro is
dotnet new classlib -lang F#
edit project as follows to target .Net Framework 3.5
"C:\Users\steve\Documents\scratch\scratch.fsproj" (default target) (1) ->
(CoreCompile target) ->
FSC : error FS0229: Error opening binary file 'C:\Users\steve\.nuget\packages\fsharp.core\3.0.2\lib\net35\FSharp.Core .dll': Cannot read or write file [C:\Users\steve\Documents\sscratch\scratch.fsproj]
FSC : error FS3160: Problem reading assembly 'C:\Users\steve\.nuget\packages\fsharp.core\3.0.2\lib\net35\FSharp.Core. dll': The exception has been reported. This internal exception should now be caught at an error recovery point on the stack. Original message: Error opening binary file 'C:\Users\steve\.nuget\packages\fsharp.core\3.0.2\lib\net35\FSharp.Co re.dll': Cannot read or write file) [C:\Users\steve\Documents\scratch\scratch.fsproj]
error FS0073 : internal error : BuildFrameworkTcImports: no successful import of C:\Users\steve\.nuget\packages\fshar p.core\3.0.2\lib\net35\FSharp.Core.dll [C:\Users\steve\Documents\scratch\scratch.fsproj]
changed the title [-]Builds against target framework net35 fail with the VS16.5 update -- Cannot read or write file FsharpCore.dll[/-][+]Builds against target framework net35 fail with the VS16.5 update -- Cannot read or write file Fsharp.Core.dll[/+]on Mar 18, 2020
changed the title [-]Builds against target framework net35 fail with the VS16.5 update -- Cannot read or write file Fsharp.Core.dll[/-][+]Builds against target framework net35/net40 fail with the VS16.5 update -- Cannot read or write file Fsharp.Core.dll[/+]on Mar 18, 2020
Just to update folks on this - the fix is already deployed in master and will be released in the VS 16.6 release. We're currently going through the process of getting a backport of that fix into a servicing release of 16.5. If any folks here who were affects (@SteveGilham@inosik@macdonald-keith-vmware) have time to verify if it works/fails on the 16.6 preview, that would be appreciated.
Just to set expectations, servicing a release carries a high bar. The more servicing fixes we take, the higher the risk of accidentally breaking something else in an otherwise stable release. We're currently going through the approval process and we'll report back on the outcome of that.
Thanks @SteveGilham, looks very simple. VS2019 crashes a lot less for me than VS2017 so this is really valuable thing. @cartermp really good news about the service release.
@Tener sorry to hear about crashes. Would you mind filing an issue so we can look into it? We've been addressing various VS perf problems for a while now, but we'd love to see what we can do to help more. We've got some more coming down the pipeline, too, but only a few test cases we've been using to test it out with.
Also happy to chat over email (phcart at microsoft dot com) if it involves more sensitive info about the codebase. I'm subject to an NDA when communicating over email. We've done a few engagements with folks before including looking directly at build logs and helping with suggestions that can make their lives a lot better while fixes are being developed.
@cartermp I was thinking about filing an issue but first wanted to check how things are with the latest fixes. Happy to share more details over email, I'll reach out soon. I was able to apply workaround from @SteveGilham - the projects now compile - but it looks like Intellisense is still disabled (no type information, go to definition does not work etc.). I assumed this was caused by the same underlying problem but now I'm not completely sure. I'll see if I can install the preview to test this.
@Tener thanks for reaching out over mail. re: the workaround - this does allow for compilation, but that package does indeed disable intellisense since it's not using the actual compiler/language service that VS ships with. So it's a quick workaround in the short term but not something to use beyond unblocking compilation.
Sorry for an additional delay here, folks. The chain of insertions has made this risky to get in for the 16.5.2 patch:
F# compiler and tools --> VS
F# coreclr compiler --> .NET SDK --> new SDK servicing release --> VS
The latter is too risky to do for the 16.5.2 release since the SDK patch for 16.5.2 has already been inserted and can't rev yet. So we're bouncing this out to the 16.5.3 patch which will be April 7th or so. Until then, VS preview does have the fix and should be stable enough for regular use.
Activity
[-]Builds against target framework net35 fail with the VS16.5 update -- Cannot read or write file FsharpCore.dll[/-][+]Builds against target framework net35 fail with the VS16.5 update -- Cannot read or write file Fsharp.Core.dll[/+][-]Builds against target framework net35 fail with the VS16.5 update -- Cannot read or write file Fsharp.Core.dll[/-][+]Builds against target framework net35/net40 fail with the VS16.5 update -- Cannot read or write file Fsharp.Core.dll[/+]SteveGilham commentedon Mar 18, 2020
Also failing in similar style
net35and fsharp.core 4.1.18net40and 4.1.18and
net4xand 3.0.2SteveGilham commentedon Mar 18, 2020
Using
Microsoft.NETFramework.ReferenceAssemblies.net20, the issue can be reproduced in a puredotnet buildcontextTIHan commentedon Mar 18, 2020
Thank you for reporting this. This looks to be a regression and will make this the highest priority.
inosik commentedon Mar 19, 2020
Same with FSharp.Core 4.0.0.1.
macdonald-keith-vmware commentedon Mar 23, 2020
and same with FSharp.Core.4.0.0.0
but I'm sure you knew that... :)
cartermp commentedon Mar 23, 2020
Just to update folks on this - the fix is already deployed in master and will be released in the VS 16.6 release. We're currently going through the process of getting a backport of that fix into a servicing release of 16.5. If any folks here who were affects (@SteveGilham @inosik @macdonald-keith-vmware) have time to verify if it works/fails on the 16.6 preview, that would be appreciated.
Just to set expectations, servicing a release carries a high bar. The more servicing fixes we take, the higher the risk of accidentally breaking something else in an otherwise stable release. We're currently going through the approval process and we'll report back on the outcome of that.
SteveGilham commentedon Mar 24, 2020
I've installed VS2019 16.6 preview 1.0 and reset my work to the point where I spotted the issue.
Tener commentedon Mar 24, 2020
Is there a workaround that can be applied to make it work with v16.5 so that one can avoid having to install v16.6 preview 1.0?
3 remaining items
Tener commentedon Mar 24, 2020
Thanks @SteveGilham, looks very simple. VS2019 crashes a lot less for me than VS2017 so this is really valuable thing.
@cartermp really good news about the service release.
cartermp commentedon Mar 24, 2020
@Tener sorry to hear about crashes. Would you mind filing an issue so we can look into it? We've been addressing various VS perf problems for a while now, but we'd love to see what we can do to help more. We've got some more coming down the pipeline, too, but only a few test cases we've been using to test it out with.
Also happy to chat over email (phcart at microsoft dot com) if it involves more sensitive info about the codebase. I'm subject to an NDA when communicating over email. We've done a few engagements with folks before including looking directly at build logs and helping with suggestions that can make their lives a lot better while fixes are being developed.
Tener commentedon Mar 25, 2020
@cartermp I was thinking about filing an issue but first wanted to check how things are with the latest fixes. Happy to share more details over email, I'll reach out soon. I was able to apply workaround from @SteveGilham - the projects now compile - but it looks like Intellisense is still disabled (no type information, go to definition does not work etc.). I assumed this was caused by the same underlying problem but now I'm not completely sure. I'll see if I can install the preview to test this.
cartermp commentedon Mar 25, 2020
@Tener thanks for reaching out over mail. re: the workaround - this does allow for compilation, but that package does indeed disable intellisense since it's not using the actual compiler/language service that VS ships with. So it's a quick workaround in the short term but not something to use beyond unblocking compilation.
cartermp commentedon Mar 26, 2020
Sorry for an additional delay here, folks. The chain of insertions has made this risky to get in for the 16.5.2 patch:
The latter is too risky to do for the 16.5.2 release since the SDK patch for 16.5.2 has already been inserted and can't rev yet. So we're bouncing this out to the 16.5.3 patch which will be April 7th or so. Until then, VS preview does have the fix and should be stable enough for regular use.
Happypig375 commentedon Mar 26, 2020
March 7th is nearly one year later though
cartermp commentedon Mar 26, 2020
thanks
SteveGilham commentedon Apr 8, 2020
Confirming that SDK 3.1.201 and VS 16.5.3 are good.
cartermp commentedon Apr 8, 2020
Thanks @SteveGilham
inosik commentedon Apr 27, 2020
Still getting this error with SDK 3.1.201 when trying to build Hedgehog.
cartermp commentedon Apr 27, 2020
@inosik It'll be in the next rev of the SDK. The last build available that isn't a preview is from March 24th.
inosik commentedon Apr 28, 2020
OK, I thought 3.1.201 was already patched.
0x53A commentedon May 8, 2020
Do you have a timeline for the next SDK 3.1.x release?
cartermp commentedon May 8, 2020
Nope, no timeline. It should be aligned with the VS 16.6 release though
inosik commentedon May 13, 2020
SDK 3.1.202 seems to be fixed.