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

Change target framework from net7.0 to net472 #729

Closed
amine-aboufirass opened this issue Jun 1, 2023 · 2 comments
Closed

Change target framework from net7.0 to net472 #729

amine-aboufirass opened this issue Jun 1, 2023 · 2 comments
Labels

Comments

@amine-aboufirass
Copy link

When I run dotnet script --info here's the output I get:

Version             : 1.4.0
Install location    : C:\Users\aa\.dotnet\tools\.store\dotnet-script\1.4.0\dotnet-script\1.4.0\tools\net7.0\any
Target framework    : net7.0
.NET Core version   : 7.0.5
Platform identifier : win
Runtime identifier  : win10-x64

I would like to run my script as using net472 instead of net472 as the target framework. Is this possible?

@filipw
Copy link
Member

filipw commented Jun 5, 2023

it is not possible to run the script as net472. .NET Framework is not supported by the command line runner by design.

Dotnet.Script.Core, which is effectively the heart of donet-script is cross compiled for .NET Standard 2.0 and can be used from a .NET Framework app (or host) so it could potentially be used to manually orchestrate the script running. These tests are executed for net472 too and can provide some reference point.

@filipw filipw closed this as completed Jun 5, 2023
@filipw filipw added the wontfix label Jun 5, 2023
@amine-aboufirass
Copy link
Author

@filipw How about other versions of .NET Core? Say I wanted to run code for .NET 5 or 6?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants