Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x

- name: Restore dependencies
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x

- name: Restore dependencies
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>net10.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.1" />
<Sdk Name="Aspire.AppHost.Sdk" Version="13.0.0" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>d0c7426e-ff4f-42e0-bd7a-b3f6358f193d</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.1" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireSharedProject>true</IsAspireSharedProject>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,72 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.1" />
<Sdk Name="Aspire.AppHost.Sdk" Version="13.0.0" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<NoWarn>CS1591</NoWarn>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>d11b339a-7d36-4112-8969-2ebfad7419e0</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.1" />
<PackageReference Include="Aspire.Hosting.Docker" Version="9.5.1-preview.1.25502.11" />
<PackageReference Include="Aspire.Hosting.Python" Version="9.5.1" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.0.0" />
<PackageReference Include="Aspire.Hosting.Docker" Version="13.0.0-preview.1.25560.3" />
<PackageReference Include="Aspire.Hosting.Python" Version="13.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\LibStored.Net.Example.Console\LibStored.Net.Example.Console.csproj" />
</ItemGroup>

<!-- Example to automatically install the python venv from https://github.com/dotnet/aspire-samples/tree/main/samples/AspireWithPython -->
<!-- Properties, Items, and targets to ensure Python apps are initialized -->
<PropertyGroup>
<PythonVirtualEnvironmentName>.venv</PythonVirtualEnvironmentName>
</PropertyGroup>

<ItemGroup>
<PipRequirementsTxt Include="python\requirements.txt" />
</ItemGroup>

<Target Name="SetPipInstallSentinelFilePath">
<PropertyGroup>
<PipInstallSentinelFilePath>$(IntermediateOutputPath)piprestored.sentinel</PipInstallSentinelFilePath>
</PropertyGroup>
</Target>

<Target Name="CreatePythonVirtualEnvironments">
<PropertyGroup>
<PipRequirementsTxtDir>%(PipRequirementsTxt.RootDir)%(PipRequirementsTxt.Directory)</PipRequirementsTxtDir>
<VenvDir>$(PipRequirementsTxtDir)$(PythonVirtualEnvironmentName)/</VenvDir>
<CreateVenv Condition="!Exists('$(VenvDir)')">True</CreateVenv>
</PropertyGroup>

<Message Importance="Normal" Text="Initializing virtual environment for $(PipRequirementsTxtDir)" />

<Exec Command="python -m venv $(VenvDir)" WorkingDirectory="$(PipRequirementsTxtDir)" Condition=" '$(CreateVenv)' == 'True' " />
</Target>

<Target Name="PipInstall" AfterTargets="PrepareForBuild" DependsOnTargets="SetPipInstallSentinelFilePath;CreatePythonVirtualEnvironments" Condition=" '$(DesignTimeBuild)' != 'True' " Inputs="@(PipRequirementsTxt)" Outputs="$(PipInstallSentinelFilePath)">
<PropertyGroup>
<PipRequirementsTxtDir>%(PipRequirementsTxt.RootDir)%(PipRequirementsTxt.Directory)</PipRequirementsTxtDir>
<PipCmd Condition=" '$(OS)' == 'Windows_NT' ">pip</PipCmd>
<PipCmd Condition=" '$(OS)' != 'Windows_NT' ">python -m pip</PipCmd>
<PipInstallCmd>$(PipCmd) install -r %(PipRequirementsTxt.Filename)%(PipRequirementsTxt.Extension)</PipInstallCmd>
<RestoreCmd Condition=" '$(OS)' == 'Windows_NT' ">call $(PythonVirtualEnvironmentName)\Scripts\activate.bat &amp;&amp; $(PipInstallCmd)</RestoreCmd>
<RestoreCmd Condition=" '$(OS)' != 'Windows_NT' ">. ./$(PythonVirtualEnvironmentName)/bin/activate &amp;&amp; $(PipInstallCmd)</RestoreCmd>
</PropertyGroup>

<Message Importance="Normal" Text="Restoring packages for $(PipRequirementsTxtDir)" />

<Exec Command="$(RestoreCmd)" WorkingDirectory="$(PipRequirementsTxtDir)" />

<Touch Files="$(PipInstallSentinelFilePath)" AlwaysCreate="True" />

<ItemGroup>
<FileWrites Include="$(PipInstallSentinelFilePath)" />
</ItemGroup>
</Target>

</Project>
12 changes: 6 additions & 6 deletions examples/Sync/LibStored.Net.Example.AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-FileCopyrightText: 2025 Guus Kuiper
//
//
// SPDX-License-Identifier: MIT

// ReSharper disable SuggestVarOrType_SimpleTypes
Expand Down Expand Up @@ -37,19 +37,19 @@
.WithEndpoint(targetPort: 6666, name: "debug", env: "NETMQ_DEBUG")
;

#pragma warning disable ASPIREHOSTINGPYTHON001
var py1 = builder.AddPythonApp("libstored-gui-container", "python", "-m", ["libstored.gui"])
var py1 = builder.AddPythonModule("libstored-gui-container", "python", "libstored.gui")
.WaitFor(sync)
.WithPip()
.WithPortArgFromEndpoint(sync, "debug")
.ExcludeFromManifest()
;

var py2 = builder.AddPythonApp("libstored-gui-cs", "python", "-m", ["libstored.gui"])
var py2 = builder.AddPythonModule("libstored-gui-cs", "python", "libstored.gui")
.WaitFor(client)
.WaitFor(py1) // don't start and install at the same time
.WithPip(false)
.WithPortArgFromEndpoint(client, "debug")
.ExcludeFromManifest()
;

#pragma warning restore ASPIREHOSTINGPYTHON001

builder.Build().Run();
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />

<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.2.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="9.1.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="9.5.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/LibStored.Net.Generator/LibStored.Net.Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<!-- 👇 Source generators must target netstandard 2.0 -->
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>true</ImplicitUsings>
<LangVersion>Latest</LangVersion>
Expand Down
18 changes: 13 additions & 5 deletions src/LibStored.Net/LibStored.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<PackageIcon>libstored.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludeSystemTextJsonContentInPackage</TargetsForTfmSpecificContentInPackage>
<!-- When multiple target frameworks are used, suppress NU5118 warning -->
<NoWarn>NU5118</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -32,13 +35,18 @@
<ProjectReference Include="..\LibStored.Net.Generator\LibStored.Net.Generator.csproj"
ReferenceOutputAssembly="false"
PackAsAnalyzer="true" />

<None Include="$(PkgYamlDotNet)\lib\netstandard2.0\YamlDotNet.dll"
Pack="true"
PackagePath="analyzers/dotnet/cs"
Visible="false" />
</ItemGroup>

<!-- Copy the System.Text.Json.dll to the analyzers folder in the package -->
<Target Name="IncludeSystemTextJsonContentInPackage">
<Message Text="IncludeSystemTextJsonContentInPackage $(PkgYamlDotNet)" Importance="high"/>
<ItemGroup>
<TfmSpecificPackageFile
Include="$(PkgYamlDotNet)\lib\netstandard2.0\YamlDotNet.dll"
PackagePath="analyzers/dotnet/cs" />
</ItemGroup>
</Target>

<!-- After packing, write the version to a file in artifacts for the NugetIntegrationTests -->
<Target Name="WriteVersionFile" AfterTargets="Pack">
<WriteLinesToFile
Expand Down
Loading