semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: Bug: Unable to use Semantic Kernel on .Net Framework 4.8

Open pvillads opened this issue 1 year ago • 8 comments

Describe the bug It is not possible to use the SK on .NET framework.

To Reproduce Steps to reproduce the behavior:

  1. Create a console application for .NET FW 4.8
  2. Install the Microsoft.SemanticKernel nuget package. Version 1.32 is selected.
  3. This will fail with this message Unable to find a version of 'Azure.AI.OpenAI' that is compatible with 'Microsoft.SemanticKernel.Connectors.AzureOpenAI 1.32.0 constraint: Azure.AI.OpenAI (= 2.1.0-beta.2)'.

Expected behavior This should work, so that I can build semantic kernel applications on the .NET FW. You are shipping the code as .NET standard 2.0, so this should work?

Platform

  • OS: Windows
  • IDE: Visual Studio
  • Language: C#
  • Source: Nuget version 1.32 of MicrosoftSemanticKernel

Additional context Normally I would build with .NET, not the FW, but there are important constraints that force me to use FW (must run inside Visual Studio).

pvillads avatar Dec 13 '24 02:12 pvillads

Installing the Azure.AI.OpenAI nuget prior to the semantic kernel does not fix the issue.

pvillads avatar Dec 13 '24 02:12 pvillads

@pvillads , have a look on this issue.

  • https://github.com/microsoft/semantic-kernel/issues/9755

Installing previously the Azure.AI.OpenAI should fix the problem, but make sure you are installing the pre-release (2.1.0-beta), not the GA (2.0.0).

You may also receive similar notification for other packages like in the issue above.

RogerBarret0 avatar Dec 14 '24 12:12 RogerBarret0

@pvillads I installed the following (in order) to get this to work:

  1. Microsoft.Extensions.AI.Abstractions.9.0.1-preview.1.24570.5
  2. Microsoft.Extensions.VectorData.Abstractions.9.0.0-preview.1.24523.1
  3. Azure.AI.OpenAI.2.1.0-beta.2
  4. Microsoft.SemanticKernel.1.32.0

markwallace-microsoft avatar Dec 16 '24 12:12 markwallace-microsoft

Thank you. I will give it a spin.

However, I would not like to ship anything with preview or beta versions for customers. I am hoping these issues go away as the preview and beta items transform into GA versions.

BR PV

From: Mark Wallace @.> Sent: Monday, December 16, 2024 4:15 AM To: microsoft/semantic-kernel @.> Cc: Mention @.>; Author @.>; Comment @.***> Subject: Re: [microsoft/semantic-kernel] .Net: Bug: Unable to use Semantic Kernel on .Net Framework 4.8 (Issue #9966)

@pvilladshttps://github.com/pvillads I installed the following (in order) to get this to work:

  1. Microsoft.Extensions.AI.Abstractions.9.0.1-preview.1.24570.5
  2. Microsoft.Extensions.VectorData.Abstractions.9.0.0-preview.1.24523.1
  3. Azure.AI.OpenAI.2.1.0-beta.2
  4. Microsoft.SemanticKernel.1.32.0

Reply to this email directly, view it on GitHubhttps://github.com/microsoft/semantic-kernel/issues/9966#issuecomment-2545471767 or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYNH7LQJEIMPOSPH4D2IZD2F275PBFKMF2HI4TJMJ2XIZLTSWBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVI2TEMBVGAYTIMJVHCSG4YLNMWUWQYLTL5WGCYTFNSBKK5TBNR2WLKRVGIZTIMJWGI2DOONENZQW2ZNJNBQXGX3MMFRGK3FMON2WE2TFMN2F65DZOBS2YSLTON2WKQ3PNVWWK3TUUZ2G64DJMNZZJAVEOR4XAZNKOJSXA33TNF2G64TZUV3GC3DVMWUTMMBXGI4DSMJYGWBKI5DZOBS2K2LTON2WLJLWMFWHKZNKGI3TGNZSGE3TONRVQKSHI6LQMWSWYYLCMVWKK5TBNR2WLKRVGIYDKMBRGQYTKOECUR2HS4DFUVWGCYTFNSSXMYLMOVS2UNJSGM2DCNRSGQ3TTJ3UOJUWOZ3FOKTGG4TFMF2GK. You are receiving this email because you were mentioned.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

pvillads avatar Dec 17 '24 03:12 pvillads

Did this get fixed or just closed? Folks at work just tried to integrate SK 1.39.0 into a Framework webapp to no avail. How can you advertise .NET Standard 2.0 support if people have to jump through undocumented hoops to get a working version?

adv12 avatar Feb 26 '25 21:02 adv12

Calling from .net 4.8 asp.net into .NETStandard v2.0 class library (hosting SK) gives me this error on every version of SemanticKernel back to 1.0.1

System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.SemanticKernel.Abstractions, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3' or one of its dependencies. The system cannot find the file specified.'

cdeisler avatar Mar 04 '25 21:03 cdeisler

Any update on this?

knazeri avatar Apr 11 '25 19:04 knazeri

Still no news... no workaround :-(

pino-aino avatar May 04 '25 14:05 pino-aino