Closed OnurGumus closed 4 years ago
Do you have the System.DirectoryServices.Protocols.dll in your reference assembly folder?
@Thorium yes, it is added as a nuget package. VS build and run is fine but dotnet publish fails.
Any updates on this? This is a show stopper!
I don't use dotnet publish, but it sounds to me that the database driver is depending to this dll that is not found for the path that the publish-command is looking. Maybe there is a way to 1) copy the dll manually to the correct path 2) or have some parameter to publish to force including/copying the reference dlls.
@Thorium strangely those steps don't matter. I am a bit confused.
I think we would need some support from dotnet.exe publish here, what is happening in the process different than with the normal build.
I don't see this error any more with .net core 3.1
Description
My project builds and runs fine. But when I call dotnet publish from command line the publish fails with Could not load file or assembly 'System.DirectoryServices.Protocols
Repro steps
Create any project uses sqlprovider. Then use dotnet publish
Expected behavior
publish to succeed
Actual behavior
The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Unable to load one or more of the requested types.Could not load file or assembly 'System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.Details: Could not load file or assembly 'System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified
Known workarounds
No
Related information