Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added AboutAssets.txt to Maui project and changed assembly references to Oqtane 4.0.0 #2809

Merged
merged 1 commit into from
May 15, 2023
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
4 changes: 2 additions & 2 deletions Oqtane.Maui/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace Oqtane.Maui;
public static class MauiProgram
{
// the API service url
static string apiurl = "https://www.dnfprojects.com"; // for testing
//static string apiurl = "http://localhost:44357"; // for local development (Oqtane.Server must be already running for MAUI client to connect)
//static string apiurl = "https://www.dnfprojects.com"; // for testing
static string apiurl = "http://localhost:44357"; // for local development (Oqtane.Server must be already running for MAUI client to connect)

public static MauiApp CreateMauiApp()
{
Expand Down
11 changes: 9 additions & 2 deletions Oqtane.Maui/Oqtane.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,15 @@
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.5" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
<PackageReference Include="Oqtane.Client" Version="3.4.3" />
<PackageReference Include="Oqtane.Shared" Version="3.4.3" />
</ItemGroup>

<ItemGroup>
<Reference Include="Oqtane.Client">
<HintPath>..\Oqtane.Server\bin\Debug\net7.0\Oqtane.Client.dll</HintPath>
</Reference>
<Reference Include="Oqtane.Shared">
<HintPath>..\Oqtane.Server\bin\Debug\net7.0\Oqtane.Shared.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
15 changes: 15 additions & 0 deletions Oqtane.Maui/Resources/Raw/AboutAssets.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories). Deployment of the asset to your application
is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.

<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />

These files will be deployed with you package and will be accessible using Essentials:

async Task LoadMauiAsset()
{
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
using var reader = new StreamReader(stream);

var contents = reader.ReadToEnd();
}