Skip to content

Commit

Permalink
Configure multiple build targets
Browse files Browse the repository at this point in the history
  • Loading branch information
cschneegans committed Jan 7, 2025
1 parent cb18f14 commit 9f7d273
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions Example.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using namespace Schneegans.Unattend;
Import-Module -Name "${env:USERPROFILE}\Downloads\UnattendGenerator.dll";
$generator = [UnattendGenerator]::new();
$config = & {
$o = [Configuration]::Default;
$o.LanguageSettings = [UnattendedLanguageSettings]::new(
$generator.Lookup[ImageLanguage]('en-US'),
[LocaleAndKeyboard]::new(
$generator.Lookup[UserLocale]('en-US'),
$generator.Lookup[KeyboardIdentifier]('00000409')
),
$null,
$null,
$generator.Lookup[GeoLocation]('244')
);
$o.Bloatwares = [System.Collections.Immutable.ImmutableList]::Create(
$generator.Lookup[Bloatware]('RemoveTeams'),
$generator.Lookup[Bloatware]('RemoveOutlook')
);
return $o;
};
$xml = [UnattendGenerator]::Serialize(
$generator.GenerateXml( $config )
);
[System.IO.File]::WriteAllBytes( "${env:TEMP}\autounattend.xml", $xml );
2 changes: 1 addition & 1 deletion UnattendGenerator.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<OutputType>Library</OutputType>
<RootNamespace>Schneegans.Unattend</RootNamespace>
Expand Down

0 comments on commit 9f7d273

Please sign in to comment.