AndyB
AndyB
CC#
Created by AndyB on 1/22/2024 in #help
Where does `.csproj` get the value for `$(MauiVersion)` and other "variables"
In .csproj there are lines like Version="$(MauiVersion)". Where is that variable or other $() variables assigned a value?
2 replies
CC#
Created by AndyB on 1/22/2024 in #help
Cleaning out Maui Template
If I'm ONLY doing Blazor and no "native" Maui controls, what can I safely delete from the Maui Blazor template? Seems like there might be quite a bit of code/files that aren't needed if I'm specifically only doing Blazor in the Maui Wrapper.
3 replies
CC#
Created by AndyB on 1/22/2024 in #help
How to compile using a new build of .NET
I had reported a bug that supposedly got recently squashed. Is there a way to test a recent build (not an official release of .NET) of .NET without building all of .NET from source (I wouldn't know how to do that anyway...) Other open source software often have nightly builds that you can download and test. How does one "test" .NET when a bug has been fixed?
42 replies
CC#
Created by AndyB on 1/11/2024 in #help
Maui-Hybrid debug on iOS device using VS Code on Mac
Does anyone know how to test a maui-blazor app in VS Code on an iOS device? I can run it in the simulator, but I want to try it on my device. I have done everything shown here: https://learn.microsoft.com/en-us/dotnet/maui/ios/device-provisioning/manual-provisioning?view=net-maui-8.0&tabs=vs but I can't find any instructions on how to do the step "Downloading Provisoning Profiles" as the instructions are for Visual Studio only. What is the "CLI" method when using VS Code?
8 replies
CC#
Created by AndyB on 12/27/2023 in #help
Resources/Raw location in Maui App
On a Maui App, the files added to Resources/Raw show up in the Resources folder within the App bundle when making a MacCatalyst app. Where do those files show up on a Windows Maui App?
2 replies
CC#
Created by AndyB on 8/15/2023 in #help
❔ Is `where` still used?
I'm looking at creating some functions to convert byte[] to Structures and back, and all examples I see are very old. They use the keyword "where" which I've never seen before. Is this still current or has it been depricated? e.g.
private static byte[] StructToBytes<T>(T data) where T : struct
{
byte[] rawData = new byte[Marshal.SizeOf(data)];
GCHandle handle = GCHandle.Alloc(rawData, GCHandleType.Pinned);
try
{
IntPtr rawDataPtr = handle.AddrOfPinnedObject();
Marshal.StructureToPtr(data, rawDataPtr, false);
}
finally
{
handle.Free();
}

return rawData;
}
private static byte[] StructToBytes<T>(T data) where T : struct
{
byte[] rawData = new byte[Marshal.SizeOf(data)];
GCHandle handle = GCHandle.Alloc(rawData, GCHandleType.Pinned);
try
{
IntPtr rawDataPtr = handle.AddrOfPinnedObject();
Marshal.StructureToPtr(data, rawDataPtr, false);
}
finally
{
handle.Free();
}

return rawData;
}
38 replies
CC#
Created by AndyB on 9/17/2022 in #help
Which workload for blazor desktop?
In VS2022, which workload(s) do I need to install to create a blazor desktop app?
4 replies
CC#
Created by AndyB on 9/14/2022 in #help
What is the commandline to install the dotnet 7 sdk on Ubuntu?
sudo apt-get install -y dotnet7 is not it...
9 replies