https://github.com/havendv/linux
Linux workload and separate `net7.0-linux` TargetFramework like Tizen.NET to use Linux in single project solutions and differentiate it from `net7.0`
https://github.com/havendv/linux
dotnet linux net6 net7 net8 sdk targetframework tfm workload
Last synced: about 2 months ago
JSON representation
Linux workload and separate `net7.0-linux` TargetFramework like Tizen.NET to use Linux in single project solutions and differentiate it from `net7.0`
- Host: GitHub
- URL: https://github.com/havendv/linux
- Owner: HavenDV
- License: mit
- Created: 2023-10-02T19:55:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-02T22:16:54.000Z (over 1 year ago)
- Last Synced: 2025-03-19T20:07:09.074Z (2 months ago)
- Topics: dotnet, linux, net6, net7, net8, sdk, targetframework, tfm, workload
- Language: PowerShell
- Homepage:
- Size: 165 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Linux
[](https://github.com/HavenDV/Linux/actions/workflows/dotnet.yml)
[](https://github.com/HavenDV/Linux/blob/main/LICENSE.txt)
[](https://discord.gg/Ca2xhfBf3v)Linux is separate TPM for developing Linux applications within a single project, if there are other TargetFrameworks using the main `net7.0` TPM.
## Usage
Just install and add `net7.0-linux` to `TargetFrameworks`.## Install
You can install Linux workload for .NET 6.0/7.0/8.0 by using the installer script.
- On Linux / macOS:
```
curl -sSL https://raw.githubusercontent.com/HavenDV/Linux/main/scripts/workload-install.sh | sudo bash
```
if you want to install a specific version of Linux workload or install to a specific directory, use the following command:
```
curl -sSL https://raw.githubusercontent.com/HavenDV/Linux/main/workload/scripts/workload-install.sh | bash /dev/stdin -v -d
```
- On Windows:
```
Invoke-WebRequest 'https://raw.githubusercontent.com/HavenDV/Linux/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1';
./workload-install.ps1 [-v ] [-d ]
```
You can see the Linux workload as follows if it is properly installed.
```
PS D:\workspace> dotnet workload listThis command lists only workloads that were installed via `dotnet workload install` in this version of the SDK and not those that were installed via Visual Studio.
Installed Workload Ids
----------------------
maui
linuxUse `dotnet workload search` to find additional workloads to install.
Updates are avaliable for the following workload(s): maui linux. Run `dotnet workload update` to get the latest
```## Development
You can test this project using these commands(tested on macOS) in `src/tasks/tasks` folder:
```
dotnet build /t:TestWorkload
dotnet build /t:WorkloadUninstallother possible targets(it already included in targets above):
DownloadDotnetInstall
DotnetInstall
WorkloadInstall
BuildPackages
CleanArtifactsAndTemporaryFilesYou can override these properties:
/p:UseCurrentDotnet=true - Will install workload to current dotnet instead downloaded.
```### Disclaimer
Although this is a working solution, I have simplified some things regarding workload and manifest,
which could theoretically cause problems (for example, when upgrading to a new sdk version).
I'll be glad to hear about it in issues.### Docs
Official documentation regarding the design of Workloads and Sdks:
- https://github.com/dotnet/sdk/tree/main/documentation/general/workloads
- https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workloads.md
- https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-resolvers.md
- https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-manifest.md
- https://github.com/dotnet/designs/blob/main/accepted/2021/workloads/workload-installation.md
- MAUI Workload - https://github.com/dotnet/maui/tree/main/src/Workload
- Tizen Workload - https://github.com/Samsung/Tizen.NET/tree/main/workload### Support
Priority place for bugs: https://github.com/HavenDV/Linux/issues
Priority place for ideas and general questions: https://github.com/HavenDV/Linux/discussions
Discord: https://discord.gg/g8u2t9dKgE