Skip to main content

Multiplattform

Projektdatei ändern:

    <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFrameworks>net6.0;net472</TargetFrameworks>
        <LangVersion>10.0</LangVersion>
        <ImplicitUsings>false</ImplicitUsings>
        <Nullable>enable</Nullable>
    </PropertyGroup>

    <ItemGroup Condition="'$(TargetFramework)' == 'net48'">
        <Reference Include="System.Net.Http" />
    </ItemGroup>

Datei hinzufügen

- im Rootverzeichnis GloblaUsings.cs
global using System;
global using System.Net;
global using System.Collections.Generic;
global using System.IO;
global using System.Linq;