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

Allow to run .NET6 projects with .NET 7

Open dluc opened this issue 1 year ago • 0 comments

Motivation and Context

When launching one of these SK .NET projects

  • samples/apps/copilot-chat-app/importdocument/ImportDocument
  • samples/apps/copilot-chat-app/webapi/CopilotChatWebApi
  • samples/dotnet/KernelBuilder/KernelBuilder
  • samples/dotnet/kernel-syntax-examples/KernelSyntaxExamples
  • samples/dotnet/graph-api-skills/MsGraphSkillsExample
  • samples/dotnet/openapi-skills/OpenApiSkillsExample

on a machine where only .NET 7 is installed, the runtime throws this error:

You must install or update .NET to run this application.

App: samples/dotnet/kernel-syntax-examples/bin/Debug/net6.0/KernelSyntaxExamples
Architecture: ...
Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)
.NET location: ...

The following frameworks were found:
  7.0.5 at [...]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&...

Description

Add roll-forward behavior, which is also described in the https://aka.ms/dotnet/app-launch-failed link mentioned in the error message.

Note: since using this option lets the application run on a different framework version than the one for which it was designed, it may result in unintended behavior due to changes between versions of a framework. We should keep testing all the projects on newer versions.

dluc avatar May 25 '23 03:05 dluc