-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the Elskom.Sdk .NET SDK to runtime repo.
Signed-off-by: AraHaan <[email protected]>
- Loading branch information
Showing
9 changed files
with
163 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ website/ | |
|
||
# exclude security scanning results. | ||
results.sarif | ||
Elskom.Sdk/Sdk.props |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project> | ||
|
||
<ItemGroup> | ||
<!-- .NET 9.0 --> | ||
<KnownFrameworkReference Include="Elskom.Sdk.App" TargetFramework="net9.0" RuntimeFrameworkName="Elskom.Sdk.App" DefaultRuntimeFrameworkVersion="$(ElskomSdkFrameworkVersion)" LatestRuntimeFrameworkVersion="$(ElskomSdkFrameworkVersion)" TargetingPackName="Elskom.Sdk.App.Ref" TargetingPackVersion="$(ElskomSdkFrameworkVersion)" RuntimePackNamePatterns="Elskom.Sdk.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x86;win-x64;win-arm64;linux-x64;linux-arm;linux-arm64;osx-x64;osx-arm64" IsTrimmable="true" /> | ||
<!-- .NET 8.0 --> | ||
<KnownFrameworkReference Include="Elskom.Sdk.App" TargetFramework="net8.0" RuntimeFrameworkName="Elskom.Sdk.App" DefaultRuntimeFrameworkVersion="$(ElskomSdkFrameworkVersion)" LatestRuntimeFrameworkVersion="$(ElskomSdkFrameworkVersion)" TargetingPackName="Elskom.Sdk.App.Ref" TargetingPackVersion="$(ElskomSdkFrameworkVersion)" RuntimePackNamePatterns="Elskom.Sdk.App.Runtime.**RID**" RuntimePackRuntimeIdentifiers="win-x86;win-x64;win-arm64;linux-x64;linux-arm;linux-arm64;osx-x64;osx-arm64" IsTrimmable="true" /> | ||
<FrameworkReference Include="Elskom.Sdk.App" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" Condition="'$(ElskomSdkDisableImplicitFrameworkReference)' != 'true'" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<Project Sdk="Microsoft.Build.NoTargets" InitialTargets="WriteSdkPropsFile"> | ||
|
||
<PropertyGroup> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<NoPackageAnalysis>true</NoPackageAnalysis> | ||
<PackageTags>GitBuildInformation;SettingsFile;zlib;BlowFish;Unluac;ZipAssembly;ReleasePackaging;MessageManager;GenericPluginLoader;MiniDump;PluginFramework;PluginUpdateCheck;GitBuildInfo</PackageTags> | ||
<Description>Elskom SDK for development of Els_kom plugins and for Els_kom itself. Also contains libs that can be used for other projects as well.</Description> | ||
<PackageReleaseNotes>Fixed issue where SDK might not add a known framework reference for projects that target the .NET 7 runtime.</PackageReleaseNotes> | ||
<NoWarn>$(NoWarn);NU1507</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="*.in" /> | ||
<!-- If Sdk.props file exists, update it. --> | ||
<!-- <None Update="Sdk.props" Pack="true" PackagePath="Sdk" Condition="Exists('Sdk.props')" /> --> | ||
<None Include="Sdk.targets" Pack="true" PackagePath="Sdk" /> | ||
<None Include="Elskom.Sdk.DefaultItems.targets" Pack="true" PackagePath="Sdk" /> | ||
<None Include="../els_kom.png" Pack="true" PackagePath="Icon.png" Visible="false" /> | ||
</ItemGroup> | ||
|
||
<Target Name="WriteSdkPropsFile"> | ||
<WriteLinesToFile | ||
File="Sdk.props" | ||
Lines="$([System.IO.File]::ReadAllText('Sdk.props.in').Replace('@SDK_VERSION@',$(Version)))" | ||
Overwrite="true" | ||
Encoding="Unicode" | ||
WriteOnlyWhenDifferent="true" /> | ||
|
||
<ItemGroup> | ||
<None Include="Sdk.props" Pack="true" PackagePath="Sdk" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<Project> | ||
|
||
<PropertyGroup Condition="'$(UsingMicrosoftNETSdk)' == ''"> | ||
<ElskomSdkMicrosoftNETSdkImported>true</ElskomSdkMicrosoftNETSdkImported> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" Condition="'$(UsingMicrosoftNETSdk)' == ''" /> | ||
|
||
<PropertyGroup> | ||
<LangVersion>preview</LangVersion> | ||
<EnforceCodeStyleInBuild Condition="'$(ProduceOnlyReferenceAssembly)' == ''">true</EnforceCodeStyleInBuild> | ||
<EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
<AnalysisLevel>preview</AnalysisLevel> | ||
<AnalysisMode>AllEnabledByDefault</AnalysisMode> | ||
<!-- | ||
When DisableImplicitFrameworkReferences is true and ElskomSdkDisableImplicitFrameworkReference | ||
is not set, then set it to true by default. | ||
--> | ||
<ElskomSdkDisableImplicitFrameworkReference Condition="'$(DisableImplicitFrameworkReferences)' == 'true' AND '$(ElskomSdkDisableImplicitFrameworkReference)' == ''">true</ElskomSdkDisableImplicitFrameworkReference> | ||
<ElskomSdkFrameworkVersion Condition="'$(ElskomSdkFrameworkVersion)' == ''">@SDK_VERSION@</ElskomSdkFrameworkVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(ElskomSdkSkipImplicitPackages)' == ''"> | ||
<!-- Only add these analyzers when installed as an Sdk package from nuget. --> | ||
<PackageReference | ||
Include="SonarAnalyzer.CSharp" | ||
IsImplicitlyDefined="true" | ||
Version="*-*"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference | ||
Include="StyleCop.Analyzers" | ||
IsImplicitlyDefined="true" | ||
Version="*-*"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference | ||
Include="IDisposableAnalyzers" | ||
IsImplicitlyDefined="true" | ||
Version="*-*"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<!-- | ||
<PackageReference | ||
Include="ReflectionAnalyzers" | ||
IsImplicitlyDefined="true" | ||
Version="*-*" | ||
Condition="'$(ProduceOnlyReferenceAssembly)' == ''"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> --> | ||
<!-- | ||
Generate code for resx files. | ||
But not for code that targets WindowsDesktop as that needs a source generator | ||
that supports binary resources in resx files. | ||
--> | ||
<PackageReference | ||
Include="Microsoft.CodeAnalysis.ResxSourceGenerator" | ||
IsImplicitlyDefined="true" | ||
Version="*-*" | ||
Condition="'$(ProduceOnlyReferenceAssembly)' == '' AND '$(UseWPF)' != 'true' AND '$(UseWindowsForms)' != 'true'"> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<!-- | ||
For WindowsDesktop targeting applications, we need to use a special source generator that supports binary resource | ||
files that are a part of the resx file. | ||
--> | ||
<PackageReference | ||
Include="Meziantou.Framework.ResxSourceGenerator" | ||
IsImplicitlyDefined="true" | ||
Version="*-*" | ||
Condition="'$(ProduceOnlyReferenceAssembly)' == '' AND ('$(UseWPF)' == 'true' OR '$(UseWindowsForms)' == 'true')"> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<!-- Implicitly include Properties/Resources.resx file for source generation. --> | ||
<AdditionalFiles | ||
Include="Properties\Resources.resx" | ||
Condition="Exists('Properties\Resources.resx')" /> | ||
<!-- Update implicitly included Properties/Resources.resx file for source generation when it exists inside of a WindowsDesktop application. --> | ||
<AdditionalFiles | ||
Update="Properties\Resources.resx" | ||
Condition="Exists('Properties\Resources.resx') AND ('$(UseWPF)' == 'true' OR '$(UseWindowsForms)' == 'true')" | ||
Namespace="$(RootNamespace).Properties" | ||
ClassName="Resources" /> | ||
<!-- We need the source generator we created. --> | ||
<PackageReference | ||
Include="GitBuildInfo.SourceGenerator" | ||
IsImplicitlyDefined="true" | ||
Version="*-*" | ||
Condition="'$(ProduceOnlyReferenceAssembly)' == ''"> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project> | ||
|
||
<Import Project="Elskom.Sdk.DefaultItems.targets" /> | ||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" Condition="'$(ElskomSdkMicrosoftNETSdkImported)' == 'true'" /> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters