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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net35</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Library.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="3.0.2" />
</ItemGroup>
</Project>
- dotnet restore
- msbuild [project]
Expected behavior
Trivial compilation just works
Actual behavior
"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]
Known workarounds
Using an older compiler version
Related information
Windows 10 Home build 1909
Visual Studio 16.5
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
Expected behavior
Trivial compilation just works
Actual behavior
Known workarounds
Using an older compiler version
Related information
Windows 10 Home build 1909
Visual Studio 16.5