Skip to content

Convert ADF from VB.NET (.NET Framework 2.0) to C# .NET 8#1

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/convert-app-to-net8-csharp
Draft

Convert ADF from VB.NET (.NET Framework 2.0) to C# .NET 8#1
Copilot wants to merge 2 commits intomasterfrom
copilot/convert-app-to-net8-csharp

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 19, 2026

Migrates the Windows Forms application from VB.NET targeting .NET Framework 2.0 to C# targeting .NET 8, replacing the legacy SDK-style project with a modern SDK project format.

Project structure changes

  • ADF.vbprojADF.csproj (SDK-style, net8.0-windows, UseWindowsForms=true, PlatformTarget=x86)
  • ADF.sln project type GUID updated: F184B08F-... (VB) → FAE04EC0-... (C#)
  • My Project/ folder removed — SDK-style project handles assembly metadata automatically
  • app.config removed — not applicable in .NET 8

Source file conversions

VB.NET C#
adf.vb AdfForm.cs
adf.Designer.vb AdfForm.Designer.cs
ClassADF.vb ClassADF.cs
(none) Program.cs (explicit entry point)

Notable translation decisions

  • ByRef scrPadreref ScriptControlClass scrPadre: the original VB.NET used pass-by-reference so the caller's scrMain is updated when a FORM control creates a new ScriptControlClass; omitting ref would cause scrMain.AddCode(xmlFL.MODULO) to target the wrong script engine instance
  • EmbedInteropTypes set to False: C# embedded interop prohibits using concrete COM classes (ScriptControlClass); the DLL is already distributed with the project
  • Command()string.Join(" ", Environment.GetCommandLineArgs().Skip(1))
  • MsgBox()MessageBox.Show()
  • My.Application.OpenForms.Item(name)Application.OpenForms.Cast<Form>().FirstOrDefault(f => f.Name == name)
  • EnableWindowsTargeting=true added to allow building on non-Windows CI hosts

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: rsodvd79 <42972185+rsodvd79@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert application to .NET 8 and C# Convert ADF from VB.NET (.NET Framework 2.0) to C# .NET 8 Feb 19, 2026
Copilot AI requested a review from rsodvd79 February 19, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants