Skip to content

Desktop FSI #r nuget fails on preview build #9150

@KevinRansom

Description

@KevinRansom

A normal VS managed code workload VS install, fsi, fails to correctly execute #r nuget.

This fails because the .NetFramework 4.8 sdk is not installed. --- we should do a better job.

fsi --langversion:preview

Produces this output:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview>fsi --langversion:preview

Microsoft (R) F# Interactive version 10.10.0.0 for F# 4.7
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;

> #r "nuget:FSharp.Data"; let _=();;
Microsoft (R) Build Engine version 16.7.0-preview-20228-06+9571f7584 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 5/6/2020 6:08:47 PM.
Project "C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\Project.fsproj" on node 1 (Restore target(s)).
_GetAllRestoreProjectPathItems:
  Determining projects to restore...
Restore:
  Restoring packages for C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\Project.fsproj...
    CACHE https://api.nuget.org/v3-flatcontainer/fsharp.data/index.json
  Committing restore...
  Generating MSBuild file C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\obj\Project.fsproj.nuget.g.props.
  Generating MSBuild file C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\obj\Project.fsproj.nuget.g.targets.
  Writing assets file to disk. Path: C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\obj\project.assets.json
  Restored C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\Project.fsproj (in 434 ms).

  NuGet Config files used:
      C:\Users\codec\AppData\Roaming\NuGet\NuGet.Config
      C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config

  Feeds used:
      https://api.nuget.org/v3/index.json
      C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
Done Building Project "C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\Project.fsproj" (Restore target(s)).
Project "C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\Project.fsproj" on node 1 (InteractivePackageManagement target(s)).
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\Project.fsproj]
Done Building Project "C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\Project.fsproj" (InteractivePackageManagement target(s)) -- FAILED.

Build FAILED.

"C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\Project.fsproj" (InteractivePackageManagement target) (1:7) ->
(GetReferenceAssemblyPaths target) ->
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [C:\Users\codec\AppData\Local\Temp\nuget\16300--c64de8b9-9471-4870-be44-6299ba8800c7\Project.fsproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.26

Metadata

Metadata

Assignees

Labels

Area-FSIBugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions