Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to run .NET6 projects with .NET 7 #1210

Merged
merged 4 commits into from May 25, 2023

Conversation

dluc
Copy link
Collaborator

@dluc dluc commented May 25, 2023

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 dluc added the PR: ready for review All feedback addressed, ready for reviews label May 25, 2023
@github-actions github-actions bot added .NET Issue or Pull requests regarding .NET code samples labels May 25, 2023
@dluc dluc requested a review from adrianwyatt May 25, 2023 03:48
@dluc dluc changed the title Allow to run .NET projects with .NET 7 Allow to run .NET6 projects with .NET 7 May 25, 2023
@hathind-ms hathind-ms removed the request for review from adrianwyatt May 25, 2023 22:15
@hathind-ms
Copy link
Contributor

@dluc - LGTM

@adrianwyatt adrianwyatt self-assigned this May 25, 2023
@adrianwyatt adrianwyatt enabled auto-merge (squash) May 25, 2023 23:20
@adrianwyatt adrianwyatt merged commit 4fb6c6e into microsoft:main May 25, 2023
16 checks passed
@dluc dluc deleted the dluc159chatfixes branch June 14, 2023 01:14
shawncal pushed a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
### 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.

Co-authored-by: Harleen Thind <39630244+hathind-ms@users.noreply.github.com>
Co-authored-by: Adrian Bonar <56417140+adrianwyatt@users.noreply.github.com>
golden-aries pushed a commit to golden-aries/semantic-kernel that referenced this pull request Oct 10, 2023
### 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.

Co-authored-by: Harleen Thind <39630244+hathind-ms@users.noreply.github.com>
Co-authored-by: Adrian Bonar <56417140+adrianwyatt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code PR: ready for review All feedback addressed, ready for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants