Skip to content

Question: running tests on .NET 5 #10576

Closed

Description

I'm trying to run FSharp.Compiler.Service.Tests on .NET 5, I thought all I'd need is this

    netcoreapp3.1;net5.0

However this fails with the usual kind of weirdness we all expect from MSBuild, with rubbish about .NET Framework

Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB3644	The reference assemblies for .NETFramework,Version=v5.0 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	FSharp.Compiler.Service.Tests	E:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets	1186	

I think this is because our global.json is pinning us to .NET SDK 3.1.302 and this toolchain doesn't know about .NET 5.

  "sdk": {
    "version": "3.1.302",
    "rollForward": "minor"
  },

I'm concerned that we've got no in-repo coverage of running our tests. Also some tests like those for GetProjectOptionsFromScript and anything to do with F# Interactive are fundamentally sensitive to the .NET SDK we are connecting to to find default reference for F# scripts.

This is related to #10575, where I was trying to add net5.0 testing for FSHarp.Compiler.Service.Tests.fsproj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions