Repository navigation
Closed
Labels
Area-Compiler-Optionscompiler option processingBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone
Description
I got this error after updating from preview 4 to preview 5.
It only happens when building inside VS, not when using dotnet build from the command line.
Build started...
1>------ Build started: Project: ebosYC.CarouselView3D.RemotingContracts, Configuration: Debug Any CPU ------
1>FSC : error FS0229: Error opening binary file 'C:\Users\Lukas\.nuget\packages\fsharp.core\4.1.18\lib\net40\FSharp.Core.dll': Stream does not support writing.
1>FSC : error FS3160: Problem reading assembly 'C:\Users\Lukas\.nuget\packages\fsharp.core\4.1.18\lib\net40\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\Lukas\.nuget\packages\fsharp.core\4.1.18\lib\net40\FSharp.Core.dll': Stream does not support writing.)
1>error FS0073 : internal error : BuildFrameworkTcImports: no successful import of C:\Users\Lukas\.nuget\packages\fsharp.core\4.1.18\lib\net40\FSharp.Core.dll
1>Done building project "ebosYC.CarouselView3D.RemotingContracts.fsproj" -- FAILED.
1>ebosYC.CarouselView3D.RemotingContracts -> C:\Projekte\ebos\ebosYCRemotingContracts\ebosYC.CarouselView.RemotingContracts\bin\Debug\net5.0\ebosYC.CarouselView3D.RemotingContracts.dll
For me this is reproducible when creating a new F# project and then pasting this project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net40</TargetFrameworks>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.18" />
<Compile Include="Program.fs" />
</ItemGroup>
</Project>I think it's related to the .net40 TFM?
Related information
Provide any related information (optional):
- Operating system: windows 10 2004 x64
- .NET Runtime kind (.NET Core, .NET Framework, Mono)
.NET SDK (reflecting any global.json):
Version: 5.0.402
Commit: e9d3381880
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.402\
Host (useful for support):
Version: 6.0.0-rc.2.21480.5
Commit: 6b11d64e7e
.NET SDKs installed:
3.1.414 [C:\Program Files\dotnet\sdk]
5.0.208 [C:\Program Files\dotnet\sdk]
5.0.303 [C:\Program Files\dotnet\sdk]
5.0.401 [C:\Program Files\dotnet\sdk]
5.0.402 [C:\Program Files\dotnet\sdk]
6.0.100-preview.7.21379.14 [C:\Program Files\dotnet\sdk]
6.0.100-rc.2.21505.57 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-preview.7.21378.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-rc.2.21480.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-preview.7.21377.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-rc.2.21480.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-preview.7.21378.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-rc.2.21501.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
- Editing Tools (e.g. Visual Studio Version, Visual Studio): VS2022 Preview 5
Reacted by Ilja Nosik
Metadata
Metadata
Assignees
Labels
Area-Compiler-Optionscompiler option processingBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Type
Projects
- StatusShow more project fieldsDone
Activity
vzarytovskii commentedon Oct 13, 2021
I'll look into it.
We were using CoreCLR compiler in preview4, and switched back to desktop one with preview5. Same reason why it's failing in VS and not with
dotnet build.vzarytovskii commentedon Oct 13, 2021
Interestingly enough, it doesn't reproduce on
net452.0x53A commentedon Oct 13, 2021
the good news is that
<FSharpPreferNetFrameworkTools>false</FSharpPreferNetFrameworkTools>works, so I'm not blocked.[-][VS2022 preview 5] "Stream does not support writing"[/-][+][VS2022] "Stream does not support writing"[/+]abelbraaksma commentedon Aug 13, 2022
@0x53A, how did you make that working? In a minimal repro, where I reference a local build
FSharp.Corefrom the latest ofmain, I keep getting the errors you mention. Changing tonet452doesn't help, nor doesnet48. It builds just fine withnetstandard2.0though.In my case, this happens both in VS 2022 and using
dotnet build...My errors are:
My project file (anything can go in
Library.fs):0x53A commentedon Aug 24, 2022
@abelbraaksma maybe it was true instead of false, I’m not sure
abelbraaksma commentedon Aug 31, 2022
Well, either way, @vzarytovskii has solved it! 🎆 .