NetFramework4.8.1 Migration#21
NetFramework4.8.1 Migration#21Arastookhajehee wants to merge 2 commits intoRobotExMachina:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates MachinaBridge to target .NET Framework 4.8.1 and introduces a JSON library dependency to support/enable JSON serialization/deserialization in the bridge.
Changes:
- Retargeted MachinaBridge from .NET Framework 4.6.1 to 4.8.1 (project + runtime config).
- Added Newtonsoft.Json (13.0.4) to NuGet dependencies and as an assembly reference.
- Regenerated Settings/Resources designer metadata via newer Visual Studio tooling.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/MachinaBridge/packages.config | Adds Newtonsoft.Json and updates NuGet metadata for the new target framework. |
| src/MachinaBridge/MachinaBridge.csproj | Retargets to v4.8.1 and adds Newtonsoft.Json reference. |
| src/MachinaBridge/App.config | Updates supported runtime sku to .NET Framework 4.8.1. |
| src/MachinaBridge/Properties/Settings.Designer.cs | Updates generated code metadata/version. |
| src/MachinaBridge/Properties/Resources.Designer.cs | Updates generated code metadata/version. |
Files not reviewed (2)
- src/MachinaBridge/Properties/Resources.Designer.cs: Language not supported
- src/MachinaBridge/Properties/Settings.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <package id="Newtonsoft.Json" version="13.0.4" targetFramework="net481" /> | ||
| <package id="System.Windows.Interactivity.WPF" version="2.0.20525" targetFramework="net461" /> | ||
| <package id="WebSocketSharp-NonPreRelease" version="1.0.0" targetFramework="net452" /> |
There was a problem hiding this comment.
packages.config still lists the existing NuGet packages with targetFramework set to older frameworks (net461 / net452) even though the project now targets v4.8.1. Update those targetFramework values to net481 to keep the NuGet metadata consistent with the upgraded project target and avoid confusing restores/reinstalls.
| @@ -1,5 +1,6 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <packages> | |||
| <package id="Newtonsoft.Json" version="13.0.4" targetFramework="net481" /> | |||
There was a problem hiding this comment.
The new Newtonsoft.Json package/reference appears unused in this repository: there are no using Newtonsoft... or JsonConvert usages under src/MachinaBridge. If it isn't required at runtime (e.g., only planned for future work), consider removing it; if it is required transitively, add a short note (e.g., in the PR description or project docs) explaining why it must be a direct dependency.
| <package id="Newtonsoft.Json" version="13.0.4" targetFramework="net481" /> |
| <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
| <HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll</HintPath> | ||
| </Reference> |
There was a problem hiding this comment.
The new Newtonsoft.Json assembly reference doesn't include a <Private>True</Private> (Copy Local) element, while the other NuGet references in this project do. Add it for consistency with the existing pattern in this .csproj and to make it explicit that the DLL should be copied to the output folder.
Summary
This pull request updates the MachinaBridge project to target a newer .NET Framework version and adds a new dependency. The most important changes are grouped below:
Framework Upgrade
App.configandMachinaBridge.csprojDependency Management:
Newtonsoft.Jsonversion 13.0.4 as a dependency inpackages.configand referenced it inMachinaBridge.csprojto enable JSON serialization/deserialization features.Migration Scope
The project was upgraded to .NetFramework4.8.1 to prevent breaking changes with dependencies.
The bridge is a communication server that mainly handles class serialization from Json. Full migration to .Net8.0 may not be necessary at the time of this pull request.
Tests
The code is tested in Rhino 8 with .Net8.0 Runtime and the new Machina-Bridge.
Tests were successful and without noticable difference from the .NetFramework4.6.0 version.
Tests were conducted on a UR10e robot and ABB robot studio simulation environments.