adospace / reactorui-maui

MauiReactor is a MVU UI framework built on top of .NET MAUI
MIT License
586 stars 49 forks source link

HotReload console error #57

Closed BernhardPollerspoeck closed 1 year ago

BernhardPollerspoeck commented 1 year ago

Hi, i started testing this package. but i have a problem with the console. Here a quick screenshot of my error. I could not find more in the docs. i suspect my problem is really simple, but i cant figure it out.

image

adospace commented 1 year ago

you have to pick one platform for example dotnet-maui-reactor -f net7.0-android

BernhardPollerspoeck commented 1 year ago

Hi, 

thank you for your amazing fast response. I now tried the windows platform, but now i am facing multible errors

again i attatched afull screenshot of the log output(please advice if a text paste would be better). Is this still a mistake on my side?

adospace commented 1 year ago

yes seems you have to install the winui developer pack, have you tried to build the app in visual studio 2022 it should guide thru the installation of the workload

BernhardPollerspoeck commented 1 year ago

the app runs perfectly from vs22. also 4 other maui projects (some created in net 6 and ported, and some created in net7 are working fine. 

i am taking a look into the winui pack to install. i respond back.

stillnurs commented 1 year ago

I'm having errors in console as well. Fresh project. image

adospace commented 1 year ago

This is another case, I think you're hot reloading an Android app. The error is caused by the adb.exe program not starting correctly. A few things to check: 1) local port 45820 is already occupied 2) adb program itself is not working fine

The adb used by hot-reload should be located inside the folder: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "Android", "android-sdk", "platform-tools", "adb.exe")

stillnurs commented 1 year ago

This is another case, I think you're hot reloading an Android app. The error is caused by the adb.exe program not starting correctly. A few things to check:

  1. local port 45820 is already occupied
  2. adb program itself is not working fine

The adb used by hot-reload should be located inside the folder: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "Android", "android-sdk", "platform-tools", "adb.exe")

I found that adb.exe is in this location: C:\Android\android-sdk\platform-tools\adb.exe Hope it's correct location, since I never touched any installation settings of android related packages. Don't have ideas what to do with it now.

BernhardPollerspoeck commented 1 year ago

ive ipdated VS to the latest 17.5 Version, installed the sdk°s and still the same errors.
- the build fails with the following error:

C:\Program Files\dotnet\sdk\7.0.202\Microsoft.Common.CurrentVersion.targets(1229,5): error MSB3644: The reference assemblies for Windows,Version=v10.0.19841 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [E:\Gewerbe\Pollerspöck\smart home\source\smart.app\smart.app.csproj::TargetFramework=windows10.0.19841.0]

Unable to hot reload the application:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\Gewerbe\Pollersp”ck\smart home\source\smart.app\bin\Debug\windows10.0.19841.0\smart.app.exe'.
  at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
  at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
  at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
  at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
  at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
  at MauiReactor.HotReloadConsole.HotReloadClientFull.CompileProject(Stream stream, Stream pdbStream, CancellationToken cancellationToken) in C:\projects\reactorui-maui\src\MauiReactor.HotReloadConsole\HotReloadClientFull.cs:line 53
  at MauiReactor.HotReloadConsole.HotReloadClient.ConnectionLoop(CancellationToken cancellationToken) in C:\projects\reactorui-maui\src\MauiReactor.HotReloadConsole\HotReloadClient.cs:line 151

Is there some real solution here?

adospace commented 1 year ago

@BernhardPollerspoeck Sorry but I'm not sure what I can do to help, seems that in your scenario MsBuild fails to build your solution complaining about the SDK targeting windows10.0.19841.0 is not installed

@stillnurs adb should be correctly installed and working to make hot-reload working

rctec-at commented 1 year ago

Hi @BernhardPollerspoeck we´ve encountered the same Problems you are facing. After out initial 3 Day Tech Evaluation period, we also could not get this running on Windows. Do the mobile platforms work for you?

BernhardPollerspoeck commented 1 year ago

Hello together. i tested iOS also, but here i ran into other hot reload problems. Since so early in testing this framework ive ran into unresolveable problems, i dont think i will proceed. 
best of luck for the packages future. looks great.