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

Fix build for Windows #1

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
pull_request:

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Install .NET MAUI
run: dotnet workload install maui-windows
- name: Build
run: dotnet build src
1 change: 1 addition & 0 deletions src/SentenceStudio/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
using Fonts;
using SentenceStudio.Pages.Writing;
using SentenceStudio.Pages.Warmup;
using System.Reflection;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using CommunityToolkit.Maui.Media;
using SentenceStudio.Data;
using Plugin.Maui.Audio;
using AVFoundation;

namespace SentenceStudio.Pages.HowDoYouSay;

Expand Down
6 changes: 3 additions & 3 deletions src/SentenceStudio/SentenceStudio.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<!-- <TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks> -->
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>

<!-- Note for MacCatalyst:
Expand Down Expand Up @@ -156,7 +156,7 @@

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'windows'">
<PackageReference Include="Shiny.Extensions.Configuration" Version="3.3.3" />
<MauiAsset Include="appsettings.json" LogicalName="appsettings.json" />
<MauiAsset Include="appsettings.json" LogicalName="appsettings.json" Condition="Exists('appsettings.json')" />
</ItemGroup>

<ItemGroup>
Expand All @@ -166,7 +166,7 @@
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<EmbeddedResource Include="appsettings.json" />
<EmbeddedResource Include="appsettings.json" Condition="Exists('appsettings.json')" />
</ItemGroup>

<ItemGroup>
Expand Down