dotnet / dotnet/fsharp

project with type provider builds in VS but not with "dotnet build"

Open
#10,323 19 comments 1 reaction 0 assignees View on GitHub
Area-TypeProviders Bug Impact-Medium
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

I'm facing issue with project referencing [FSharp.Management](https://github.com/fsprojects/FSharp.Management) not building from `dotnet build`

[fsmgt.zip](https://github.com/dotnet/fsharp/files/5427070/fsmgt.zip)

When opening the same project in visual studio, it is possible to build.

**Expected behavior**

Able to build with `dotnet build`

**Actual behavior**

> FSC : warning FS3005: Referenced assembly 'C:\Users\gauthier.segay\.nuget\packages\fsharp.management\0.4.5\lib\net40\FSharp.Management.PowerShell.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found [C:\tmp\fsmgt\fsmgt.fsproj]
FSC : warning FS3005: Referenced assembly 'C:\Users\gauthier.segay\.nuget\packages\fsharp.management\0.4.5\lib\net40\FSharp.Management.WMI.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found [C:\tmp\fsmgt\fsmgt.fsproj]
FSC : error FS3049: The type provider 'C:\Users\gauthier.segay\.nuget\packages\fsharp.management\0.4.5\lib\net40\FSharp.Management.PowerShell.dll' reported an error: The type provider designer assembly 'C:\Users\gauthier.segay\.nuget\packages\fsharp.management\0.4.5\lib\net40\FSharp.Management.PowerShell.dll' could not be loaded from folder 'C:\Users\gauthier.segay\.nuget\packages\fsharp.management\0.4.5\lib\net40'. The exception reported was: System.IO.FileNotFoundException - Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified. [C:\tmp\fsmgt\fsmgt.fsproj]
FSC : error FS3049: The type provider 'C:\Users\gauthier.segay\.nuget\packages\fsharp.management\0.4.5\lib\net40\FSharp.Management.WMI.dll' reported an error: The type provider designer assembly 'FSharp.Management.WMI.DesignTime' could not be loaded from folder 'C:\Users\gauthier.segay\.nuget\packages\fsharp.management\0.4.5\lib\net40'. The exception reported was: System.IO.FileNotFoundException - Could not load file or assembly 'System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [C:\tmp\fsmgt\fsmgt.fsproj]
2 Warning(s)
2 Error(s)

**Related information**

* windows 10
* .NET sdk 5.0.100-rc.1.20452.10
* vs 2019

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.