Repository navigation
feat: Register MSBuild defaults to ensure consistent Roslyn initialization - #21510
carldebilly wants to merge 6 commits into
Conversation
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21510/docs/index.html |
cba333b to
079f6b6
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21510/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21510/docs/index.html |
|
|
079f6b6 to
ba712a2
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21510/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21510/docs/index.html |
|
|
…ation and add Microsoft.Build.Locator package dependency
8e56904 to
1c074e1
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21510/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21510/docs/index.html |
There was a problem hiding this comment.
Pull Request Overview
This PR adds MSBuild defaults registration to ensure consistent Roslyn initialization in the Uno Platform's Remote Control Server. The main goal is to improve the reliability of compilation workspace creation by properly locating and initializing MSBuild assemblies.
Key changes include:
- Integration of Microsoft.Build.Locator for proper MSBuild assembly resolution
- Enhanced debugging capabilities with banner displays showing MSBuild configuration
- Namespace consolidation and code organization improvements
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/Uno.UI.RemoteControl.Server/Helpers/BannerHelper.cs |
Moved from Host namespace, added dictionary overload for banner display |
src/Uno.UI.RemoteControl.Server.Processors/Uno.UI.RemoteControl.Server.Processors.csproj |
Added Microsoft.Build.Locator package, updated Roslyn versions |
src/Uno.UI.RemoteControl.Server.Processors/HotReload/MetadataUpdates/CompilationWorkspaceProvider.cs |
Added MSBuild.Locator usage and debug banners for workspace initialization |
src/Uno.UI.RemoteControl.Host/Uno.UI.RemoteControl.Host.csproj |
Added Microsoft.NET.StringTools dependency |
src/Uno.UI.RemoteControl.Host/RemoteControlExtensions.cs |
Added WebSocketException handling |
src/Uno.UI.RemoteControl.Host/Program.cs |
Updated to use moved BannerHelper, added build timestamp |
src/Uno.UI.RemoteControl.DevServer.Tests/Uno.UI.RemoteControl.DevServer.Tests.csproj |
Updated reference path for moved BannerHelper |
src/Uno.UI.RemoteControl.DevServer.Tests/BannerHelperTests.cs |
Updated namespace references for moved BannerHelper |
Comments suppressed due to low confidence (1)
src/Uno.UI.RemoteControl.Server.Processors/HotReload/MetadataUpdates/CompilationWorkspaceProvider.cs:1
- The banner display code is duplicated in two locations within the same method (lines 65-73 and 143-151). Consider extracting this debug banner logic into a separate method to reduce code duplication and improve maintainability.
using System.Threading.Tasks;
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21510/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21510/wasm-skia-net9/index.html |
8526dd8 to
802d5e0
Compare
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21510/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21510/wasm-skia-net9/index.html |
…ols direct dependency (keep it transitive)
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21510/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21510/wasm-skia-net9/index.html |
| catch (WebSocketException) | ||
| { | ||
| if (app.Log().IsEnabled(LogLevel.Information)) | ||
| { | ||
| app.Log().LogInformation("Connection from {Remote} has been closed", context.Connection.RemoteIpAddress); | ||
| } | ||
| } |
There was a problem hiding this comment.
Would this catch also address this issue we have? #18337
|
The build 177010 found UI Test snapshots differences: Details
|
| @@ -20,7 +20,7 @@ | |||
| <PackageReference Include="Uno.Core.Extensions.Logging.Singleton" /> | |||
| <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" /> | |||
| <PackageReference Include="StreamJsonRpc" Version="2.14.24" /> | |||
There was a problem hiding this comment.
There are newer versions of Microsoft.IO.RecyclableMemoryStream and StreamJsonRpc, should we be updating them too. Unlike Uno itself where we keep version updates to a minimum, I would have thought for dev tooling we should be pushing to latest where possible?
There was a problem hiding this comment.
This might cause some trouble with the dynamic load of assemblies, I would not do that right before a release.
| @@ -20,7 +20,7 @@ | |||
| <PackageReference Include="Uno.Core.Extensions.Logging.Singleton" /> | |||
| <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" /> | |||
| <PackageReference Include="StreamJsonRpc" Version="2.14.24" /> | |||
There was a problem hiding this comment.
This might cause some trouble with the dynamic load of assemblies, I would not do that right before a release.
| <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" /> | ||
| <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.8.0" /> | ||
| <!-- TODO: Use version 8 when compiling against .NET 8? --> | ||
| <!-- TODO: Use version 9 when compiling against .NET 9? --> |
| ("WorkDir", workDir ?? ""), | ||
| }; | ||
|
|
||
| BannerHelper.Write("Compilation Workspace Provider", entries); |
There was a problem hiding this comment.
Is this expected also in release ???
| <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" /> | ||
| <PackageReference Include="StreamJsonRpc" Version="2.14.24" /> | ||
| <PackageReference Include="MessagePack" Version="2.5.187" /> | ||
| <PackageReference Include="MessagePack" Version="3.1.4" /> |
There was a problem hiding this comment.
Why do we need to update this version?
There was a problem hiding this comment.
Because the previous version were pinning an old version of String Tools causing incompatibilities.
TBH we can remove this MessagePack dependency, it doesn't seem to be used at all... but updating it is fixing the problem.
| { | ||
| if (app.Log().IsEnabled(LogLevel.Information)) | ||
| { | ||
| app.Log().LogInformation("Connection from {Remote} has been closed", context.Connection.RemoteIpAddress); |
There was a problem hiding this comment.
We should still be logging the websocket exception in debug
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days. |
|
This PR was closed because it has been stalled for 10 days with no activity. |
Pull request was closed
|
@carldebilly any part of this still valid, or can the branch be deleted? |
GitHub Issue: closes https://github.com/unoplatform/uno.vscode/issues/1129
🐞 Bugfix
Fixed a regression caused by upgrade to
net10.What is the new behavior? 🚀
This PR adds MSBuild defaults registration to ensure consistent Roslyn initialization in the Uno Platform's Remote Control Server. The main goal is to improve the reliability of compilation workspace creation by properly locating and initializing MSBuild assemblies.
Key changes include:
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.