Open halcwb opened 4 years ago
Hi Casper,
I just published a new version v2.2 targeted at netcoreapp3.1 and updated SqlClient dependency. I think it should work, please try it out and let me know how it goes.
@Zaid-Ajaj. Thanks for your quick action!! But know I get a:
error FS0193: internal error: Could not load type 'System.Threading.CancellationToken' from assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Sounds more like a FSI issue, I don't think there is something I can do about from this repo itself
I don't think it's a FSI issue, I think it's a Zaid - paket issue ;-).
This is you're paket lock:
Microsoft.Data.SqlClient (1.1)
This you'r reference in the fsproj file:
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.0.0" />
</ItemGroup>
So, when I use paket to generate my load scripts, I get the Microsoft.Data.SqlClient version 1.1, not the new 2.0.0 version.
I have cloned your repository. And changed to paket. When I then use the generate load scripts I have to use the generated scripts for a .net framework, for example net472. Otherwise, I cannot run the script.
So, I think what DustyTables actually compiles to is a .net framework dll, not a dotnet dll and you'l not be able to use this on a purely dotnet based environment.
This is you're paket lock ... This you'r reference in the fsproj file
The project itself doesn't use Paket anymore (see there are no paket.references
file nor the project is using paket imports) so it is fully nuget based. Only the FAKE build script uses paket.
So, I think what DustyTables actually compiles to is a .net framework dll, not a dotnet dll and you'l not be able to use this on a purely dotnet based environment
Nope, the latest version is strictly targeting netstandard2.0
and netcoreapp3.1
there is no .NET Framework reference in there and the correct version of the dependency Microsoft.Data.SqlClient
(v2.0) is published to nuget as well:
Well this is quite a rabbit hole for me. I still am stuck in the fsi and raised an issue: https://github.com/dotnet/SqlClient/issues/645.
I will keep you posted, but not being able to use DustyTables in the fsi is a bit of a showstopper for me. Did you ever try, or succeed doing this?
@Zaid-Ajaj : I still am struggling getting DustyTables to run in a script file. Did you ever try that?
Hi Casper, sorry I haven't been able to debug why DustyTables isn't working in FSI, I don't think it is a library problem but will resume the investigation into the issue soon. It has been a very busy period, sorry for the delayed answers. Let's have a chat soon, I would love to hear about the latest projects you have been building and you have my number 😉
Looking at the issue you referenced, it seems that the last comment there is by someone who was able to fix the problem at hand but the fix isn't included in the library so I think we can wait until one of the maintainers implement the fix. You can also try with the dotnet 5 sdk to see if that fixes the problem, I haven't tried that yet on my machine. Last thing I can try is bump the SqlClient
dependency from 2.0
to 2.1
and see if that fixes the problem.
I will try a couple of things and keep you posted!
@Zaid-Ajaj Great, thanks. Well, I don't actually have your number (only you're Skype) ;-). But you have mine, it's in my email signature. So, please call me, there are a lot of things going on.
With regard to the problem, you're right, this is a more fundamental issue with referencing libraries in FSI. This is a common issue where you see: could not load type from assembly
. In the case of using Microsoft.Data.SqlClient, you keep getting:
System.Threading.CancellationToken' from assembly 'System.Runtime, Version=4.0.0.0,
While I do reference the newer System.Runtime:
// #r "C:\Users\
Still the old version 4.0.0.0 is used from the GAC.
Describe the bug When trying to use the library I in thet FSI I get:
When targetting netcoreapp3.1 I get:
To Reproduce Steps to reproduce the behavior:
Expected behavior Should be able to run on dotnet in the FSI
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): NA
Smartphone (please complete the following information): NA
Additional context .NET Core SDK (reflecting any global.json): Version: 3.1.301 Commit: 7feb845744
Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64 Base Path: C:\Program Files\dotnet\sdk\3.1.301\
Host (useful for support): Version: 3.1.5 Commit: 65cd789777
.NET Core SDKs installed: 2.1.701 [C:\Program Files\dotnet\sdk] 2.1.801 [C:\Program Files\dotnet\sdk] 2.2.301 [C:\Program Files\dotnet\sdk] 2.2.401 [C:\Program Files\dotnet\sdk] 3.1.100 [C:\Program Files\dotnet\sdk] 3.1.101 [C:\Program Files\dotnet\sdk] 3.1.301 [C:\Program Files\dotnet\sdk]