diff --git a/.vscode/launch.json b/.vscode/launch.json index 2a1d2b81..2ca12ba1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceFolder}/Desktop.Linux/bin/Debug/.net7.0/Remotely_Desktop.dll", + "program": "${workspaceFolder}/Desktop.Linux/bin/Debug/.net8.0/Remotely_Desktop.dll", "args": [], "cwd": "${workspaceFolder}/Desktop.Linux", "console": "internalConsole", diff --git a/Agent/Agent.csproj b/Agent/Agent.csproj index 9aa04558..4d5b68f8 100644 --- a/Agent/Agent.csproj +++ b/Agent/Agent.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 true false Copyright © 2023 Immense Networks @@ -24,19 +24,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/Desktop.Core/Desktop.Core.csproj b/Desktop.Core/Desktop.Core.csproj index 8f3b3bf0..4281fd31 100644 --- a/Desktop.Core/Desktop.Core.csproj +++ b/Desktop.Core/Desktop.Core.csproj @@ -1,7 +1,7 @@  - .net7.0 + .net8.0 Remotely.Desktop.Core Remotely_Desktop.Core AnyCPU;x64;x86 diff --git a/Desktop.Linux/Desktop.Linux.csproj b/Desktop.Linux/Desktop.Linux.csproj index f635e459..7faab16c 100644 --- a/Desktop.Linux/Desktop.Linux.csproj +++ b/Desktop.Linux/Desktop.Linux.csproj @@ -1,7 +1,7 @@  Exe - net7.0 + net8.0 Assets\favicon.ico Remotely_Desktop Remotely.Desktop.XPlat diff --git a/Desktop.Linux/Properties/PublishProfiles/desktop-linux-x64.pubxml b/Desktop.Linux/Properties/PublishProfiles/desktop-linux-x64.pubxml index ff0079b2..b303b34f 100644 --- a/Desktop.Linux/Properties/PublishProfiles/desktop-linux-x64.pubxml +++ b/Desktop.Linux/Properties/PublishProfiles/desktop-linux-x64.pubxml @@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release x64 - net7.0 + net8.0 ..\Server\wwwroot\Content\Linux-x64\ linux-x64 true diff --git a/Desktop.Linux/Properties/PublishProfiles/packaged-linux-x64.pubxml b/Desktop.Linux/Properties/PublishProfiles/packaged-linux-x64.pubxml index 3528e3f6..561c4bfc 100644 --- a/Desktop.Linux/Properties/PublishProfiles/packaged-linux-x64.pubxml +++ b/Desktop.Linux/Properties/PublishProfiles/packaged-linux-x64.pubxml @@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release x64 - net7.0 + net8.0 ..\Agent\bin\publish\linux-x64\Desktop linux-x64 true diff --git a/Desktop.Shared/Desktop.Shared.csproj b/Desktop.Shared/Desktop.Shared.csproj index bfa7dc83..63d3dcaa 100644 --- a/Desktop.Shared/Desktop.Shared.csproj +++ b/Desktop.Shared/Desktop.Shared.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 enable enable diff --git a/Desktop.Win/Desktop.Win.csproj b/Desktop.Win/Desktop.Win.csproj index 9f80b301..e5532159 100644 --- a/Desktop.Win/Desktop.Win.csproj +++ b/Desktop.Win/Desktop.Win.csproj @@ -2,7 +2,7 @@ WinExe - net7.0 + net8.0-windows Remotely_Desktop Remotely.Desktop.Win Assets\favicon.ico @@ -41,7 +41,7 @@ - + @@ -60,7 +60,7 @@ - + \ No newline at end of file diff --git a/Desktop.Win/Properties/PublishProfiles/desktop-win-x64.pubxml b/Desktop.Win/Properties/PublishProfiles/desktop-win-x64.pubxml index c6a148f0..fa4ce51e 100644 --- a/Desktop.Win/Properties/PublishProfiles/desktop-win-x64.pubxml +++ b/Desktop.Win/Properties/PublishProfiles/desktop-win-x64.pubxml @@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release x64 - net7.0 + net8.0 ..\Server\wwwroot\Content\Win-x64\ win-x64 true diff --git a/Desktop.Win/Properties/PublishProfiles/desktop-win-x86.pubxml b/Desktop.Win/Properties/PublishProfiles/desktop-win-x86.pubxml index 09365bbc..cdccaccf 100644 --- a/Desktop.Win/Properties/PublishProfiles/desktop-win-x86.pubxml +++ b/Desktop.Win/Properties/PublishProfiles/desktop-win-x86.pubxml @@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release x86 - net7.0 + net8.0 ..\Server\wwwroot\Content\Win-x86\ win-x86 true diff --git a/Desktop.Win/Properties/PublishProfiles/install-folder.pubxml b/Desktop.Win/Properties/PublishProfiles/install-folder.pubxml index 04b388ca..0494363e 100644 --- a/Desktop.Win/Properties/PublishProfiles/install-folder.pubxml +++ b/Desktop.Win/Properties/PublishProfiles/install-folder.pubxml @@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. x64 C:\Program Files\Remotely\Desktop FileSystem - net7.0 + net8.0 win-x64 true False diff --git a/Desktop.Win/Properties/PublishProfiles/packaged-win-x64-debug.pubxml b/Desktop.Win/Properties/PublishProfiles/packaged-win-x64-debug.pubxml index 4389db11..62bd00ec 100644 --- a/Desktop.Win/Properties/PublishProfiles/packaged-win-x64-debug.pubxml +++ b/Desktop.Win/Properties/PublishProfiles/packaged-win-x64-debug.pubxml @@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Debug x64 - net7.0 + net8.0 ..\Agent\bin\publish\win-x64\Desktop true win-x64 diff --git a/Desktop.Win/Properties/PublishProfiles/packaged-win-x64.pubxml b/Desktop.Win/Properties/PublishProfiles/packaged-win-x64.pubxml index 524005f6..0bfa9e5b 100644 --- a/Desktop.Win/Properties/PublishProfiles/packaged-win-x64.pubxml +++ b/Desktop.Win/Properties/PublishProfiles/packaged-win-x64.pubxml @@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release x64 - net7.0 + net8.0 ..\Agent\bin\publish\win-x64\Desktop true win-x64 diff --git a/Desktop.Win/Properties/PublishProfiles/packaged-win-x86.pubxml b/Desktop.Win/Properties/PublishProfiles/packaged-win-x86.pubxml index 0d321d1a..1841a4d9 100644 --- a/Desktop.Win/Properties/PublishProfiles/packaged-win-x86.pubxml +++ b/Desktop.Win/Properties/PublishProfiles/packaged-win-x86.pubxml @@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release x86 - net7.0 + net8.0 ..\Agent\bin\publish\win-x86\Desktop win-x86 true diff --git a/Server/Components/Devices/ChatCard.razor.cs b/Server/Components/Devices/ChatCard.razor.cs index 15fe47c6..3379a612 100644 --- a/Server/Components/Devices/ChatCard.razor.cs +++ b/Server/Components/Devices/ChatCard.razor.cs @@ -12,7 +12,7 @@ using System.Threading.Tasks; namespace Remotely.Server.Components.Devices; -public partial class ChatCard : AuthComponentBase, IAsyncDisposable +public partial class ChatCard : AuthComponentBase { private ElementReference _chatMessagesWindow; @@ -44,7 +44,7 @@ public partial class ChatCard : AuthComponentBase, IAsyncDisposable HandleChatMessageReceived); } - private async Task HandleChatMessageReceived(ChatReceivedMessage message) + private async Task HandleChatMessageReceived(object subscriber, ChatReceivedMessage message) { if (message.DeviceId != Session.DeviceId) { diff --git a/Server/Components/Devices/ChatFrame.razor.cs b/Server/Components/Devices/ChatFrame.razor.cs index 4f74d36e..db8b98ec 100644 --- a/Server/Components/Devices/ChatFrame.razor.cs +++ b/Server/Components/Devices/ChatFrame.razor.cs @@ -14,7 +14,7 @@ using System.Threading.Tasks; namespace Remotely.Server.Components.Devices; -public partial class ChatFrame : AuthComponentBase, IAsyncDisposable +public partial class ChatFrame : AuthComponentBase { private ICollection _chatSessions = Array.Empty(); @@ -40,7 +40,7 @@ public partial class ChatFrame : AuthComponentBase, IAsyncDisposable await base.OnInitializedAsync(); } - private async Task HandleChatMessageReceived(ChatReceivedMessage message) + private async Task HandleChatMessageReceived(object subscriber, ChatReceivedMessage message) { if (message.DidDisconnect || ChatCache.ContainsKey(message.DeviceId)) @@ -66,7 +66,7 @@ public partial class ChatFrame : AuthComponentBase, IAsyncDisposable await Messenger.Send(new ChatSessionsChangedMessage(), CircuitConnection.ConnectionId); } - private async Task HandleChatSessionsChanged(ChatSessionsChangedMessage message) + private async Task HandleChatSessionsChanged(object subscriber, ChatSessionsChangedMessage message) { _chatSessions = ChatCache.GetAllSessions(); await InvokeAsync(StateHasChanged); diff --git a/Server/Components/Devices/DeviceCard.razor.cs b/Server/Components/Devices/DeviceCard.razor.cs index b29f979c..ca4a4fb5 100644 --- a/Server/Components/Devices/DeviceCard.razor.cs +++ b/Server/Components/Devices/DeviceCard.razor.cs @@ -90,7 +90,7 @@ public partial class DeviceCard : AuthComponentBase HandleDeviceStateChanged); } - private async Task HandleDeviceCardStateChanged(DeviceCardStateChangedMessage message) + private async Task HandleDeviceCardStateChanged(object subscriber, DeviceCardStateChangedMessage message) { if (message.DeviceId == Device.ID) { @@ -113,7 +113,7 @@ public partial class DeviceCard : AuthComponentBase } } - private async Task HandleDeviceStateChanged(DeviceStateChangedMessage message) + private async Task HandleDeviceStateChanged(object subscriber, DeviceStateChangedMessage message) { if (message.Device.ID != Device.ID) { diff --git a/Server/Components/Devices/DevicesFrame.razor.cs b/Server/Components/Devices/DevicesFrame.razor.cs index 9d6a7288..acb2ac3f 100644 --- a/Server/Components/Devices/DevicesFrame.razor.cs +++ b/Server/Components/Devices/DevicesFrame.razor.cs @@ -250,7 +250,7 @@ public partial class DevicesFrame : AuthComponentBase return $"oi-sort-{_sortDirection.ToString().ToLower()}"; } - private async Task HandleDeviceStateChangedMessage(DeviceStateChangedMessage message) + private async Task HandleDeviceStateChangedMessage(object subscriber, DeviceStateChangedMessage message) { await _devicesLock.WaitAsync(); @@ -286,7 +286,7 @@ public partial class DevicesFrame : AuthComponentBase } } - private async Task HandleDisplayNotificationMessage(DisplayNotificationMessage message) + private async Task HandleDisplayNotificationMessage(object subscriber, DisplayNotificationMessage message) { TerminalStore.AddTerminalLine(message.ConsoleText); ToastService.ShowToast(message.ToastText, classString: message.ClassName); @@ -298,7 +298,7 @@ public partial class DevicesFrame : AuthComponentBase ToastService.ShowToast("Devices refreshed."); } - private async Task HandleScriptResultMessage(ScriptResultMessage message) + private async Task HandleScriptResultMessage(object subscriber, ScriptResultMessage message) { await AddScriptResult(message.ScriptResult); } diff --git a/Server/Components/Devices/Terminal.razor.cs b/Server/Components/Devices/Terminal.razor.cs index d2b375e8..a1cd1db3 100644 --- a/Server/Components/Devices/Terminal.razor.cs +++ b/Server/Components/Devices/Terminal.razor.cs @@ -251,7 +251,7 @@ public partial class Terminal : AuthComponentBase, IDisposable await CircuitConnection.GetPowerShellCompletions(_lastCompletionInput, _lastCursorIndex, CompletionIntent.NextResult, forward); } - private async Task HandlePowerShellCompletionsMessage(PowerShellCompletionsMessage message) + private async Task HandlePowerShellCompletionsMessage(object subscriber, PowerShellCompletionsMessage message) { var completion = message.Completion; var intent = message.Intent; diff --git a/Server/Components/LoaderHarness.razor b/Server/Components/LoaderHarness.razor index 54154157..99f90f68 100644 --- a/Server/Components/LoaderHarness.razor +++ b/Server/Components/LoaderHarness.razor @@ -17,7 +17,7 @@ await Register(HandleShowLoaderMessage); } - private async Task HandleShowLoaderMessage(ShowLoaderMessage message) + private async Task HandleShowLoaderMessage(object subscriber, ShowLoaderMessage message) { _loaderShown = message.IsShown; _statusMessage = message.StatusMessage; diff --git a/Server/Components/MessengerSubscriber.cs b/Server/Components/MessengerSubscriber.cs index b1b4a796..5361e9e5 100644 --- a/Server/Components/MessengerSubscriber.cs +++ b/Server/Components/MessengerSubscriber.cs @@ -8,38 +8,40 @@ using System.Threading.Tasks; namespace Remotely.Server.Components; -public class MessengerSubscriber : ComponentBase, IAsyncDisposable +public class MessengerSubscriber : ComponentBase, IDisposable { - protected readonly ConcurrentQueue _registrations = new(); + protected readonly ConcurrentQueue _registrations = new(); [Inject] protected IMessenger Messenger { get; init; } = null!; - public async ValueTask DisposeAsync() + public void Dispose() { while (_registrations.TryDequeue(out var registration)) { try { - await registration.DisposeAsync(); + registration.Dispose(); } catch { } } GC.SuppressFinalize(this); } - protected async Task Register(TChannel channel, Func handler) + protected Task Register(TChannel channel, RegistrationCallback handler) where TMessage : class where TChannel : IEquatable { - var registration = await Messenger.Register(this, channel, handler); + var registration = Messenger.Register(this, channel, handler); _registrations.Enqueue(registration); + return Task.CompletedTask; } - protected async Task Register(Func handler) + protected Task Register(RegistrationCallback handler) where TMessage : class { - var registration = await Messenger.Register(this, handler); + var registration = Messenger.Register(this, handler); _registrations.Enqueue(registration); + return Task.CompletedTask; } } diff --git a/Server/Pages/DeviceDetails.razor.cs b/Server/Pages/DeviceDetails.razor.cs index f4e143ce..b67dbc4f 100644 --- a/Server/Pages/DeviceDetails.razor.cs +++ b/Server/Pages/DeviceDetails.razor.cs @@ -83,7 +83,7 @@ public partial class DeviceDetails : AuthComponentBase _isLoading = false; } - private async Task HandleReceiveLogsMessage(ReceiveLogsMessage message) + private async Task HandleReceiveLogsMessage(object subscriber, ReceiveLogsMessage message) { _logLines.Enqueue(message.LogChunk); await InvokeAsync(StateHasChanged); diff --git a/Server/Server.csproj b/Server/Server.csproj index 4662072b..f8a87a4c 100644 --- a/Server/Server.csproj +++ b/Server/Server.csproj @@ -1,39 +1,34 @@  - net7.0 + net8.0 aspnet-Server-F297B939-4A64-4B42-8C70-E142EBDAA131 Linux remotely Remotely_Server Remotely.Server - - - - false enable - - - - - - - - - + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + + + + + diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj index 46b73e28..66ace65b 100644 --- a/Shared/Shared.csproj +++ b/Shared/Shared.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 true AnyCPU;x64;x86 @@ -10,10 +10,10 @@ - + - + diff --git a/Tests/Desktop.Win.Tests/Desktop.Win.Tests.csproj b/Tests/Desktop.Win.Tests/Desktop.Win.Tests.csproj index 46280706..954efd9c 100644 --- a/Tests/Desktop.Win.Tests/Desktop.Win.Tests.csproj +++ b/Tests/Desktop.Win.Tests/Desktop.Win.Tests.csproj @@ -1,7 +1,7 @@  - .net7.0-windows + .net8.0-windows enable enable diff --git a/Tests/LoadTester/LoadTester.csproj b/Tests/LoadTester/LoadTester.csproj index bc75761e..fed70338 100644 --- a/Tests/LoadTester/LoadTester.csproj +++ b/Tests/LoadTester/LoadTester.csproj @@ -2,13 +2,13 @@ Exe - net7.0-windows + net8.0-windows Remotely.Tests.LoadTester Remotely.Tests.LoadTester - + diff --git a/Tests/Server.Tests/Server.Tests.csproj b/Tests/Server.Tests/Server.Tests.csproj index 751e78b2..13a5c711 100644 --- a/Tests/Server.Tests/Server.Tests.csproj +++ b/Tests/Server.Tests/Server.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 false @@ -13,12 +13,12 @@ - - - + + + - - + + diff --git a/Tests/Shared.Tests/Shared.Tests.csproj b/Tests/Shared.Tests/Shared.Tests.csproj index 1fc69e5d..6efc5fd4 100644 --- a/Tests/Shared.Tests/Shared.Tests.csproj +++ b/Tests/Shared.Tests/Shared.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable @@ -13,9 +13,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/submodules/Immense.RemoteControl b/submodules/Immense.RemoteControl index 41621f4e..11d29548 160000 --- a/submodules/Immense.RemoteControl +++ b/submodules/Immense.RemoteControl @@ -1 +1 @@ -Subproject commit 41621f4e32c0d2c27a729658fc05743e577ddcbc +Subproject commit 11d29548eca009bf2112c261243eb2ceb2b70804