-
Notifications
You must be signed in to change notification settings - Fork 831
Closed
Labels
Description
Add old FSharp.Core version reference to a fsproj and open the project in an IDE:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="3.0.2" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>There's an exception when trying to load FSharp.Core data:
System.NotSupportedException: Stream does not support writing.
at System.IO.Stream.CopyTo(Stream destination)
at FSharp.Compiler.IO.DefaultFileSystem.OpenFileForReadShim(String filePath, FSharpOption`1 useMemoryMappedFile, FSharpOption`1 shouldShadowCopy) in C:\Developer\fsharp\src\fsharp\utils\FileSystem.fs:line 522
at GetRawFSharpSignatureData@684.Invoke(Unit unitVar0) in C:\Developer\fsharp\src\fsharp\CompilerImports.fs:line 684
at FSharp.Compiler.CompilerImports.ccuRawDataAndInfos@1520.Invoke(Tuple`2 tupledArg) in C:\Developer\fsharp\src\fsharp\CompilerImports.fs:line 1521
at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in D:\a\_work\1\s\src\fsharp\FSharp.Core\local.fs:line 244
at FSharp.Compiler.CompilerImports.TcImports.PrepareToImportReferencedFSharpAssembly(CompilationThreadToken ctok, Range m, String filename, ImportedBinary dllinfo) in C:\Developer\fsharp\src\fsharp\CompilerImports.fs:line 1519
at FSharp.Compiler.CompilerImports.TryRegisterAndPrepareToImportReferencedDll@1640-2.Invoke(ProjectAssemblyDataResult contentsOpt) in C:\Developer\fsharp\src\fsharp\CompilerImports.fs:line 1678
The exception happens when trying to shadow copy the satellite F# signature data file (which used to be not included into assembly resources) but I suppose it can happed in other cases when shadow copying is involved?
cc @vzarytovskii, as it's file system related
