TolikPylypchuk / SharpHook

SharpHook provides a cross-platform global keyboard and mouse hook, event simulation, and text entry simulation for .NET
https://sharphook.tolik.io
MIT License
347 stars 32 forks source link

Need help with: libuiohook.dylib.tmp cannot be renamed at the end of a build proces #117

Closed R-Go-Tools closed 1 month ago

R-Go-Tools commented 2 months ago

At the end of the build process (botnet build) the file libiohook.dylib.tmp cannot be found. But if I check the .../obj/Debug/net8.0-maccatalyst/maccatalyst-arm64/nativelibraries/Contents/MonoBundle directory the libuiohook.dylib is available. It is a Mac mini used for compiling the code and testing (a windows machine is used for development) .The Apple system info shows: Chip: Apple M2, MacOS: Sonoma 14.6.1

The errors shown are: /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: The "InstallNameTool" task failed unexpectedly. [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: System.AggregateException: One or more errors occurred. (Could not find file '/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/obj/Debug/net8.0-maccatalyst/maccatalyst-arm64/nativelibraries/Contents/MonoBundle/Platforms/MacCatalyst/libuiohook.dylib.tmp'.) [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: ---> System.IO.FileNotFoundException: Could not find file '/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/obj/Debug/net8.0-maccatalyst/maccatalyst-arm64/nativelibraries/Contents/MonoBundle/Platforms/MacCatalyst/libuiohook.dylib.tmp'. [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: File name: '/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/obj/Debug/net8.0-maccatalyst/maccatalyst-arm64/nativelibraries/Contents/MonoBundle/Platforms/MacCatalyst/libuiohook.dylib.tmp' [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at System.IO.File.Move(String sourceFileName, String destFileName, Boolean overwrite) [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at Xamarin.MacDev.Tasks.InstallNameTool.<>c__DisplayClass12_0.b__0(Task`1 v) in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/InstallNameTool.cs:line 59 [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: --- End of stack trace from previous location --- [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: --- End of inner exception stack trace --- [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at System.Threading.Tasks.Task.WaitAll(Task[] tasks) [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at Xamarin.MacDev.Tasks.InstallNameTool.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/InstallNameTool.cs:line 66 [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst] /usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk.net8.0_17.5/17.5.8020/targets/Xamarin.Shared.Sdk.targets(1600,3): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/Users/developerr-gotools/develop/R-Go-Break-New/R-Go-Tools.R-Go-Break.Gui/R-Go-Tools.R-Go-Break.Gui.csproj::TargetFramework=net8.0-maccatalyst]

TolikPylypchuk commented 2 months ago

Hi! Thanks for posting this issue! Could you please share a minimal reproducible example? I don't really have experience with Xamarin or MAUI but will try to look into it.

R-Go-Tools commented 1 month ago

Sorry for the late responce, I figured out what the issue was. I had placed the lib in my project still. I assume the lib which is needed is copied automatically when I build my project which is using the sharpjook lib.

TolikPylypchuk commented 1 month ago

Got it, no problem! Thanks for coming back with the response! And yes, SharpHook copies libuiohook to the build folder automatically.