diff --git a/.editorconfig b/.editorconfig
index c04e2c7a4..1585b9016 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -130,7 +130,7 @@ dotnet_diagnostic.RCS1124.severity = none
dotnet_diagnostic.RCS1077.severity = none
# IDE0040: Add accessibility modifiers
-dotnet_style_require_accessibility_modifiers = always:warning
+dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
# IDE0048: Add parentheses for clarity
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:none
diff --git a/.github/upgrades/dotnet-upgrade-plan.md b/.github/upgrades/dotnet-upgrade-plan.md
new file mode 100644
index 000000000..4bfc87cb9
--- /dev/null
+++ b/.github/upgrades/dotnet-upgrade-plan.md
@@ -0,0 +1,34 @@
+# .NET 10 Upgrade Plan
+
+## Execution Steps
+
+Execute steps below sequentially one by one in the order they are listed.
+
+1. Validate that a .NET 10.0 SDK required for this upgrade is installed on the machine and if not, help to get it installed.
+2. Ensure that the SDK version specified in global.json files is compatible with the .NET 10.0 upgrade.
+3. Upgrade CSharpNetStandardLib/CSharpNetStandardLib.csproj
+4. Upgrade ConsoleApp2/CSharpConsoleApp.csproj
+5. Upgrade ConsoleApp1/VisualBasicConsoleApp.vbproj
+
+## Settings
+
+### Project upgrade details
+
+#### CSharpNetStandardLib/CSharpNetStandardLib.csproj modifications
+
+Project properties changes:
+ - Target framework should be changed from `netstandard2.0` to `net10.0`
+
+#### ConsoleApp2/CSharpConsoleApp.csproj modifications
+
+Project file needs to be converted to SDK-style format.
+
+Project properties changes:
+ - Target framework should be changed from `.NETFramework,Version=v4.8` to `net10.0`
+
+#### ConsoleApp1/VisualBasicConsoleApp.vbproj modifications
+
+Project file needs to be converted to SDK-style format.
+
+Project properties changes:
+ - Target framework should be changed from `.NETFramework,Version=v4.8` to `net10.0`
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index c81ea3dda..8fe7b4c19 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -7,7 +7,7 @@ on:
branches: [ master ]
env:
- BuildVersion: '9.2.7'
+ BuildVersion: '10.0.0'
jobs:
build:
@@ -30,7 +30,7 @@ jobs:
- name: Setup .NET for main build
uses: actions/setup-dotnet@v4
with:
- dotnet-version: 6.0.x
+ dotnet-version: 10.0.x
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 000000000..4df0114a7
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,35 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md.
+ "name": ".NET Core Launch (web)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ // If you have changed target frameworks, make sure to update the program path.
+ "program": "${workspaceFolder}/Web/bin/Debug/ICSharpCode.CodeConverter.Web.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/Web",
+ "stopAtEntry": false,
+ // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
+ "serverReadyAction": {
+ "action": "openExternally",
+ "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
+ },
+ "env": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "sourceFileMap": {
+ "/Views": "${workspaceFolder}/Views"
+ }
+ },
+ {
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 000000000..b5041f4db
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,5 @@
+{
+ "dotnet.preferCSharpExtension": true,
+ "dotnet.defaultSolution": "CodeConverter.sln",
+ "vscode-as-git-mergetool.settingsAssistantOnStartup": false
+}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 000000000..445a84fd5
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,41 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/CodeConverter.sln",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary;ForceNoAlign"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/CodeConverter.sln",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary;ForceNoAlign"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "watch",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "watch",
+ "run",
+ "--project",
+ "${workspaceFolder}/CodeConverter.sln"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 726c44af9..c88cb8a64 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Vsix
+### VB -> C#
+
+
+### C# -> VB
+
+
+## [10.0.0] - 2026-02-06
+
+* Support for net framework dropped. Please use an older version if you are converting projects that still use it.
+* dotnet 10 required to run codeconv command line tool
+* Improvements to codeconv tool to support converting newer dotnet versions
+
+### Vsix
+
+
### VB -> C#
* Xor operator overloads now converted [#1182](htts://github.com/icsharpcode/CodeConverter/issues/1182)
@@ -17,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [9.2.7] - 2025-02-15
+This is the last version that supports net framework.
### Vsix
diff --git a/CommandLine/CodeConv/CodeConv.csproj b/CodeConv/CodeConv.csproj
similarity index 61%
rename from CommandLine/CodeConv/CodeConv.csproj
rename to CodeConv/CodeConv.csproj
index 0aee5326b..ccdac8885 100644
--- a/CommandLine/CodeConv/CodeConv.csproj
+++ b/CodeConv/CodeConv.csproj
@@ -2,7 +2,7 @@
Exe
- net8.0
+ net10.0
true
true
true
@@ -11,7 +11,7 @@
ICSharpCode.CodeConverter.CodeConv
codeconv
Bidirectional code converter for VB and C#
- PackageReadme.md
+ PackageReadme.md
https://github.com/icsharpcode/CodeConverter/
MIT
CodeConvNuGetPackageIcon.png
@@ -27,34 +27,22 @@
-
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers
-
-
-
-
-
-
-
-
-
-
+
-
-
diff --git a/CommandLine/CodeConv/CodeConvNuGetPackageIcon.png b/CodeConv/CodeConvNuGetPackageIcon.png
similarity index 100%
rename from CommandLine/CodeConv/CodeConvNuGetPackageIcon.png
rename to CodeConv/CodeConvNuGetPackageIcon.png
diff --git a/CommandLine/CodeConv.Shared/CodeConvProgram.cs b/CodeConv/CodeConvProgram.cs
similarity index 69%
rename from CommandLine/CodeConv.Shared/CodeConvProgram.cs
rename to CodeConv/CodeConvProgram.cs
index 60a0991d3..0ae967a71 100644
--- a/CommandLine/CodeConv.Shared/CodeConvProgram.cs
+++ b/CodeConv/CodeConvProgram.cs
@@ -56,9 +56,6 @@ public partial class CodeConvProgram
[Option("-f|--force", "Wipe the output directory before conversion", CommandOptionType.NoValue)]
public bool Force { get; }
- [Option(CoreOptionDefinition, "Force dot net core build if converting only .NET Core projects and seeing pre-conversion compile errors", CommandOptionType.NoValue)]
- public bool CoreOnlyProjects { get; }
-
[Option("-b|--best-effort", "Overrides warnings about compilation issues with input, and attempts a best effort conversion anyway", CommandOptionType.NoValue)]
public bool BestEffort { get; }
@@ -74,16 +71,6 @@ public partial class CodeConvProgram
private async Task ExecuteAsync()
{
- // Ideally we'd be able to use MSBuildLocator.QueryVisualStudioInstances(DiscoveryType.VisualStudioSetup) from .NET core, but it will never be supported: https://github.com/microsoft/MSBuildLocator/issues/61
- // Instead, if MSBuild 16.0+ is available, start a .NET framework process and let it run with that
- if (_runningInNetCore && !CoreOnlyProjects) {
- if (await GetLatestMsBuildExePathAsync() is { } latestMsBuildExePath) {
- return await RunNetFrameworkExeAsync(latestMsBuildExePath);
- } else {
- Console.WriteLine($"Using dot net SDK MSBuild which only works for dot net core projects.");
- }
- }
-
try {
Progress progress = new Progress(s => Console.Out.WriteLine(s.ToString()));
await ConvertAsync(progress, CancellationToken.None);
@@ -110,23 +97,6 @@ await Console.Error.WriteLineAsync(Environment.NewLine + ex.Message + Environmen
return 0;
}
- private static async Task RunNetFrameworkExeAsync(string latestMsBuildExePath)
- {
- Console.WriteLine($"Using .NET Framework MSBuild from {latestMsBuildExePath}");
- var assemblyDirectoryPath = Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]);
- var args = Environment.GetCommandLineArgs().Skip(1).ToArray();
- if (string.IsNullOrWhiteSpace(assemblyDirectoryPath)) throw new InvalidOperationException("Could not retrieve executing assembly directory");
- var netFrameworkExe = Path.Combine(assemblyDirectoryPath, "..", "..", "NetFramework", "ICSharpCode.CodeConverter.CodeConv.NetFramework.exe");
- if (!File.Exists(netFrameworkExe) && Path.GetDirectoryName(assemblyDirectoryPath) is { } assemblyDirectoryParentPath) {
-
- var debugAssemblyDirectoryPath = assemblyDirectoryParentPath.Replace("CommandLine\\CodeConv\\", "CommandLine\\CodeConv.NetFramework\\");
- var debugNetFrameworkExe = Path.Combine(debugAssemblyDirectoryPath, "ICSharpCode.CodeConverter.CodeConv.NetFramework.exe");
- netFrameworkExe = File.Exists(debugNetFrameworkExe) ? debugNetFrameworkExe : throw new FileNotFoundException($"Cannot find net framework exe at `{netFrameworkExe}`. Using the --core-only flag to get work around this.");
- }
- var exitCode = await ProcessRunner.ConnectConsoleGetExitCodeAsync(netFrameworkExe, args);
- return exitCode;
- }
-
private async Task ConvertAsync(IProgress progress, CancellationToken cancellationToken)
{
string finalSolutionPath = Path.IsPathRooted(SolutionPath)
@@ -150,7 +120,7 @@ private async Task ConvertAsync(IProgress progress, Cancella
var properties = ParsedProperties();
var joinableTaskFactory = new JoinableTaskFactory(new JoinableTaskContext());
- var msbuildWorkspaceConverter = new MSBuildWorkspaceConverter(finalSolutionPath, CoreOnlyProjects, joinableTaskFactory, BestEffort, properties);
+ var msbuildWorkspaceConverter = new MsBuildWorkspaceConverter(joinableTaskFactory, finalSolutionPath, BestEffort, properties);
var converterResultsEnumerable = msbuildWorkspaceConverter.ConvertProjectsWhereAsync(ShouldIncludeProject, TargetLanguage, progress, cancellationToken);
await ConversionResultWriter.WriteConvertedAsync(converterResultsEnumerable, finalSolutionPath, outputDirectory, Force, true, strProgress, cancellationToken);
@@ -179,21 +149,4 @@ private bool ShouldIncludeProject(Project project)
var isIncluded = !Include.Any() || Include.Any(regex => Regex.IsMatch(projectFilePath, regex));
return isIncluded && Exclude.All(regex => !Regex.IsMatch(projectFilePath, regex));
}
-
- private static async Task GetLatestMsBuildExePathAsync()
- {
- // The second path here is available on github action agents: https://github.com/microsoft/setup-msbuild#how-does-this-work
- var pathsToCheck = new[] {@"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe", @"%ProgramData%\chocolatey\bin"}
- .Select(Environment.ExpandEnvironmentVariables).ToArray();
- var vsWhereExe = pathsToCheck.FirstOrDefault(File.Exists)
- ?? throw new FileNotFoundException($"Could not find VSWhere in: {string.Join(", ", pathsToCheck.Select(p => $"`{p}`"))}");
- var args = new[] { "-latest", "-prerelease", "-products", "*", "-requires", "Microsoft.Component.MSBuild", "-version", "[16.0,]", "-find", @"MSBuild\**\Bin\MSBuild.exe" };
-
- var (exitCode, stdOut, _) = await new ProcessStartInfo(vsWhereExe) {
- Arguments = ArgumentEscaper.EscapeAndConcatenate(args)
- }.GetOutputAsync();
-
- if (exitCode == 0 && !string.IsNullOrWhiteSpace(stdOut)) return stdOut;
- return null;
- }
}
\ No newline at end of file
diff --git a/CommandLine/CodeConv.Shared/ConversionResultWriter.cs b/CodeConv/ConversionResultWriter.cs
similarity index 100%
rename from CommandLine/CodeConv.Shared/ConversionResultWriter.cs
rename to CodeConv/ConversionResultWriter.cs
diff --git a/CommandLine/CodeConv/Install-BuiltTool.ps1 b/CodeConv/Install-BuiltTool.ps1
similarity index 100%
rename from CommandLine/CodeConv/Install-BuiltTool.ps1
rename to CodeConv/Install-BuiltTool.ps1
diff --git a/CodeConv/MsBuildWorkspaceConverter.cs b/CodeConv/MsBuildWorkspaceConverter.cs
new file mode 100644
index 000000000..320f8ae97
--- /dev/null
+++ b/CodeConv/MsBuildWorkspaceConverter.cs
@@ -0,0 +1,131 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Diagnostics;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using ICSharpCode.CodeConverter.Common;
+using ICSharpCode.CodeConverter.CSharp;
+using ICSharpCode.CodeConverter.DotNetTool.Util;
+using ICSharpCode.CodeConverter.Util;
+using ICSharpCode.CodeConverter.VB;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.MSBuild;
+using Microsoft.VisualStudio.Threading;
+
+namespace ICSharpCode.CodeConverter.CommandLine;
+
+///
+/// Provides high-fidelity analysis of .NET solutions by mimicking the behavior of 'dotnet build'.
+///
+public sealed class MsBuildWorkspaceConverter
+{
+ private readonly JoinableTaskFactory _joinableTaskFactory;
+ private readonly SolutionLoader _solutionLoader;
+ private AsyncLazy? _cachedSolution;
+
+ // The other parameters are ignored for compatibility
+ public MsBuildWorkspaceConverter(JoinableTaskFactory joinableTaskFactory, string solutionFilePath, bool bestEffortConversion = false, Dictionary? buildProps = null)
+ {
+ _joinableTaskFactory = joinableTaskFactory;
+ _solutionLoader = new SolutionLoader(solutionFilePath, bestEffortConversion, buildProps);
+ }
+
+
+ public async IAsyncEnumerable ConvertProjectsWhereAsync(Func shouldConvertProject, Language? targetLanguage, IProgress progress, [EnumeratorCancellation] CancellationToken token)
+ {
+ var strProgress = new Progress(s => progress.Report(new ConversionProgress(s)));
+ _cachedSolution ??= new AsyncLazy(async () => await _solutionLoader.AnalyzeSolutionAsync(strProgress), _joinableTaskFactory);
+
+ var solution = await _cachedSolution.GetValueAsync(token);
+
+ targetLanguage ??= solution.Projects.Any(p => p.Language == LanguageNames.VisualBasic) ? Language.CS : Language.VB;
+
+ var languageConversion = targetLanguage == Language.CS
+ ? (ILanguageConversion)new VBToCSConversion()
+ : new CSToVBConversion();
+ languageConversion.ConversionOptions = new ConversionOptions { AbandonOptionalTasksAfter = TimeSpan.FromHours(4) };
+ var languageNameToConvert = targetLanguage == Language.CS
+ ? LanguageNames.VisualBasic
+ : LanguageNames.CSharp;
+
+ var projectsToConvert = solution.Projects.Where(p => p.Language == languageNameToConvert && shouldConvertProject(p)).ToArray();
+ var results = SolutionConverter.CreateFor(languageConversion, projectsToConvert, progress, token).ConvertAsync();
+ await foreach (var r in results.WithCancellation(token)) yield return r;
+ }
+
+ private class SolutionLoader
+ {
+ private readonly string _solutionFilePath;
+ private readonly bool _bestEffort;
+ private readonly IDictionary _buildProps;
+
+ public SolutionLoader(string solutionFilePath, bool bestEffort, IDictionary? buildProps)
+ {
+ _solutionFilePath = solutionFilePath;
+ _bestEffort = bestEffort;
+ _buildProps = buildProps ?? new Dictionary();
+ }
+
+ public async Task AnalyzeSolutionAsync(IProgress progress, string configuration = "Debug")
+ {
+ progress.Report($"Running dotnet restore on {_solutionFilePath}");
+ // === PREREQUISITE: Run 'dotnet restore' ===
+ await RunDotnetRestoreAsync(_solutionFilePath);
+
+ // === STEP 1: Create and Configure Workspace ===
+ var properties = new Dictionary(_buildProps);
+ properties.TryAdd("Configuration", configuration);
+ properties.TryAdd("RunAnalyzers", true.ToString());
+ properties.TryAdd("RunAnalyzersDuringBuild", true.ToString());
+
+ using var workspace = MSBuildWorkspace.Create(properties);
+
+ Solution solution = await workspace.OpenSolutionAsync(_solutionFilePath);
+
+ var errorString = await GetCompilationErrorsAsync(workspace, solution.Projects);
+ if (string.IsNullOrEmpty(errorString)) return solution;
+ errorString = " " + errorString.Replace(Environment.NewLine, Environment.NewLine + " ");
+ progress.Report($"Compilation errors found before conversion.:{Environment.NewLine}{errorString}");
+
+ if (_bestEffort) {
+ progress.Report("Attempting best effort conversion on broken input due to override");
+ } else {
+ throw CreateException("Fix compilation errors before conversion for an accurate conversion, or as a last resort, use the best effort conversion option", errorString);
+ }
+
+ return solution;
+
+ ValidationException CreateException(string mainMessage, string fullDetail)
+ {
+ return new ValidationException($"{mainMessage}:{Environment.NewLine}{fullDetail}{Environment.NewLine}{mainMessage}");
+ }
+ }
+
+ private async Task GetCompilationErrorsAsync(MSBuildWorkspace workspace, IEnumerable projectsToConvert)
+ {
+ var workspaceErrors = workspace.Diagnostics.GetErrorString();
+ var errors = await projectsToConvert.ParallelSelectAwaitAsync(async x => {
+ var c = await x.GetCompilationAsync() ?? throw new InvalidOperationException($"Compilation could not be created for {x.Language}");
+ return new[] { CompilationWarnings.WarningsForCompilation(c, c.AssemblyName) };
+ }, Env.MaxDop).ToArrayAsync();
+ var errorString = string.Join("\r\n", workspaceErrors.Yield().Concat(errors.SelectMany(w => w)).Where(w => w != null));
+ return errorString;
+ }
+
+ private async Task RunDotnetRestoreAsync(string path)
+ {
+ var psi = new ProcessStartInfo("dotnet", $"restore \"{path}\"");
+ var (exitCode, _, stdErr) = await psi.GetOutputAsync();
+ if (exitCode != 0)
+ {
+ throw new InvalidOperationException(
+ $"dotnet restore failed with exit code {exitCode}.\n" +
+ $"Error: {stdErr}");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/CommandLine/README.md b/CodeConv/README.md
similarity index 99%
rename from CommandLine/README.md
rename to CodeConv/README.md
index 73d546803..a187ba654 100644
--- a/CommandLine/README.md
+++ b/CodeConv/README.md
@@ -4,7 +4,7 @@
dotnet tool install ICSharpCode.CodeConverter.CodeConv -g
```
-.NET Core 3.1 Tool
+.NET 10 Tool
```
codeconv -h
diff --git a/CommandLine/CodeConv.Shared/Util/DirectoryInfoExtensions.cs b/CodeConv/Util/DirectoryInfoExtensions.cs
similarity index 100%
rename from CommandLine/CodeConv.Shared/Util/DirectoryInfoExtensions.cs
rename to CodeConv/Util/DirectoryInfoExtensions.cs
diff --git a/CommandLine/CodeConv.Shared/Util/EnumerableExtensions.cs b/CodeConv/Util/EnumerableExtensions.cs
similarity index 100%
rename from CommandLine/CodeConv.Shared/Util/EnumerableExtensions.cs
rename to CodeConv/Util/EnumerableExtensions.cs
diff --git a/CommandLine/CodeConv.Shared/Util/ProcessRunner.cs b/CodeConv/Util/ProcessRunner.cs
similarity index 100%
rename from CommandLine/CodeConv.Shared/Util/ProcessRunner.cs
rename to CodeConv/Util/ProcessRunner.cs
diff --git a/CommandLine/CodeConv.Shared/Util/ProgramExitCodes.cs b/CodeConv/Util/ProgramExitCodes.cs
similarity index 100%
rename from CommandLine/CodeConv.Shared/Util/ProgramExitCodes.cs
rename to CodeConv/Util/ProgramExitCodes.cs
diff --git a/CommandLine/CodeConv/docs/PackageReadme.md b/CodeConv/docs/PackageReadme.md
similarity index 100%
rename from CommandLine/CodeConv/docs/PackageReadme.md
rename to CodeConv/docs/PackageReadme.md
diff --git a/CodeConverter.sln b/CodeConverter.sln
index 3c9845cd3..f8af6f006 100644
--- a/CodeConverter.sln
+++ b/CodeConverter.sln
@@ -1,14 +1,11 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.1.31911.260
+# Visual Studio Version 18
+VisualStudioVersion = 18.0.11205.157
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeConverter", "CodeConverter\CodeConverter.csproj", "{7EA075C6-6406-445C-AB77-6C47AFF88D58}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{21DBA1CE-AF55-4159-B04B-B8C621BE8921}"
- ProjectSection(ProjectDependencies) = postProject
- {160F0B34-0F6F-4532-8D7B-39064956364D} = {160F0B34-0F6F-4532-8D7B-39064956364D}
- EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vsix", "Vsix\Vsix.csproj", "{99498EF8-C9E0-433B-8D7B-EA8E9E66F0C7}"
EndProject
@@ -17,26 +14,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
CHANGELOG.md = CHANGELOG.md
Directory.Build.props = Directory.Build.props
+ IncrementVersion.ps1 = IncrementVersion.ps1
+ README.md = README.md
+ Update-NpmPackages.ps1 = Update-NpmPackages.ps1
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "Web\Web.csproj", "{08A20D4F-6310-43BB-B339-6317ACF3B52E}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CommandLine", "CommandLine", "{926D43FE-D6AE-45E7-A933-8A0F866E7876}"
- ProjectSection(SolutionItems) = preProject
- CommandLine\README.md = CommandLine\README.md
- EndProjectSection
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeConv.NetFramework", "CommandLine\CodeConv.NetFramework\CodeConv.NetFramework.csproj", "{CF18CBCF-67FF-46CA-8D1D-3221B7706D7D}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeConv", "CommandLine\CodeConv\CodeConv.csproj", "{160F0B34-0F6F-4532-8D7B-39064956364D}"
- ProjectSection(ProjectDependencies) = postProject
- {CF18CBCF-67FF-46CA-8D1D-3221B7706D7D} = {CF18CBCF-67FF-46CA-8D1D-3221B7706D7D}
- EndProjectSection
-EndProject
-Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "CodeConv.Shared", "CommandLine\CodeConv.Shared\CodeConv.Shared.shproj", "{D3A957FF-DAFC-4265-9AE2-D94F6473411A}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Func", "Func\Func.csproj", "{4A2AA3A2-7C6D-4429-AFA9-B9AFD9AAD877}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeConv", "CodeConv\CodeConv.csproj", "{3C0A6B55-283A-6775-8AC5-B9C61150C58E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -59,33 +47,19 @@ Global
{08A20D4F-6310-43BB-B339-6317ACF3B52E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08A20D4F-6310-43BB-B339-6317ACF3B52E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08A20D4F-6310-43BB-B339-6317ACF3B52E}.Release|Any CPU.Build.0 = Release|Any CPU
- {CF18CBCF-67FF-46CA-8D1D-3221B7706D7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CF18CBCF-67FF-46CA-8D1D-3221B7706D7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CF18CBCF-67FF-46CA-8D1D-3221B7706D7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CF18CBCF-67FF-46CA-8D1D-3221B7706D7D}.Release|Any CPU.Build.0 = Release|Any CPU
- {160F0B34-0F6F-4532-8D7B-39064956364D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {160F0B34-0F6F-4532-8D7B-39064956364D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {160F0B34-0F6F-4532-8D7B-39064956364D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {160F0B34-0F6F-4532-8D7B-39064956364D}.Release|Any CPU.Build.0 = Release|Any CPU
{4A2AA3A2-7C6D-4429-AFA9-B9AFD9AAD877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A2AA3A2-7C6D-4429-AFA9-B9AFD9AAD877}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A2AA3A2-7C6D-4429-AFA9-B9AFD9AAD877}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A2AA3A2-7C6D-4429-AFA9-B9AFD9AAD877}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3C0A6B55-283A-6775-8AC5-B9C61150C58E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3C0A6B55-283A-6775-8AC5-B9C61150C58E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3C0A6B55-283A-6775-8AC5-B9C61150C58E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3C0A6B55-283A-6775-8AC5-B9C61150C58E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {CF18CBCF-67FF-46CA-8D1D-3221B7706D7D} = {926D43FE-D6AE-45E7-A933-8A0F866E7876}
- {160F0B34-0F6F-4532-8D7B-39064956364D} = {926D43FE-D6AE-45E7-A933-8A0F866E7876}
- {D3A957FF-DAFC-4265-9AE2-D94F6473411A} = {926D43FE-D6AE-45E7-A933-8A0F866E7876}
- EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B87DD8E0-BF04-46F6-A98F-76F93AFD2988}
EndGlobalSection
- GlobalSection(SharedMSBuildProjectFiles) = preSolution
- CommandLine\CodeConv.Shared\CodeConv.Shared.projitems*{160f0b34-0f6f-4532-8d7b-39064956364d}*SharedItemsImports = 5
- CommandLine\CodeConv.Shared\CodeConv.Shared.projitems*{cf18cbcf-67ff-46ca-8d1d-3221b7706d7d}*SharedItemsImports = 5
- CommandLine\CodeConv.Shared\CodeConv.Shared.projitems*{d3a957ff-dafc-4265-9ae2-d94f6473411a}*SharedItemsImports = 13
- EndGlobalSection
EndGlobal
diff --git a/CodeConverter.slnx b/CodeConverter.slnx
new file mode 100644
index 000000000..cc9851f91
--- /dev/null
+++ b/CodeConverter.slnx
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CodeConverter/CSharp/ArgumentConverter.cs b/CodeConverter/CSharp/ArgumentConverter.cs
index ac9e8f0e0..68bebdac0 100644
--- a/CodeConverter/CSharp/ArgumentConverter.cs
+++ b/CodeConverter/CSharp/ArgumentConverter.cs
@@ -32,7 +32,7 @@ public async Task ConvertSimpleArgumentAsync(VBSyntax.SimpleAr
var baseSymbol = symbol?.OriginalDefinition.GetBaseSymbol();
var possibleParameters = (CommonConversions.GetCsOriginalSymbolOrNull(baseSymbol) ?? symbol)?.GetParameters();
if (possibleParameters.HasValue) {
- var refType = _semanticModel.GetRefConversionType(node, argList, possibleParameters.Value, out var argName, out var refKind);
+ var refType = CommonConversions.GetRefConversionType(node, argList, possibleParameters.Value, out var argName, out var refKind);
token = CommonConversions.GetRefToken(refKind);
if (refType != SemanticModelExtensions.RefConversion.Inline) {
convertedArgExpression = HoistByRefDeclaration(node, convertedArgExpression, refType, argName, refKind);
@@ -147,7 +147,10 @@ private CSSyntax.ExpressionSyntax HoistByRefDeclaration(VBSyntax.SimpleArgumentS
private ISymbol GetInvocationSymbol(SyntaxNode invocation)
{
var symbol = invocation.TypeSwitch(
- (VBSyntax.InvocationExpressionSyntax e) => _semanticModel.GetSymbolInfo(e).ExtractBestMatch(),
+ (VBSyntax.InvocationExpressionSyntax e) => _semanticModel.GetAllCandidateSymbols(e)
+ .OrderByDescending(s => s.GetParameters().Length == e.ArgumentList.Arguments.Count)
+ .ThenByDescending(s => ParameterMatchScore(s, e.ArgumentList.Arguments))
+ .FirstOrDefault(),
(VBSyntax.ObjectCreationExpressionSyntax e) => _semanticModel.GetSymbolInfo(e).ExtractBestMatch(),
(VBSyntax.RaiseEventStatementSyntax e) => _semanticModel.GetSymbolInfo(e.Name).ExtractBestMatch(),
(VBSyntax.MidExpressionSyntax _) => CommonConversions.KnownTypes.VbCompilerStringType?.GetMembers("MidStmtStr").FirstOrDefault(),
@@ -155,6 +158,12 @@ private ISymbol GetInvocationSymbol(SyntaxNode invocation)
return symbol;
}
+ private static int ParameterMatchScore(ISymbol symbol, SeparatedSyntaxList arguments)
+ {
+ //TODO: Match on name/position and type
+ return 1;
+ }
+
private IEnumerable GetAdditionalRequiredArgs(
IEnumerable arguments,
ISymbol invocationSymbol)
diff --git a/CodeConverter/CSharp/CommonConversions.cs b/CodeConverter/CSharp/CommonConversions.cs
index 60b10caa5..f56e3fce4 100644
--- a/CodeConverter/CSharp/CommonConversions.cs
+++ b/CodeConverter/CSharp/CommonConversions.cs
@@ -1,4 +1,5 @@
-using System.Linq.Expressions;
+using System.Collections.Immutable;
+using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using ICSharpCode.CodeConverter.Util.FromRoslyn;
using Microsoft.CodeAnalysis.Classification;
@@ -577,7 +578,7 @@ public static CSSyntax.VariableDeclaratorSyntax CreateVariableDeclarator(string
{
if (operation is IPropertyReferenceOperation pro && pro.Arguments.Any() &&
!VisualBasicExtensions.IsDefault(pro.Property)) {
- var isSetter = pro.Parent.Kind == OperationKind.SimpleAssignment && pro.Parent.Children.First() == pro;
+ var isSetter = pro.Parent.Kind == OperationKind.SimpleAssignment && pro.Parent.ChildOperations.First() == pro;
var extraArg = isSetter
? await GetParameterizedSetterArgAsync(operation)
: null;
@@ -669,6 +670,7 @@ public ISymbol GetCsOriginalSymbolOrNull(ISymbol symbol)
symbol = symbol.OriginalDefinition;
// Construct throws an exception if ConstructedFrom differs from it, so let's use ConstructedFrom directly
var symbolToFind = symbol is IMethodSymbol m ? m.ConstructedFrom : symbol;
+ // This no longer works for private members: https://github.com/dotnet/roslyn/issues/72369#issuecomment-1975066163
var similarSymbol = SymbolFinder.FindSimilarSymbols(symbolToFind, _csCompilation).FirstOrDefault();
return similarSymbol;
}
@@ -684,7 +686,7 @@ public static ExpressionSyntax ThrowawayParameters(ExpressionSyntax invocable, i
public static CSSyntax.ParameterListSyntax CreateParameterList(IEnumerable ps)
{
- return SyntaxFactory.ParameterList(SyntaxFactory.SeparatedList(ps));
+ return SyntaxFactory.ParameterList(SyntaxFactory.SeparatedList(ps.Cast()));
}
public static ExpressionSyntax NotNothingComparison(ExpressionSyntax otherArgument, bool isReferenceType, bool inExpressionLambda = false)
@@ -747,6 +749,9 @@ public RefKind GetCsRefKind(IParameterSymbol vbParameter, Microsoft.CodeAnalysis
return csParam.RefKind;
}
+ var syntaxNodes = vbParameter?.DeclaringSyntaxReferences.Select(r => r.GetSyntax());
+ optionalParameterSyntax ??= syntaxNodes?.OfType().FirstOrDefault();
+
if (optionalParameterSyntax?.AttributeLists.Any(this.HasOutAttribute) == true) {
return RefKind.Out;
}
@@ -800,4 +805,19 @@ public async Task WithRemovedRedundantConversionOrNullAsync(VB
return writtenByUser ? null : this.TypeConversionAnalyzer.AddExplicitConversion(conversionArg, csharpArg,
forceTargetType: forceTargetType, defaultToCast: true);
}
+
+ public SemanticModelExtensions.RefConversion GetRefConversionType(VBSyntax.ArgumentSyntax node, VBSyntax.ArgumentListSyntax argList, ImmutableArray parameters, out string argName, out RefKind refKind)
+ {
+ var parameter = node.IsNamed && node is VBSyntax.SimpleArgumentSyntax sas
+ ? parameters.FirstOrDefault(p => p.Name.Equals(sas.NameColonEquals.Name.Identifier.Text, StringComparison.OrdinalIgnoreCase))
+ : parameters.ElementAtOrDefault(argList.Arguments.IndexOf(node));
+ if (parameter != null) {
+ refKind = GetCsRefKind(parameter);
+ argName = parameter.Name;
+ } else {
+ refKind = RefKind.None;
+ argName = null;
+ }
+ return SemanticModel.NeedsVariableForArgument(node, refKind);
+ }
}
\ No newline at end of file
diff --git a/CodeConverter/CSharp/HandledEventsAnalyzer.cs b/CodeConverter/CSharp/HandledEventsAnalyzer.cs
index 6b3507c1c..f15efb17f 100644
--- a/CodeConverter/CSharp/HandledEventsAnalyzer.cs
+++ b/CodeConverter/CSharp/HandledEventsAnalyzer.cs
@@ -36,7 +36,9 @@ private async Task AnalyzeAsync()
.ToDictionary(m => m.Key, g => g.First(), StringComparer.OrdinalIgnoreCase); // Uses the fact that GroupBy maintains addition order to get the closest declaration
#pragma warning restore RS1024 // Compare symbols correctly
- var writtenWithEventsProperties = await ancestorPropsMembersByName.Values.OfType().ToAsyncEnumerable().ToDictionaryAwaitAsync(async p => p.Name, async p => (p, await IsNeverWrittenOrOverriddenAsync(p)), StringComparer.OrdinalIgnoreCase);
+
+ var writtenWithEventsProperties = await ancestorPropsMembersByName.Values.OfType().ToAsyncEnumerable()
+ .ToDictionaryAsync(async (p, _) => p.Name, async (p, cancellationToken) => (p, await IsNeverWrittenOrOverriddenAsync(p, cancellationToken)));
var eventContainerToMethods = _type.GetMembers().OfType()
.SelectMany(HandledEvents)
@@ -62,10 +64,10 @@ private static int ParametersToDiscard(IEventSymbol e, IMethodSymbol handlingMet
return toDiscard;
}
- private async Task IsNeverWrittenOrOverriddenAsync(ISymbol symbol)
+ private async Task IsNeverWrittenOrOverriddenAsync(ISymbol symbol, CancellationToken cancellationToken = default)
{
var projectSolution = _commonConversions.Document.Project.Solution;
- if (!await projectSolution.IsNeverWrittenAsync(symbol, _initializeComponentLocationOrNull)) return false;
+ if (!await projectSolution.IsNeverWrittenAsync(symbol, _initializeComponentLocationOrNull, cancellationToken: cancellationToken)) return false;
return !_typeToInheritors.Contains(symbol.ContainingType);
}
diff --git a/CodeConverter/CSharp/MethodBodyExecutableStatementVisitor.cs b/CodeConverter/CSharp/MethodBodyExecutableStatementVisitor.cs
index cd67d4654..ee700cebb 100644
--- a/CodeConverter/CSharp/MethodBodyExecutableStatementVisitor.cs
+++ b/CodeConverter/CSharp/MethodBodyExecutableStatementVisitor.cs
@@ -542,7 +542,7 @@ public override async Task> VisitMultiLineIfBlock(VB
elseClause = elseClause.WithVbSourceMappingFrom(node.ElseBlock); //Special case where explicit mapping is needed since block becomes clause so cannot be easily visited
var elseIfBlocks = await node.ElseIfBlocks.SelectAsync(async elseIf => await ConvertElseIfAsync(elseIf));
- foreach (var elseIf in elseIfBlocks.Reverse()) {
+ foreach (var elseIf in Enumerable.Reverse(elseIfBlocks)) {
var ifStmt = SyntaxFactory.IfStatement(elseIf.ElseIfCondition, elseIf.ElseBlock, elseClause);
elseClause = SyntaxFactory.ElseClause(ifStmt);
}
diff --git a/CodeConverter/CSharp/NameExpressionNodeVisitor.cs b/CodeConverter/CSharp/NameExpressionNodeVisitor.cs
index b32a62cc4..0deb89bfa 100644
--- a/CodeConverter/CSharp/NameExpressionNodeVisitor.cs
+++ b/CodeConverter/CSharp/NameExpressionNodeVisitor.cs
@@ -435,7 +435,7 @@ List GetRefParameters(VBSyntax.ArgumentListSyntax argumentList
var arg = (ArgumentSyntax)CommonConversions.CsSyntaxGenerator.Argument(p.RefKind, SyntaxFactory.IdentifierName(p.Name));
arguments.Add(arg);
var par = (ParameterSyntax)CommonConversions.CsSyntaxGenerator.ParameterDeclaration(p);
- parameters.Add(par);
+ parameters.Add(par.WithDefault(null));
}
return (SyntaxFactory.SeparatedList(arguments), SyntaxFactory.SeparatedList(parameters));
}
@@ -452,7 +452,7 @@ private bool RequiresLocalFunction(VBSyntax.InvocationExpressionSyntax invocatio
bool RequiresLocalFunction(RefConversion possibleInline, VBSyntax.InvocationExpressionSyntax invocation, IMethodSymbol invocationSymbol, VBSyntax.ArgumentSyntax a)
{
- var refConversion = _semanticModel.GetRefConversionType(a, invocation.ArgumentList, invocationSymbol.Parameters, out string _, out _);
+ var refConversion = CommonConversions.GetRefConversionType(a, invocation.ArgumentList, invocationSymbol.Parameters, out string _, out _);
if (RefConversion.Inline == refConversion || possibleInline == refConversion) return false;
if (!(a is VBSyntax.SimpleArgumentSyntax sas)) return false;
var argExpression = sas.Expression.SkipIntoParens();
diff --git a/CodeConverter/CSharp/PerScopeState.cs b/CodeConverter/CSharp/PerScopeState.cs
index 1dfb06b92..a49fff977 100644
--- a/CodeConverter/CSharp/PerScopeState.cs
+++ b/CodeConverter/CSharp/PerScopeState.cs
@@ -225,7 +225,7 @@ public IEnumerable ConvertContinue(VBasic.SyntaxKind vbBlockKey
{
var scopesToExit = _hoistedNodesPerScope.Where(x => x.ExitableKind is not VBasic.SyntaxKind.None).TakeWhile(x => x.ExitableKind != vbBlockKeywordKind && x.IsBreakableInCs).ToArray();
// Select is breakable, but not continuable, so only need to break out of it on the way to something else, not if it's last.
- scopesToExit = scopesToExit.Reverse().SkipWhile(x => x.ExitableKind is VBasic.SyntaxKind.SelectKeyword).Reverse().ToArray();
+ scopesToExit = Enumerable.Reverse(scopesToExit).SkipWhile(x => x.ExitableKind is VBasic.SyntaxKind.SelectKeyword).Reverse().ToArray();
var assignmentExpression = CommonConversions.Literal(true);
int i = 0;
foreach (var scope in scopesToExit) {
@@ -253,7 +253,6 @@ private static AdditionalDeclaration HoistConditionalBreakOrContinue(ScopeState
var ifTrue = new PostIfTrueBlock(scopeVar.IdentifierName, stmt);
scope.HoistedNodes.Add(scopeVar);
scope.HoistedNodes.Add(ifTrue);
- return scopeVar;
}
return scopeVar;
diff --git a/CodeConverter/CSharp/ProjectMergedDeclarationExtensions.cs b/CodeConverter/CSharp/ProjectMergedDeclarationExtensions.cs
index cf41e9689..edd019226 100644
--- a/CodeConverter/CSharp/ProjectMergedDeclarationExtensions.cs
+++ b/CodeConverter/CSharp/ProjectMergedDeclarationExtensions.cs
@@ -164,7 +164,7 @@ private static async Task RenamePrefixAsync(Project project, string old
for (var symbolToRename = await GetElementToRename(project); symbolToRename != null; symbolToRename = await GetElementToRename(project, toSkip)) {
string newName = symbolToRename.Name.Replace(oldNamePrefix, newNamePrefix);
try {
- var renamedSolution = await Renamer.RenameSymbolAsync(project.Solution, symbolToRename, newName, project.Solution.Workspace.Options, cancellationToken);
+ var renamedSolution = await Renamer.RenameSymbolAsync(project.Solution, symbolToRename, new SymbolRenameOptions(), newName, cancellationToken);
project = renamedSolution.GetProject(project.Id);
} catch (Exception e) {
toSkip++;
diff --git a/CodeConverter/CSharp/Replacements/SimpleMethodReplacement.cs b/CodeConverter/CSharp/Replacements/SimpleMethodReplacement.cs
index e4d02e392..fc27a2192 100644
--- a/CodeConverter/CSharp/Replacements/SimpleMethodReplacement.cs
+++ b/CodeConverter/CSharp/Replacements/SimpleMethodReplacement.cs
@@ -133,7 +133,7 @@ private static ExpressionSyntax ReplacePlaceholderArgs(ExpressionSyntax zeroOrSi
private static bool QualifiedMethodNameMatches(ISymbol symbol, params string[] parts)
{
if (symbol == null) return false;
- foreach (var part in parts.Reverse()) {
+ foreach (var part in Enumerable.Reverse(parts)) {
if (!part.Equals(symbol.Name, StringComparison.OrdinalIgnoreCase)) return false;
symbol = symbol.ContainingSymbol;
}
diff --git a/CodeConverter/CSharp/SemanticModelExtensions.cs b/CodeConverter/CSharp/SemanticModelExtensions.cs
index b51f8e9f1..238b001bc 100644
--- a/CodeConverter/CSharp/SemanticModelExtensions.cs
+++ b/CodeConverter/CSharp/SemanticModelExtensions.cs
@@ -64,21 +64,6 @@ public static TSymbol GetSymbolInfoInDocument(this SemanticModel semant
return semanticModel.SyntaxTree == node.SyntaxTree ? semanticModel.GetSymbolInfo(node).ExtractBestMatch() : null;
}
- public static RefConversion GetRefConversionType(this SemanticModel semanticModel, VBSyntax.ArgumentSyntax node, VBSyntax.ArgumentListSyntax argList, ImmutableArray parameters, out string argName, out RefKind refKind)
- {
- var parameter = node.IsNamed && node is VBSyntax.SimpleArgumentSyntax sas
- ? parameters.FirstOrDefault(p => p.Name.Equals(sas.NameColonEquals.Name.Identifier.Text, StringComparison.OrdinalIgnoreCase))
- : parameters.ElementAtOrDefault(argList.Arguments.IndexOf(node));
- if (parameter != null) {
- refKind = parameter.RefKind;
- argName = parameter.Name;
- } else {
- refKind = RefKind.None;
- argName = null;
- }
- return semanticModel.NeedsVariableForArgument(node, refKind);
- }
-
public static RefConversion NeedsVariableForArgument(this SemanticModel semanticModel, VBasic.Syntax.ArgumentSyntax node, RefKind refKind)
{
if (refKind == RefKind.None) return RefConversion.Inline;
diff --git a/CodeConverter/CSharp/TypeConversionAnalyzer.cs b/CodeConverter/CSharp/TypeConversionAnalyzer.cs
index b43f7296c..d1c3d3d24 100644
--- a/CodeConverter/CSharp/TypeConversionAnalyzer.cs
+++ b/CodeConverter/CSharp/TypeConversionAnalyzer.cs
@@ -378,7 +378,7 @@ private static TypeConversionKind AnalyzeVbConversion(bool alwaysExplicit, IType
return TypeConversionKind.EnumConversionThenCast;
}
if (vbConversion.IsNarrowing) {
- return TypeConversionKind.DestructiveCast;
+ return vbConversion.IsTypeParameter ? TypeConversionKind.Conversion : TypeConversionKind.DestructiveCast;
}
if (alwaysExplicit) {
return TypeConversionKind.NonDestructiveCast;
diff --git a/CodeConverter/CSharp/UsageTypeAnalyzer.cs b/CodeConverter/CSharp/UsageTypeAnalyzer.cs
index afe99a61c..342eea294 100644
--- a/CodeConverter/CSharp/UsageTypeAnalyzer.cs
+++ b/CodeConverter/CSharp/UsageTypeAnalyzer.cs
@@ -8,17 +8,17 @@ internal static class UsageTypeAnalyzer
///
/// Only detects direct assignment, not use of ByRef, late binding, dynamic, reflection, etc.
///
- public static async ValueTask IsNeverWrittenAsync(this Solution solution, ISymbol symbol, Location outsideLocation = null)
+ public static async ValueTask IsNeverWrittenAsync(this Solution solution, ISymbol symbol, Location outsideLocation = null, CancellationToken cancellationToken = default)
{
- return symbol.AllWriteUsagesKnowable() && !await ContainsWriteUsagesForAsync(solution, symbol, outsideLocation);
+ return symbol.AllWriteUsagesKnowable() && !await ContainsWriteUsagesForAsync(solution, symbol, outsideLocation, cancellationToken);
}
- public static async Task ContainsWriteUsagesForAsync(Solution solution, ISymbol symbol, Location outsideLocation = null)
+ public static async Task ContainsWriteUsagesForAsync(Solution solution, ISymbol symbol, Location outsideLocation = null, CancellationToken cancellationToken = default)
{
- var references = await GetUsagesAsync(solution, symbol, outsideLocation);
+ var references = await GetUsagesAsync(solution, symbol, outsideLocation, cancellationToken);
var operationsReferencing = references.Select(async g => {
- var semanticModel = await g.Doc.GetSemanticModelAsync();
- var syntaxRoot = await g.Doc.GetSyntaxRootAsync();
+ var semanticModel = await g.Doc.GetSemanticModelAsync(cancellationToken);
+ var syntaxRoot = await g.Doc.GetSyntaxRootAsync(cancellationToken);
return g.Usages.Select(l => syntaxRoot.FindNode(l.Location.SourceSpan))
.Select(syntaxNode => semanticModel.GetAncestorOperationOrNull(syntaxNode));
});
@@ -29,9 +29,9 @@ public static async Task ContainsWriteUsagesForAsync(Solution solution, IS
return false;
}
- public static async Task> GetUsagesAsync(this Solution solution, ISymbol symbol, Location outsideLocation = null)
+ public static async Task> GetUsagesAsync(this Solution solution, ISymbol symbol, Location outsideLocation = null, CancellationToken cancellationToken = default)
{
- var references = await SymbolFinder.FindReferencesAsync(symbol, solution);
+ var references = await SymbolFinder.FindReferencesAsync(symbol, solution, cancellationToken);
return references.SelectMany(r => r.Locations).GroupBy(l => (Doc: l.Document, Tree: l.Location.SourceTree))
.Select(g => (g.Key.Doc, Usages: g.Where(l => l.Location.SourceTree != outsideLocation?.SourceTree || !l.Location.SourceSpan.OverlapsWith(outsideLocation.SourceSpan)).ToArray()))
.Where(g => g.Usages.Any());
diff --git a/CodeConverter/CodeConverter.csproj b/CodeConverter/CodeConverter.csproj
index d90ffbd0e..3f2b3a804 100644
--- a/CodeConverter/CodeConverter.csproj
+++ b/CodeConverter/CodeConverter.csproj
@@ -36,9 +36,9 @@
-
-
-
+
+
+
all
@@ -54,8 +54,9 @@
-
-
+
+
+
all
diff --git a/CodeConverter/Common/DefaultReferences.cs b/CodeConverter/Common/DefaultReferences.cs
index 09dd95121..54ade271e 100644
--- a/CodeConverter/Common/DefaultReferences.cs
+++ b/CodeConverter/Common/DefaultReferences.cs
@@ -4,6 +4,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
+using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
namespace ICSharpCode.CodeConverter.Common;
@@ -14,12 +15,14 @@ namespace ICSharpCode.CodeConverter.Common;
public static class DefaultReferences
{
private static readonly Assembly[] DefaultAssemblies = new []{
- typeof(object),
- typeof(IEnumerable),
- typeof(IEnumerable<>),
- typeof(ErrorEventArgs),
+ // ReSharper disable RedundantNameQualifier
+ typeof(System.Object),
+ typeof(System.Collections.IEnumerable),
+ typeof(System.Collections.Generic.IEnumerable<>),
+ typeof(System.IO.ErrorEventArgs),
typeof(System.Text.Encoding),
- typeof(Enumerable),
+ typeof(System.Linq.Enumerable),
+ typeof(System.Console),
typeof(System.ComponentModel.BrowsableAttribute),
typeof(System.Dynamic.DynamicObject),
typeof(System.Data.DataRow),
@@ -30,7 +33,9 @@ public static class DefaultReferences
typeof(System.Xml.Linq.XElement),
typeof(System.Linq.Expressions.Expression),
typeof(Microsoft.VisualBasic.Constants),
- typeof(System.Data.SqlClient.SqlCommand)
+ typeof(System.Data.SqlClient.SqlCommand),
+ typeof(System.Threading.Tasks.ParallelOptions)
+ // ReSharper restore RedundantNameQualifier
}.Select(t => t.Assembly).Concat(
new[] { Assembly.Load("System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") }
).ToArray();
diff --git a/CodeConverter/Common/DocumentExtensions.cs b/CodeConverter/Common/DocumentExtensions.cs
index b0e0d9de1..442513604 100644
--- a/CodeConverter/Common/DocumentExtensions.cs
+++ b/CodeConverter/Common/DocumentExtensions.cs
@@ -115,11 +115,11 @@ private static SyntaxNode WithWarningAnnotation(SyntaxNode node, string warningT
{
return node.WithAdditionalAnnotations(new SyntaxAnnotation(AnnotationConstants.ConversionErrorAnnotationKind, warningText));
}
- private static OptionSet GetVBOptions(DocumentOptionSet options)
+ private static DocumentOptionSet GetVBOptions(DocumentOptionSet options)
{
return options;
}
- private static OptionSet GetCSOptions(DocumentOptionSet options) {
+ private static DocumentOptionSet GetCSOptions(DocumentOptionSet options) {
return options;
}
}
\ No newline at end of file
diff --git a/CodeConverter/Common/SharedSemanticModelExtensions.cs b/CodeConverter/Common/SharedSemanticModelExtensions.cs
index a5ee1da98..7464e539a 100644
--- a/CodeConverter/Common/SharedSemanticModelExtensions.cs
+++ b/CodeConverter/Common/SharedSemanticModelExtensions.cs
@@ -13,4 +13,10 @@ public static T GetAncestorOperationOrNull(this SemanticModel semanticModel,
return default;
}
+
+ public static ISymbol[] GetAllCandidateSymbols(this SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var symbolInfo = semanticModel.GetSymbolInfo(node, cancellationToken);
+ return [.. symbolInfo.Symbol.YieldNotNull(), .. symbolInfo.CandidateSymbols];
+ }
}
\ No newline at end of file
diff --git a/CodeConverter/Common/SymbolRenamer.cs b/CodeConverter/Common/SymbolRenamer.cs
index 5ee789494..11559abb6 100644
--- a/CodeConverter/Common/SymbolRenamer.cs
+++ b/CodeConverter/Common/SymbolRenamer.cs
@@ -31,11 +31,11 @@ public static async Task PerformRenamesAsync(Project project, IEnumerab
var solution = project.Solution;
foreach (var (originalSymbol, newName) in symbolsWithNewNames.OrderByDescending(s => s.Original.DeclaringSyntaxReferences.Select(x => x.Span.End).Max())) {
project = solution.GetProject(project.Id);
- var compilation = await project.GetCompilationAsync();
+ var compilation = await project.GetCompilationAsync(cancellationToken);
ISymbol currentDeclaration = SymbolFinder.FindSimilarSymbols(originalSymbol, compilation).FirstOrDefault();
if (currentDeclaration == null)
continue; //Must have already renamed this symbol for a different reason
- solution = await Renamer.RenameSymbolAsync(solution, currentDeclaration, newName, solution.Workspace.Options);
+ solution = await Renamer.RenameSymbolAsync(solution, currentDeclaration, new(), newName, cancellationToken);
}
return solution.GetProject(project.Id);
diff --git a/CodeConverter/Common/VisualBasicCompiler.cs b/CodeConverter/Common/VisualBasicCompiler.cs
index 520c1e6b1..a1d1e8fec 100644
--- a/CodeConverter/Common/VisualBasicCompiler.cs
+++ b/CodeConverter/Common/VisualBasicCompiler.cs
@@ -1,4 +1,5 @@
using System.Text;
+using Microsoft.CodeAnalysis.Scripting;
using Microsoft.CodeAnalysis.VisualBasic;
namespace ICSharpCode.CodeConverter.Common;
diff --git a/CommandLine/CodeConv.NetFramework/CodeConv.NetFramework.csproj b/CommandLine/CodeConv.NetFramework/CodeConv.NetFramework.csproj
deleted file mode 100644
index 9a6f970b5..000000000
--- a/CommandLine/CodeConv.NetFramework/CodeConv.NetFramework.csproj
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
- Exe
- net472
- ICSharpCode.CodeConverter.CodeConv.NetFramework
- ICSharpCode.CodeConverter.CodeConv.NetFramework
- codeconv
- enable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CommandLine/CodeConv.NetFramework/CodeConvProgram.NetFramework.cs b/CommandLine/CodeConv.NetFramework/CodeConvProgram.NetFramework.cs
deleted file mode 100644
index 299766237..000000000
--- a/CommandLine/CodeConv.NetFramework/CodeConvProgram.NetFramework.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ICSharpCode.CodeConverter.CommandLine;
-
-public partial class CodeConvProgram
-{
- private static readonly bool _runningInNetCore = false;
-}
\ No newline at end of file
diff --git a/CommandLine/CodeConv.Shared/CodeConv.Shared.projitems b/CommandLine/CodeConv.Shared/CodeConv.Shared.projitems
deleted file mode 100644
index 23003736b..000000000
--- a/CommandLine/CodeConv.Shared/CodeConv.Shared.projitems
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- true
- d3a957ff-dafc-4265-9ae2-d94f6473411a
-
-
- CodeConv.Shared
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CommandLine/CodeConv.Shared/CodeConv.Shared.shproj b/CommandLine/CodeConv.Shared/CodeConv.Shared.shproj
deleted file mode 100644
index 12a93d0cd..000000000
--- a/CommandLine/CodeConv.Shared/CodeConv.Shared.shproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- d3a957ff-dafc-4265-9ae2-d94f6473411a
- 14.0
-
-
-
-
-
-
-
-
diff --git a/CommandLine/CodeConv.Shared/MSBuildWorkspaceConverter.cs b/CommandLine/CodeConv.Shared/MSBuildWorkspaceConverter.cs
deleted file mode 100644
index d76cab893..000000000
--- a/CommandLine/CodeConv.Shared/MSBuildWorkspaceConverter.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.IO;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Threading;
-using System.Threading.Tasks;
-using CodeConv.Shared.Util;
-using ICSharpCode.CodeConverter.CommandLine.Util;
-using ICSharpCode.CodeConverter.CSharp;
-using ICSharpCode.CodeConverter.DotNetTool.Util;
-using ICSharpCode.CodeConverter.Common;
-using ICSharpCode.CodeConverter.Util;
-using ICSharpCode.CodeConverter.VB;
-using McMaster.Extensions.CommandLineUtils;
-using Microsoft.Build.Locator;
-using Microsoft.CodeAnalysis;
-using Microsoft.CodeAnalysis.Host.Mef;
-using Microsoft.CodeAnalysis.MSBuild;
-using Microsoft.VisualStudio.Threading;
-
-namespace ICSharpCode.CodeConverter.CommandLine;
-
-public sealed class MSBuildWorkspaceConverter : IDisposable
-{
- private readonly bool _bestEffortConversion;
- private readonly string _solutionFilePath;
- private readonly Dictionary _buildProps;
- private readonly AsyncLazy _workspace; //Cached to avoid NullRef from OptionsService when initialized concurrently (e.g. in our tests)
- private AsyncLazy? _cachedSolution; //Cached for performance of tests
- private readonly bool _isNetCore;
- private Version? _versionUsed;
-
- public MSBuildWorkspaceConverter(string solutionFilePath, bool isNetCore, JoinableTaskFactory joinableTaskFactory, bool bestEffortConversion = false, Dictionary? buildProps = null)
- {
- _bestEffortConversion = bestEffortConversion;
- _buildProps = buildProps ?? new Dictionary();
- _buildProps.TryAdd("Configuration", "Debug");
- _buildProps.TryAdd("Platform", "AnyCPU");
- _solutionFilePath = solutionFilePath;
- _isNetCore = isNetCore;
- _workspace = new AsyncLazy(() => CreateWorkspaceAsync(_buildProps), joinableTaskFactory);
- }
-
- public async IAsyncEnumerable ConvertProjectsWhereAsync(Func shouldConvertProject, Language? targetLanguage, IProgress progress, [EnumeratorCancellation] CancellationToken token)
- {
- var strProgress = new Progress(s => progress.Report(new ConversionProgress(s)));
-#pragma warning disable VSTHRD012 // Provide JoinableTaskFactory where allowed - Shouldn't need main thread, and I can't access ThreadHelper without referencing VS shell.
- _cachedSolution ??= new AsyncLazy(async () => await GetSolutionAsync(_solutionFilePath, strProgress));
-#pragma warning restore VSTHRD012 // Provide JoinableTaskFactory where allowed
- var solution = await _cachedSolution.GetValueAsync();
-
- if (!targetLanguage.HasValue) {
- targetLanguage = solution.Projects.Any(p => p.Language == LanguageNames.VisualBasic) ? Language.CS : Language.VB;
- }
-
- var languageConversion = targetLanguage == Language.CS
- ? (ILanguageConversion)new VBToCSConversion()
- : new CSToVBConversion();
- languageConversion.ConversionOptions = new ConversionOptions {AbandonOptionalTasksAfter = TimeSpan.FromHours(4)};
- var languageNameToConvert = targetLanguage == Language.CS
- ? LanguageNames.VisualBasic
- : LanguageNames.CSharp;
-
- var projectsToConvert = solution.Projects.Where(p => p.Language == languageNameToConvert && shouldConvertProject(p)).ToArray();
- var results = SolutionConverter.CreateFor(languageConversion, projectsToConvert, progress, token).ConvertAsync();
- await foreach (var r in results.WithCancellation(token)) yield return r;
- }
-
- private async Task GetSolutionAsync(string projectOrSolutionFile, IProgress progress)
- {
- progress.Report($"Running dotnet restore on {projectOrSolutionFile}");
- await RestorePackagesForSolutionAsync(projectOrSolutionFile);
-
- var workspace = await _workspace.GetValueAsync();
- var solution = string.Equals(Path.GetExtension(projectOrSolutionFile), ".sln", StringComparison.OrdinalIgnoreCase) ? await workspace.OpenSolutionAsync(projectOrSolutionFile)
- : (await workspace.OpenProjectAsync(projectOrSolutionFile)).Solution;
-
- var errorString = await GetCompilationErrorsAsync(solution.Projects);
- if (string.IsNullOrEmpty(errorString)) return solution;
- errorString = " " + errorString.Replace(Environment.NewLine, Environment.NewLine + " ");
- progress.Report($"Compilation errors found before conversion.:{Environment.NewLine}{errorString}");
-
- bool wrongFramework = new[] { "Type 'System.Void' is not defined", "is missing from assembly" }.Any(errorString.Contains);
- if (_bestEffortConversion) {
- progress.Report("Attempting best effort conversion on broken input due to override");
- } else if (wrongFramework && _isNetCore) {
- throw CreateException($"Compiling with dotnet core caused compilation errors, install VS2019+ or use the option `{CodeConvProgram.CoreOptionDefinition} false` to force attempted conversion with older versions (not recommended)", errorString);
- } else if (wrongFramework && !_isNetCore) {
- throw CreateException($"Compiling with .NET Framework MSBuild caused compilation errors, use the {CodeConvProgram.CoreOptionDefinition} true option if this is a .NET core only solution", errorString);
- } else {
- throw CreateException("Fix compilation errors before conversion for an accurate conversion, or as a last resort, use the best effort conversion option", errorString);
- }
- return solution;
-
- ValidationException CreateException(string mainMessage, string fullDetail) {
- var versionUsedString = _versionUsed != null ? $"Used MSBuild {_versionUsed}.{Environment.NewLine}" : "";
- return new ValidationException($"{mainMessage}:{Environment.NewLine}{versionUsedString}{fullDetail}{Environment.NewLine}{mainMessage}");
- }
- }
-
- private async Task GetCompilationErrorsAsync(
- IEnumerable projectsToConvert)
- {
- var workspaceErrors = (await _workspace.GetValueAsync()).Diagnostics.GetErrorString();
- var errors = await projectsToConvert.ParallelSelectAwaitAsync(async x => {
- var c = await x.GetCompilationAsync() ?? throw new InvalidOperationException($"Compilation could not be created for {x.Language}");
- return new[] { CompilationWarnings.WarningsForCompilation(c, c.AssemblyName) };
- }, Env.MaxDop).ToArrayAsync();
- var errorString = string.Join("\r\n", workspaceErrors.Yield().Concat(errors.SelectMany(w => w)).Where(w => w != null));
- return errorString;
- }
-
- private static async Task RestorePackagesForSolutionAsync(string solutionFile)
- {
- var restoreExitCode = await ProcessRunner.ConnectConsoleGetExitCodeAsync(DotNetExe.FullPathOrDefault(), "restore", solutionFile);
- if (restoreExitCode != 0) throw new ValidationException("dotnet restore had a non-zero exit code.");
- }
-
- private async Task CreateWorkspaceAsync(Dictionary buildProps)
- {
- if (MSBuildLocator.CanRegister) {
- var instances = MSBuildLocator.QueryVisualStudioInstances().ToArray();
- var instance = instances.OrderByDescending(x => x.Version).FirstOrDefault()
- ?? throw new ValidationException("No Visual Studio instance available");
- MSBuildLocator.RegisterInstance(instance);
- _versionUsed = instance.Version;
- AppDomain.CurrentDomain.UseVersionAgnosticAssemblyResolution();
- }
-
- var hostServices = await ThreadSafeWorkspaceHelper.CreateHostServicesAsync(MSBuildMefHostServices.DefaultAssemblies);
- return MSBuildWorkspace.Create(buildProps, hostServices);
- }
-
- public void Dispose()
- {
- if (_workspace.IsValueCreated) _workspace.GetValueAsync().Dispose();
- }
-}
\ No newline at end of file
diff --git a/CommandLine/CodeConv.Shared/Util/LooseAssemblyResolver.cs b/CommandLine/CodeConv.Shared/Util/LooseAssemblyResolver.cs
deleted file mode 100644
index adafbe450..000000000
--- a/CommandLine/CodeConv.Shared/Util/LooseAssemblyResolver.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Text;
-
-namespace CodeConv.Shared.Util
-{
- internal static class LooseAssemblyResolver
- {
- public void Install(this AppDomain appDomain) => appDomain.AssemblyResolve += LoadAnyVersion;
-
- private static Assembly? LoadAnyVersion(object sender, ResolveEventArgs args)
- {
- var requestedAssemblyName = new AssemblyName(args.Name);
- if (requestedAssemblyName.Version != null) {
- return Assembly.Load(new AssemblyName(requestedAssemblyName.Name) { CultureName = requestedAssemblyName.CultureName });
- }
- return null;
-
- }
- }
-}
diff --git a/CommandLine/CodeConv/CodeConvProgram.DotNetTool.cs b/CommandLine/CodeConv/CodeConvProgram.DotNetTool.cs
deleted file mode 100644
index 872b2a316..000000000
--- a/CommandLine/CodeConv/CodeConvProgram.DotNetTool.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace ICSharpCode.CodeConverter.CommandLine;
-
-public partial class CodeConvProgram
-{
- private static readonly bool _runningInNetCore = true;
-}
\ No newline at end of file
diff --git a/CommandLine/CodeConv/Properties/launchSettings.json b/CommandLine/CodeConv/Properties/launchSettings.json
deleted file mode 100644
index 5f2e7ad5a..000000000
--- a/CommandLine/CodeConv/Properties/launchSettings.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "profiles": {
- "RunDebug": {
- "commandName": "Project",
- "commandLineArgs": "--help",
- "workingDirectory": "$(ProjectDir)"
- },
- "InstallDebugTool": {
- "commandName": "Executable",
- "executablePath": "powershell",
- "commandLineArgs": "./Install-BuiltTool.ps1",
- "workingDirectory": "$(ProjectDir)"
- },
- "RunDebugTool": {
- "commandName": "Executable",
- "executablePath": "dotnet",
- "commandLineArgs": "codeconv",
- "workingDirectory": "$(ProjectDir)"
- }
- }
-}
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index 77d093885..a5378889f 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -2,15 +2,15 @@
false
true
- $(NoWarn);1998;NU5100
+ $(NoWarn);1998;NU1510;NU5100
true
- $(WarningsNotAsErrors);NU1605;NU1701;NU1901;NU1902;NU1903;NU1904
+ $(WarningsNotAsErrors);NU1605;NU1701;NU1901;NU1902;NU1903;NU1904;NU1510;NU1903;RS1039
4
true
10.0
- 9.2.7.0
- 9.2.7.0
- 9.2.7
+ 10.0.0.0
+ 10.0.0.0
+ 10.0.0
ICSharpCode
Copyright (c) 2017-2023 AlphaSierraPapa for the CodeConverter team
ICSharpCode
diff --git a/DotNetBuildable.slnf b/DotNetBuildable.slnf
index e7b42845c..226b04e38 100644
--- a/DotNetBuildable.slnf
+++ b/DotNetBuildable.slnf
@@ -3,9 +3,7 @@
"path": "CodeConverter.sln",
"projects": [
"CodeConverter\\CodeConverter.csproj",
- "CommandLine\\CodeConv.NetFramework\\CodeConv.NetFramework.csproj",
- "CommandLine\\CodeConv.Shared\\CodeConv.Shared.shproj",
- "CommandLine\\CodeConv\\CodeConv.csproj",
+ "CodeConv\\CodeConv.csproj",
"Func\\Func.csproj",
"Tests\\Tests.csproj",
"Web\\Web.csproj"
diff --git a/Func/Func.csproj b/Func/Func.csproj
index 11d480017..f092ca925 100644
--- a/Func/Func.csproj
+++ b/Func/Func.csproj
@@ -7,12 +7,11 @@
disable
ICSharpCode.CodeConverter.Func
ICSharpCode.CodeConverter.Func
- <_FunctionsSkipCleanOutput>true
+ <_FunctionsSkipCleanOutput>true
-
@@ -23,20 +22,28 @@
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
diff --git a/Web/WebConverter.cs b/Func/WebConverter.cs
similarity index 100%
rename from Web/WebConverter.cs
rename to Func/WebConverter.cs
diff --git a/README.md b/README.md
index a7a7ae725..8826b11df 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ Convert code from VB.NET to C# (and vice versa) using Roslyn - all free and open
* [Visual Studio extension](https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.CodeConverter)
* To install close VS and double-click the downloadeded .vsix file
* [Online snippet converter](https://icsharpcode.github.io/CodeConverter/)
-* Command line `dotnet tool install ICSharpCode.CodeConverter.codeconv --global` (still requires VS2022 17.1+ installed)
+* Command line `dotnet tool install ICSharpCode.CodeConverter.codeconv --global` (still requires VS2026 18.0+ installed)
* [Nuget library](https://www.nuget.org/packages/ICSharpCode.CodeConverter/) (this underpins all other free converters you'll find online)
See [wiki](https://github.com/icsharpcode/CodeConverter/wiki) for advice on getting the best results, or the [changelog](https://github.com/icsharpcode/CodeConverter/blob/master/CHANGELOG.md) for recent improvements.
@@ -15,7 +15,7 @@ See [wiki](https://github.com/icsharpcode/CodeConverter/wiki) for advice on gett
Adds context menu items to convert projects/files between VB.NET and C#. See the [wiki documentation](https://github.com/icsharpcode/CodeConverter/wiki) for advice / help using it.
-Download from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.CodeConverter) (Use VS 2022 17.1+)
+Download from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.CodeConverter) (Use VS VS2026 18.0+)
* Flexible: Convert a small selection, or a whole solution in one go, in either direction.
* Accurate: Full project context (through Roslyn) is used to get the most accurate conversion.
@@ -47,10 +47,11 @@ Visual Basic .NET is slowly dying. It has support for *some* project types on .N
* Integrating the NuGet library
* See [CodeConversion.ConvertDocumentUnhandledAsync](https://github.com/icsharpcode/CodeConverter/blob/8226313a8d46d5dd73bd35f07af2212e6155d0fd/Vsix/CodeConversion.cs#L226) or [CodeConversion.ConvertProjectUnhandled](https://github.com/icsharpcode/CodeConverter/blob/daa741246770fabf9aa87cd75b753220306aaaaa/Vsix/CodeConversion.cs#L276-L279) in the VSIX project.
* See [ConverterController](https://github.com/icsharpcode/CodeConverter/blob/master/Web/ConverterController.cs) for a more web-focused API.
+* See older builds in [Releases](https://github.com/icsharpcode/CodeConverter/tags) if you need to convert net framework projects.
## Building/running from source
-1. Ensure you have [.NET Core SDK 6.0](https://dotnet.microsoft.com/download/dotnet-core/6.0)
+1. Ensure you have [.NET Core SDK 10.0](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)
2. Open the solution in Visual Studio 2022+ (Community edition is sufficient)
3. To run the website, set CodeConverter.Web as the startup project
* You will need [Node (LTS)](https://community.chocolatey.org/packages/nodejs-lts) 16.* (node 17 introduces a breaking change causing ERR_OSSL_EVP_UNSUPPORTED)
diff --git a/Tests/CSharp/CaseSensitivityTests.cs b/Tests/CSharp/CaseSensitivityTests.cs
index 383464187..de7502ec9 100644
--- a/Tests/CSharp/CaseSensitivityTests.cs
+++ b/Tests/CSharp/CaseSensitivityTests.cs
@@ -33,9 +33,9 @@ private void btnOK_Click(object sender, EventArgs e)
public partial class VBIsCaseInsensitive
{
- private System.Web.UI.WebControls.Button _btnOk;
+ private Global.System.Web.UI.WebControls.Button _btnOk;
- protected virtual System.Web.UI.WebControls.Button btnOk
+ protected virtual Global.System.Web.UI.WebControls.Button btnOk
{
[MethodImpl(MethodImplOptions.Synchronized)]
get
@@ -58,7 +58,14 @@ protected virtual System.Web.UI.WebControls.Button btnOk
}
}
}
-}");
+}
+3 source compilation errors:
+BC30002: Type 'System.Web.UI.Page' is not defined.
+BC30002: Type 'Global.System.Web.UI.WebControls.Button' is not defined.
+BC30590: Event 'Click' cannot be found.
+2 target compilation errors:
+CS0234: The type or namespace name 'UI' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
+CS0246: The type or namespace name 'Global.System.Web.UI.WebControls.Button' could not be found (are you missing a using directive or an assembly reference?)");
}
[Fact]
diff --git a/Tests/CSharp/ExpressionTests/ByRefTests.cs b/Tests/CSharp/ExpressionTests/ByRefTests.cs
index 536d224b9..a5badfd3c 100644
--- a/Tests/CSharp/ExpressionTests/ByRefTests.cs
+++ b/Tests/CSharp/ExpressionTests/ByRefTests.cs
@@ -764,33 +764,34 @@ public async Task Issue856Async()
await TestConversionVisualBasicToCSharpAsync(@"Public Class Issue856
Sub Main()
Dim decimalTarget As Decimal
- Double.TryParse(""123"", decimalTarget)
+ Double.TryParse(""123"".AsSpan(), decimalTarget)
Dim longTarget As Long
- Integer.TryParse(""123"", longTarget)
+ Integer.TryParse(""123"".AsSpan(), longTarget)
Dim intTarget As Integer
- Long.TryParse(""123"", intTarget)
+ Long.TryParse(""123"".AsSpan(), intTarget)
End Sub
-End Class", @"
+End Class", @"using System;
+
public partial class Issue856
{
public void Main()
{
var decimalTarget = default(decimal);
double argresult = (double)decimalTarget;
- double.TryParse(""123"", out argresult);
+ double.TryParse(""123"".AsSpan(), out argresult);
decimalTarget = (decimal)argresult;
var longTarget = default(long);
int argresult1 = (int)longTarget;
- int.TryParse(""123"", out argresult1);
+ int.TryParse(""123"".AsSpan(), out argresult1);
longTarget = argresult1;
var intTarget = default(int);
long argresult2 = intTarget;
- long.TryParse(""123"", out argresult2);
+ long.TryParse(""123"".AsSpan(), out argresult2);
intTarget = (int)argresult2;
}
diff --git a/Tests/CSharp/ExpressionTests/ExpressionTests.cs b/Tests/CSharp/ExpressionTests/ExpressionTests.cs
index 1595a234d..ed6513a2d 100644
--- a/Tests/CSharp/ExpressionTests/ExpressionTests.cs
+++ b/Tests/CSharp/ExpressionTests/ExpressionTests.cs
@@ -319,7 +319,7 @@ public void Rounding()
}
}
1 target compilation errors:
-CS1503: Argument 1: cannot convert from 'object' to 'double'");
+CS1503: Argument 1: cannot convert from 'object' to 'decimal'");
}
[Fact]
@@ -572,11 +572,13 @@ public partial class VisualBasicClass
public VisualBasicClass()
{
- SomeDateDateNothing = string.IsNullOrEmpty(Conversions.ToString(SomeDate)) ? default : DateTime.Parse(Conversions.ToString(SomeDate));
+ SomeDateDateNothing = string.IsNullOrEmpty(Conversions.ToString(SomeDate)) ? (object)null : DateTime.Parse(SomeDate);
isNotNothing = SomeDateDateNothing is not null;
isSomething = new DateTime() is var arg1 && SomeDateDateNothing.HasValue ? SomeDateDateNothing.Value == arg1 : (bool?)null;
}
-}");
+}
+1 target compilation errors:
+CS1503: Argument 1: cannot convert from 'object' to 'string'");
}
[Fact]
diff --git a/Tests/CSharp/ExpressionTests/LinqExpressionTests.cs b/Tests/CSharp/ExpressionTests/LinqExpressionTests.cs
index 8e3153fad..d180480fe 100644
--- a/Tests/CSharp/ExpressionTests/LinqExpressionTests.cs
+++ b/Tests/CSharp/ExpressionTests/LinqExpressionTests.cs
@@ -388,7 +388,8 @@ Public Shared Sub X(objs As List(Of Object))
Dim MaxObj As Integer = Aggregate o In objs Into Max(o.GetHashCode())
Dim CountWhereObj As Integer = Aggregate o In objs Where o.GetHashCode() > 3 Into Count()
End Sub
-End Class", @"using System.Collections.Generic;
+End Class", @"using System;
+using System.Collections.Generic;
using System.Linq;
public partial class VisualBasicClass
@@ -611,7 +612,8 @@ Sub Foo()
Dim xs As New List(Of String)
Dim y = From x In xs Group By x.Length, x.Count() Into Group
End Sub
-End Class", @"using System.Collections.Generic;
+End Class", @"using System;
+using System.Collections.Generic;
using System.Linq;
public partial class Class1
diff --git a/Tests/CSharp/ExpressionTests/StringExpressionTests.cs b/Tests/CSharp/ExpressionTests/StringExpressionTests.cs
index 73e07b5d6..60cd54222 100644
--- a/Tests/CSharp/ExpressionTests/StringExpressionTests.cs
+++ b/Tests/CSharp/ExpressionTests/StringExpressionTests.cs
@@ -504,6 +504,7 @@ Public Sub TestEnumConcat()
End Sub
End Class",
@"using System;
+using System.IO;
public partial class EnumTests
{
diff --git a/Tests/CSharp/ExpressionTests/XmlExpressionTests.cs b/Tests/CSharp/ExpressionTests/XmlExpressionTests.cs
index aa064b419..d059ca7cf 100644
--- a/Tests/CSharp/ExpressionTests/XmlExpressionTests.cs
+++ b/Tests/CSharp/ExpressionTests/XmlExpressionTests.cs
@@ -116,22 +116,22 @@ private void TestMethod()
{
var catalog = new XDocument(
new XElement(""Catalog"",
-new XElement(""Book"", new XAttribute(""id"", ""bk101""),
-new XElement(""Author"", ""Garghentini, Davide""),
-new XElement(""Title"", ""XML Developer's Guide""),
-new XElement(""Price"", ""44.95""),
-new XElement(""Description"", @""
+ new XElement(""Book"", new XAttribute(""id"", ""bk101""),
+ new XElement(""Author"", ""Garghentini, Davide""),
+ new XElement(""Title"", ""XML Developer's Guide""),
+ new XElement(""Price"", ""44.95""),
+ new XElement(""Description"", @""
An in-depth look at creating applications
with "", new XElement(""technology"", ""XML""), @"". For
"", new XElement(""audience"", ""beginners""), @"" or
"", new XElement(""audience"", ""advanced""), @"" developers.
"")
-),
-new XElement(""Book"", new XAttribute(""id"", ""bk331""),
-new XElement(""Author"", ""Spencer, Phil""),
-new XElement(""Title"", ""Developing Applications with Visual Basic .NET""),
-new XElement(""Price"", ""45.95""),
-new XElement(""Description"", @""
+ ),
+ new XElement(""Book"", new XAttribute(""id"", ""bk331""),
+ new XElement(""Author"", ""Spencer, Phil""),
+ new XElement(""Title"", ""Developing Applications with Visual Basic .NET""),
+ new XElement(""Price"", ""45.95""),
+ new XElement(""Description"", @""
Get the expert insights, practical code samples,
and best practices you need
to advance your expertise with "", new XElement(""technology"", @""Visual
@@ -140,23 +140,21 @@ and best practices you need
based on professional,
pragmatic guidance by today's top "", new XElement(""audience"", ""developers""), @"".
"")
-)
+ )
)
);
var htmlOutput = new XElement(""html"",
-
new XElement(""body"", from book in catalog.Elements(""Catalog"").Elements(""Book"")
select new XElement(""div"",
- new XElement(""h1"", book.Elements(""Title"").Value),
- new XElement(""h3"", ""By "" + book.Elements(""Author"").Value),
- new XElement(""h3"", ""Price = "" + book.Elements(""Price"").Value),
-
+ new XElement(""h1"", book.Elements(""Title"").Value),
+ new XElement(""h3"", ""By "" + book.Elements(""Author"").Value),
+ new XElement(""h3"", ""Price = "" + book.Elements(""Price"").Value),
new XElement(""h2"", ""Description""), TransformDescription((string)book.Elements(""Description"").ElementAtOrDefault(0)), new XElement(""hr"")
- )
- )
- );
+ )
+ )
+ );
}
public string TransformDescription(string s)
diff --git a/Tests/CSharp/MemberTests/MemberTests.cs b/Tests/CSharp/MemberTests/MemberTests.cs
index c43138a57..71d5186f5 100644
--- a/Tests/CSharp/MemberTests/MemberTests.cs
+++ b/Tests/CSharp/MemberTests/MemberTests.cs
@@ -1154,7 +1154,7 @@ await TestConversionVisualBasicToCSharpAsync(
@"
Private Shared Function OpenProcess(ByVal dwDesiredAccess As AccessMask, ByVal bInheritHandle As Boolean, ByVal dwProcessId As UInteger) As IntPtr
End Function", @"[DllImport(""kernel32.dll"", SetLastError = true)]
-private static extern IntPtr OpenProcess(AccessMask dwDesiredAccess, bool bInheritHandle, uint dwProcessId);
+private static extern nint OpenProcess(AccessMask dwDesiredAccess, bool bInheritHandle, uint dwProcessId);
1 source compilation errors:
BC30002: Type 'AccessMask' is not defined.
@@ -1529,7 +1529,7 @@ private void OptionalByRefWithDefault([Optional][DefaultParameterValue(""a"")] r
BC30455: Argument not specified for parameter 'str2' of 'Private Sub OptionalByRefNoDefault(ByRef str2 As String)'.
BC30455: Argument not specified for parameter 'str3' of 'Private Sub OptionalByRefWithDefault(ByRef str3 As String)'.
1 target compilation errors:
-CS7036: There is no argument given that corresponds to the required formal parameter 'str1' of 'MissingByRefArgumentWithNoExplicitDefaultValue.ByRefNoDefault(ref string)'
+CS7036: There is no argument given that corresponds to the required parameter 'str1' of 'MissingByRefArgumentWithNoExplicitDefaultValue.ByRefNoDefault(ref string)'
");
}
}
\ No newline at end of file
diff --git a/Tests/CSharp/MissingSemanticModelInfo/ExpressionTests.cs b/Tests/CSharp/MissingSemanticModelInfo/ExpressionTests.cs
index 32b73591e..8c387cc85 100644
--- a/Tests/CSharp/MissingSemanticModelInfo/ExpressionTests.cs
+++ b/Tests/CSharp/MissingSemanticModelInfo/ExpressionTests.cs
@@ -103,7 +103,8 @@ Sub Foo()
Next
End Sub
-End Class", @"
+End Class", @"using System.Linq;
+
public partial class Class1
{
public void Foo()
diff --git a/Tests/CSharp/MultiFileSolutionAndProjectTests.cs b/Tests/CSharp/MultiFileSolutionAndProjectTests.cs
index dbf97a1f6..26ba8433c 100644
--- a/Tests/CSharp/MultiFileSolutionAndProjectTests.cs
+++ b/Tests/CSharp/MultiFileSolutionAndProjectTests.cs
@@ -18,14 +18,14 @@ public MultiFileSolutionAndProjectTests(MultiFileTestFixture multiFileTestFixtur
_multiFileTestFixture = multiFileTestFixture;
}
- [Fact(Skip = "CI system cannot run this at the moment due to installed SDK versions")]
+ [Fact()]
public async Task ConvertWholeSolutionAsync()
{
await _multiFileTestFixture.ConvertProjectsWhereAsync(p => true, Language.CS);
}
- [Fact(Skip= "CI system cannot run this at the moment due to installed SDK versions")]
+ [Fact()]
public async Task ConvertVbLibraryOnlyAsync()
{
await _multiFileTestFixture.ConvertProjectsWhereAsync(p => p.Name == "VbLibrary", Language.CS);
diff --git a/Tests/CSharp/NamespaceLevelTests.cs b/Tests/CSharp/NamespaceLevelTests.cs
index 6698bfafe..81a8c20b6 100644
--- a/Tests/CSharp/NamespaceLevelTests.cs
+++ b/Tests/CSharp/NamespaceLevelTests.cs
@@ -427,7 +427,7 @@ internal partial class test : IComparable
1 source compilation errors:
BC30149: Class 'test' must implement 'Function CompareTo(obj As Object) As Integer' for interface 'IComparable'.
1 target compilation errors:
-CS0535: 'test' does not implement interface member 'IComparable.CompareTo(object)'");
+CS0535: 'test' does not implement interface member 'IComparable.CompareTo(object?)'");
}
[Fact]
@@ -444,7 +444,7 @@ internal partial class ClassImplementsInterface2 : IComparable
1 source compilation errors:
BC30149: Class 'ClassImplementsInterface2' must implement 'Function CompareTo(obj As Object) As Integer' for interface 'IComparable'.
1 target compilation errors:
-CS0535: 'ClassImplementsInterface2' does not implement interface member 'IComparable.CompareTo(object)'");
+CS0535: 'ClassImplementsInterface2' does not implement interface member 'IComparable.CompareTo(object?)'");
}
[Fact]
diff --git a/Tests/CSharp/StatementTests/MethodStatementTests.cs b/Tests/CSharp/StatementTests/MethodStatementTests.cs
index b2f39e433..39bfd1c73 100644
--- a/Tests/CSharp/StatementTests/MethodStatementTests.cs
+++ b/Tests/CSharp/StatementTests/MethodStatementTests.cs
@@ -291,7 +291,7 @@ internal partial class TestClass
private void TestMethod()
{
string b;
- b = new string(""test"".ToCharArray());
+ b = new string(""test"");
}
}");
}
@@ -325,7 +325,7 @@ internal partial class TestClass
{
private void TestMethod()
{
- string b = new string(""test"".ToCharArray());
+ string b = new string(""test"");
}
}");
}
@@ -342,7 +342,7 @@ internal partial class TestClass
{
private void TestMethod()
{
- string b = new string(""test"".ToCharArray());
+ string b = new string(""test"");
}
}");
}
@@ -608,7 +608,7 @@ public static void Main()
{
y._x = 1;
Console.Write(y._x);
- y = (TestWithForEachClass)null;
+ y = null;
}
}
}
diff --git a/Tests/CSharp/TypeCastTests.cs b/Tests/CSharp/TypeCastTests.cs
index cace3a478..83c59f19f 100644
--- a/Tests/CSharp/TypeCastTests.cs
+++ b/Tests/CSharp/TypeCastTests.cs
@@ -1355,7 +1355,7 @@ internal partial class CharTestClass
{
private string[] QuoteSplit(string text)
{
- return text.Split('""');
+ return text.Split(""\"""");
}
}");
}
@@ -1553,7 +1553,7 @@ private static T GenericFunctionWithCast()
}
private static T GenericFunctionWithCastThatExistsInCsharp() where T : TestGenericCast
{
- return (T)new TestGenericCast();
+ return Conversions.ToGenericParameter(new TestGenericCast());
}
}");
}
diff --git a/Tests/Compilation/CompilerExtensions.cs b/Tests/Compilation/CompilerExtensions.cs
index d89343f76..96a82f0ed 100644
--- a/Tests/Compilation/CompilerExtensions.cs
+++ b/Tests/Compilation/CompilerExtensions.cs
@@ -2,6 +2,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
+using System.Text;
using ICSharpCode.CodeConverter.Common;
using Microsoft.CodeAnalysis;
@@ -15,6 +16,10 @@ public static class CompilerExtensions
/// The transitive closure of the references for are added.
public static Assembly AssemblyFromCode(this ICompiler compiler, SyntaxTree syntaxTree, params Assembly[] requiredAssemblies)
{
+ // Register CodePages encoding provider for Windows-1252 and other code pages
+ // This is needed for VB.NET Chr() function which relies on code page specific encodings
+ Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
+
var allReferences = DefaultReferences.With(requiredAssemblies);
var compilation = compiler.CreateCompilationFromTree(syntaxTree, allReferences);
diff --git a/Tests/LanguageAgnostic/ParallelSelectAwaitTests.cs b/Tests/LanguageAgnostic/ParallelSelectAwaitTests.cs
index 0e8223057..cee31f3a9 100644
--- a/Tests/LanguageAgnostic/ParallelSelectAwaitTests.cs
+++ b/Tests/LanguageAgnostic/ParallelSelectAwaitTests.cs
@@ -19,7 +19,7 @@ public async Task ExceptionDoesNotHaltPipelineAsync()
return i > 3 ? i : throw new ObjectDisposedException("Original");
}, MaxDop);
- Assert.Throws(() => asyncEnumerable.ToArrayAsync().GetAwaiter().GetResult());
+ await Assert.ThrowsAsync(async () => await asyncEnumerable.ToArrayAsync());
}
[Fact]
@@ -30,7 +30,7 @@ public async Task ExceptionDoesNotHaltPipelineSyncAsync()
, MaxDop
);
- Assert.Throws(() => asyncEnumerable.ToArrayAsync().GetAwaiter().GetResult());
+ await Assert.ThrowsAsync(async () => await asyncEnumerable.ToArrayAsync());
}
[Fact]
diff --git a/Tests/LanguageAgnostic/ProjectFileTextEditorTests.cs b/Tests/LanguageAgnostic/ProjectFileTextEditorTests.cs
index 74d7da13b..fcd85e53e 100644
--- a/Tests/LanguageAgnostic/ProjectFileTextEditorTests.cs
+++ b/Tests/LanguageAgnostic/ProjectFileTextEditorTests.cs
@@ -1,5 +1,4 @@
-using System.Web.UI.WebControls;
-using System.Xml.Linq;
+using System.Xml.Linq;
using System;
using ICSharpCode.CodeConverter.Common;
using Xunit;
diff --git a/Tests/TestConstants.cs b/Tests/TestConstants.cs
index 1c26a4128..4fa077c9c 100644
--- a/Tests/TestConstants.cs
+++ b/Tests/TestConstants.cs
@@ -19,8 +19,8 @@ public static class TestConstants
public static string GetTestDataDirectory()
{
var assembly = Assembly.GetExecutingAssembly();
- var solutionDir = new FileInfo(new Uri(assembly.CodeBase).LocalPath).Directory?.Parent?.Parent ??
- throw new InvalidOperationException(assembly.CodeBase);
+ var solutionDir = new FileInfo(new Uri(assembly.Location).LocalPath).Directory?.Parent?.Parent ??
+ throw new InvalidOperationException(assembly.Location);
return Path.Combine(solutionDir.FullName, "TestData");
}
}
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/CharacterizationTestSolution.sln
index 8ea27f224..2139fcfeb 100644
--- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/CharacterizationTestSolution.sln
+++ b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/CharacterizationTestSolution.sln
@@ -1,10 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.9.34321.82
+# Visual Studio Version 18
+VisualStudioVersion = 18.0.11205.157
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WindowsAppVb", "WindowsAppVb\WindowsAppVb.vbproj", "{D18AB89D-1897-4779-A937-F48661E0B6B8}"
-EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CSharpConsoleApp", "ConsoleApp2\CSharpConsoleApp.vbproj", "{0544AF3F-431D-0235-0AED-2B62BEE9BFE1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore", "NetCore\NetCore.csproj", "{73BF583C-DD55-486C-9D0F-15D3D8CC72D9}"
@@ -24,7 +22,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpNetStandardLib", "CSh
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Prefix.VbLibrary", "Prefix.VbLibrary\Prefix.VbLibrary.vbproj", "{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}"
EndProject
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.vbproj", "{C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}"
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WinFormsAppVb", "WinFormsAppVb\WinFormsAppVb.vbproj", "{39455F38-4197-4C3A-BB70-4E647A538BBE}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "VisualBasicConsoleApp\VisualBasicConsoleApp.vbproj", "{C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -32,10 +32,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.Build.0 = Release|Any CPU
{0544AF3F-431D-0235-0AED-2B62BEE9BFE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0544AF3F-431D-0235-0AED-2B62BEE9BFE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0544AF3F-431D-0235-0AED-2B62BEE9BFE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -64,10 +60,14 @@ Global
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.Build.0 = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp1/VisualBasicConsoleApp.vbproj b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp1/VisualBasicConsoleApp.vbproj
deleted file mode 100644
index 98ea9f5e0..000000000
--- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp1/VisualBasicConsoleApp.vbproj
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}
- Exe
- ConsoleApp1.Module1
- ConsoleApp1
- ConsoleApp1
- 512
- Console
- v4.8
- true
-
-
-
- AnyCPU
- true
- full
- true
- true
- bin\Debug\
- ConsoleApp1.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- AnyCPU
- pdbonly
- false
- true
- true
- bin\Release\
- ConsoleApp1.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- On
-
-
- Binary
-
-
- Off
-
-
- On
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
- True
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
-
- {0544AF3F-431D-0235-0AED-2B62BEE9BFE1}
- CSharpConsoleApp
-
-
-
-
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp2/CSharpConsoleApp.vbproj b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp2/CSharpConsoleApp.vbproj
index 243965614..aedd6664c 100644
--- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp2/CSharpConsoleApp.vbproj
+++ b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp2/CSharpConsoleApp.vbproj
@@ -1,64 +1,20 @@
-
-
-
+
On
- Debug
- AnyCPU
- {0544AF3F-431D-0235-0AED-2B62BEE9BFE1}
+ net10.0
Exe
ConsoleApp2
- v4.8
- 512
- true
-
+ false
$(DefaultItemExcludes);$(ProjectDir)**\*.cs
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG,TRACE
- prompt
- 4
- ConsoleApp2.xml
+ bin\Debug\ConsoleApp2.xml
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
- {4de39d59-19c6-4e1e-910c-5ea8ba55348b}
- CSharpNetStandardLib
-
+
-
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp2/Properties/AssemblyInfo.vb b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp2/Properties/AssemblyInfo.vb
deleted file mode 100644
index 971b5e0bd..000000000
--- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/ConsoleApp2/Properties/AssemblyInfo.vb
+++ /dev/null
@@ -1,35 +0,0 @@
-Imports System.Reflection
-Imports System.Runtime.InteropServices
-
-' General Information about an assembly is controlled through the following
-' set of attributes. Change these attribute values to modify the information
-' associated with an assembly.
-
-
-
-
-
-
-
-
-
-' Setting ComVisible to false makes the types in this assembly not visible
-' to COM components. If you need to access a type in this assembly from
-' COM, set the ComVisible attribute to true on that type.
-
-
-' The following GUID is for the ID of the typelib if this project is exposed to COM
-
-
-' Version information for an assembly consists of the following four values:
-'
-' Major Version
-' Minor Version
-' Build Number
-' Revision
-'
-' You can specify all the values or you can default the Build and Revision Numbers
-' by using the '*' as shown below:
-' [assembly: AssemblyVersion("1.0.*")]
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/VisualBasicConsoleApp/VisualBasicConsoleApp.vbproj b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/VisualBasicConsoleApp/VisualBasicConsoleApp.vbproj
new file mode 100644
index 000000000..7d82f25bb
--- /dev/null
+++ b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/VisualBasicConsoleApp/VisualBasicConsoleApp.vbproj
@@ -0,0 +1,13 @@
+
+
+
+ Exe
+ VisualBasicConsoleApp
+ net10.0
+
+
+
+
+
+
+
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CharacterizationTestSolution.sln
index d462a1431..56531a012 100644
--- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CharacterizationTestSolution.sln
+++ b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CharacterizationTestSolution.sln
@@ -1,10 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.9.34321.82
+# Visual Studio Version 18
+VisualStudioVersion = 18.0.11205.157
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WindowsAppVb", "WindowsAppVb\WindowsAppVb.vbproj", "{D18AB89D-1897-4779-A937-F48661E0B6B8}"
-EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CSharpConsoleApp", "ConsoleApp2\CSharpConsoleApp.vbproj", "{0544AF3F-431D-0235-0AED-2B62BEE9BFE1}"
EndProject
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "NetCore", "NetCore\NetCore.vbproj", "{C19BD957-110D-079D-1F57-DFADBA5B4679}"
@@ -24,7 +22,9 @@ Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "CSharpNetStandardLib", "CSh
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Prefix.VbLibrary", "Prefix.VbLibrary\Prefix.VbLibrary.vbproj", "{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}"
EndProject
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.vbproj", "{C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}"
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WinFormsAppVb", "WinFormsAppVb\WinFormsAppVb.vbproj", "{39455F38-4197-4C3A-BB70-4E647A538BBE}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "VisualBasicConsoleApp\VisualBasicConsoleApp.vbproj", "{C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -32,10 +32,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.Build.0 = Release|Any CPU
{0544AF3F-431D-0235-0AED-2B62BEE9BFE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0544AF3F-431D-0235-0AED-2B62BEE9BFE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0544AF3F-431D-0235-0AED-2B62BEE9BFE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -64,10 +60,14 @@ Global
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.Build.0 = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp1/VisualBasicConsoleApp.vbproj b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp1/VisualBasicConsoleApp.vbproj
deleted file mode 100644
index 98ea9f5e0..000000000
--- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp1/VisualBasicConsoleApp.vbproj
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}
- Exe
- ConsoleApp1.Module1
- ConsoleApp1
- ConsoleApp1
- 512
- Console
- v4.8
- true
-
-
-
- AnyCPU
- true
- full
- true
- true
- bin\Debug\
- ConsoleApp1.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- AnyCPU
- pdbonly
- false
- true
- true
- bin\Release\
- ConsoleApp1.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- On
-
-
- Binary
-
-
- Off
-
-
- On
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
- True
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
-
- {0544AF3F-431D-0235-0AED-2B62BEE9BFE1}
- CSharpConsoleApp
-
-
-
-
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp2/CSharpConsoleApp.vbproj b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp2/CSharpConsoleApp.vbproj
index 784de34a0..e25f79f46 100644
--- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp2/CSharpConsoleApp.vbproj
+++ b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp2/CSharpConsoleApp.vbproj
@@ -1,64 +1,20 @@
-
-
-
+
On
- Debug
- AnyCPU
- {0544AF3F-431D-0235-0AED-2B62BEE9BFE1}
+ net10.0
Exe
ConsoleApp2
- v4.8
- 512
- true
-
+ false
$(DefaultItemExcludes);$(ProjectDir)**\*.cs
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG,TRACE
- prompt
- 4
- ConsoleApp2.xml
+ bin\Debug\ConsoleApp2.xml
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
- {FFC71C32-D59E-01EF-1354-94D6D8C2002B}
- CSharpNetStandardLib
-
+
-
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp2/Properties/AssemblyInfo.vb b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp2/Properties/AssemblyInfo.vb
deleted file mode 100644
index 971b5e0bd..000000000
--- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/ConsoleApp2/Properties/AssemblyInfo.vb
+++ /dev/null
@@ -1,35 +0,0 @@
-Imports System.Reflection
-Imports System.Runtime.InteropServices
-
-' General Information about an assembly is controlled through the following
-' set of attributes. Change these attribute values to modify the information
-' associated with an assembly.
-
-
-
-
-
-
-
-
-
-' Setting ComVisible to false makes the types in this assembly not visible
-' to COM components. If you need to access a type in this assembly from
-' COM, set the ComVisible attribute to true on that type.
-
-
-' The following GUID is for the ID of the typelib if this project is exposed to COM
-
-
-' Version information for an assembly consists of the following four values:
-'
-' Major Version
-' Minor Version
-' Build Number
-' Revision
-'
-' You can specify all the values or you can default the Build and Revision Numbers
-' by using the '*' as shown below:
-' [assembly: AssemblyVersion("1.0.*")]
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/NetCore/NetCore.vbproj b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/NetCore/NetCore.vbproj
index 7dac1f19e..e76054599 100644
--- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/NetCore/NetCore.vbproj
+++ b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/NetCore/NetCore.vbproj
@@ -2,7 +2,7 @@
On
Exe
- net472
+ net10.0
$(DefaultItemExcludes);$(ProjectDir)**\*.cs
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/VisualBasicConsoleApp/VisualBasicConsoleApp.vbproj b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/VisualBasicConsoleApp/VisualBasicConsoleApp.vbproj
new file mode 100644
index 000000000..7d82f25bb
--- /dev/null
+++ b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/VisualBasicConsoleApp/VisualBasicConsoleApp.vbproj
@@ -0,0 +1,13 @@
+
+
+
+ Exe
+ VisualBasicConsoleApp
+ net10.0
+
+
+
+
+
+
+
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/SourceFiles/CharacterizationTestSolution.sln
index 62d9b2f64..7564beaca 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/CharacterizationTestSolution.sln
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/CharacterizationTestSolution.sln
@@ -1,10 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.9.34321.82
+# Visual Studio Version 18
+VisualStudioVersion = 18.0.11205.157
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WindowsAppVb", "WindowsAppVb\WindowsAppVb.vbproj", "{D18AB89D-1897-4779-A937-F48661E0B6B8}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpConsoleApp", "ConsoleApp2\CSharpConsoleApp.csproj", "{B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore", "NetCore\NetCore.csproj", "{73BF583C-DD55-486C-9D0F-15D3D8CC72D9}"
@@ -24,7 +22,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpNetStandardLib", "CSh
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Prefix.VbLibrary", "Prefix.VbLibrary\Prefix.VbLibrary.vbproj", "{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}"
EndProject
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.vbproj", "{C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}"
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WinFormsAppVb", "WinFormsAppVb\WinFormsAppVb.vbproj", "{39455F38-4197-4C3A-BB70-4E647A538BBE}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "VisualBasicConsoleApp\VisualBasicConsoleApp.vbproj", "{C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -32,10 +32,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.Build.0 = Release|Any CPU
{B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -64,10 +60,14 @@ Global
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.Build.0 = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Application.Designer.cs b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Application.Designer.cs
deleted file mode 100644
index fe8d8ce90..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Application.Designer.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-
-using System.Threading.Tasks;
-using System.Data;
-using System.Diagnostics;
-using Microsoft.VisualBasic;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections;
-using System;
-using System.Xml.Linq;
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Application.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Application.Designer.vb
deleted file mode 100644
index 88dd01c78..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Application.Designer.vb
+++ /dev/null
@@ -1,13 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' This code was generated by a tool.
-' Runtime Version:4.0.30319.42000
-'
-' Changes to this file may cause incorrect behavior and will be lost if
-' the code is regenerated.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Application.myapp b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Application.myapp
deleted file mode 100644
index e62f1a533..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Application.myapp
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- false
- false
- 0
- true
- 0
- 2
- true
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/AssemblyInfo.cs b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/AssemblyInfo.cs
deleted file mode 100644
index 5f579fc18..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/AssemblyInfo.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System.Threading.Tasks;
-using System.Data;
-using System.Diagnostics;
-using Microsoft.VisualBasic;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections;
-using System;
-using System.Xml.Linq;
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("ConsoleApp1")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ConsoleApp1")]
-[assembly: AssemblyCopyright("Copyright © 2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: ComVisible(false)]
-[assembly: Guid("3130b95d-a38c-416f-a353-cd75539cbe19")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/AssemblyInfo.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/AssemblyInfo.vb
deleted file mode 100644
index 000d88b10..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/AssemblyInfo.vb
+++ /dev/null
@@ -1,35 +0,0 @@
-Imports System
-Imports System.Reflection
-Imports System.Runtime.InteropServices
-
-' General Information about an assembly is controlled through the following
-' set of attributes. Change these attribute values to modify the information
-' associated with an assembly.
-
-' Review the values of the assembly attributes
-
-
-
-
-
-
-
-
-
-
-'The following GUID is for the ID of the typelib if this project is exposed to COM
-
-
-' Version information for an assembly consists of the following four values:
-'
-' Major Version
-' Minor Version
-' Build Number
-' Revision
-'
-' You can specify all the values or you can default the Build and Revision Numbers
-' by using the '*' as shown below:
-'
-
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Resources.Designer.cs b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Resources.Designer.cs
deleted file mode 100644
index 8a4b4bdb7..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Resources.Designer.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-
-using System.Threading.Tasks;
-using System.Data;
-using System.Diagnostics;
-using Microsoft.VisualBasic;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections;
-using System;
-using System.Xml.Linq;
-
-
-namespace My.Resources
-{
-
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// [global::System.CodeDom.Compiler.GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCode()]
- [global::System.Runtime.CompilerServices.CompilerGenerated()]
- [global::Microsoft.VisualBasic.HideModuleName()]
- internal static class Resources
- {
- private global::System.Resources.ResourceManager resourceMan;
-
- private global::System.Globalization.CultureInfo resourceCulture;
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- /// [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if (object.ReferenceEquals(resourceMan, null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ConsoleApp1.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Resources.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Resources.Designer.vb
deleted file mode 100644
index a1b900346..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Resources.Designer.vb
+++ /dev/null
@@ -1,63 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' This code was generated by a tool.
-' Runtime Version:4.0.30319.42000
-'
-' Changes to this file may cause incorrect behavior and will be lost if
-' the code is regenerated.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-Imports System
-
-Namespace My.Resources
-
- 'This class was auto-generated by the StronglyTypedResourceBuilder
- 'class via a tool like ResGen or Visual Studio.
- 'To add or remove a member, edit your .ResX file then rerun ResGen
- 'with the /str option, or rebuild your VS project.
- '''
- ''' A strongly-typed resource class, for looking up localized strings, etc.
- '''
- _
- Friend Module Resources
-
- Private resourceMan As Global.System.Resources.ResourceManager
-
- Private resourceCulture As Global.System.Globalization.CultureInfo
-
- '''
- ''' Returns the cached ResourceManager instance used by this class.
- '''
- _
- Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
- Get
- If Object.ReferenceEquals(resourceMan, Nothing) Then
- Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ConsoleApp1.Resources", GetType(Resources).Assembly)
- resourceMan = temp
- End If
- Return resourceMan
- End Get
- End Property
-
- '''
- ''' Overrides the current thread's CurrentUICulture property for all
- ''' resource lookups using this strongly typed resource class.
- '''
- _
- Friend Property Culture() As Global.System.Globalization.CultureInfo
- Get
- Return resourceCulture
- End Get
- Set
- resourceCulture = value
- End Set
- End Property
- End Module
-End Namespace
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Resources.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Resources.resx
deleted file mode 100644
index ea9cbcdb4..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Settings.Designer.cs b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Settings.Designer.cs
deleted file mode 100644
index e87943a68..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Settings.Designer.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-
-using System.Threading.Tasks;
-using System.Data;
-using System.Diagnostics;
-using Microsoft.VisualBasic;
-using System.Linq;
-using System.Collections.Generic;
-using System.Collections;
-using System;
-using System.Xml.Linq;
-
-
-namespace My
-{
- [global::System.Runtime.CompilerServices.CompilerGenerated()]
- [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal sealed partial class MySettings : global::System.Configuration.ApplicationSettingsBase
- {
- private static MySettings defaultInstance = (MySettings)global::System.Configuration.ApplicationSettingsBase.Synchronized(new MySettings());
-
- /* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
- public static MySettings Default
- {
- get
- {
-
- /* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
- return defaultInstance;
- }
- }
- }
-}
-
-namespace My
-{
- [global::Microsoft.VisualBasic.HideModuleName()]
- [global::System.Diagnostics.DebuggerNonUserCode()]
- [global::System.Runtime.CompilerServices.CompilerGenerated()]
- internal static class MySettingsProperty
- {
- [global::System.ComponentModel.Design.HelpKeyword("My.Settings")]
- internal static global::ConsoleApp1.My.MySettings Settings
- {
- get
- {
- return global::ConsoleApp1.My.MySettings.Default;
- }
- }
- }
-}
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/VisualBasicConsoleApp.vbproj b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/VisualBasicConsoleApp.vbproj
deleted file mode 100644
index 67b2b1122..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/VisualBasicConsoleApp.vbproj
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}
- Exe
- ConsoleApp1.Module1
- ConsoleApp1
- ConsoleApp1
- 512
- Console
- v4.8
- true
-
-
-
- AnyCPU
- true
- full
- true
- true
- bin\Debug\
- ConsoleApp1.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- AnyCPU
- pdbonly
- false
- true
- true
- bin\Release\
- ConsoleApp1.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- On
-
-
- Binary
-
-
- Off
-
-
- On
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
- True
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
-
- {b7602e54-8f45-4dc4-88b5-e11cdc7e8b41}
- CSharpConsoleApp
-
-
-
-
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/CSharpConsoleApp.csproj b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/CSharpConsoleApp.csproj
index 85b50bfa2..07c774bc4 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/CSharpConsoleApp.csproj
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/CSharpConsoleApp.csproj
@@ -1,62 +1,18 @@
-
-
-
+
- Debug
- AnyCPU
- {B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}
+ net10.0
Exe
ConsoleApp2
ConsoleApp2
- v4.8
- 512
- true
-
+ false
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
bin\Debug\ConsoleApp2.xml
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
- {4de39d59-19c6-4e1e-910c-5ea8ba55348b}
- CSharpNetStandardLib
-
+
-
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/Properties/AssemblyInfo.cs b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/Properties/AssemblyInfo.cs
deleted file mode 100644
index 8fc583c88..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ConsoleApp2")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ConsoleApp2")]
-[assembly: AssemblyCopyright("Copyright © 2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("b7602e54-8f45-4dc4-88b5-e11cdc7e8b41")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/Properties/AssemblyInfo.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/Properties/AssemblyInfo.vb
deleted file mode 100644
index 80799465b..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp2/Properties/AssemblyInfo.vb
+++ /dev/null
@@ -1,16 +0,0 @@
-Imports System.Reflection
-Imports System.Runtime.CompilerServices
-Imports System.Runtime.InteropServices
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp4/ConsoleApp4.vbproj b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp4/ConsoleApp4.vbproj
index 59c97ca8f..ff4e8a93a 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp4/ConsoleApp4.vbproj
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp4/ConsoleApp4.vbproj
@@ -3,7 +3,7 @@
Exe
ConsoleApp4
- netcoreapp3.1
+ net10.0
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/NetCore/NetCore.csproj b/Tests/TestData/MultiFileCharacterization/SourceFiles/NetCore/NetCore.csproj
index c1c1e5f3e..08ab42e4a 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/NetCore/NetCore.csproj
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/NetCore/NetCore.csproj
@@ -2,7 +2,7 @@
Exe
- net472
+ net10.0
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/My Project/AssemblyInfo.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/My Project/AssemblyInfo.vb
deleted file mode 100644
index 20ae9495c..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/My Project/AssemblyInfo.vb
+++ /dev/null
@@ -1,35 +0,0 @@
-Imports System
-Imports System.Reflection
-Imports System.Runtime.InteropServices
-
-' General Information about an assembly is controlled through the following
-' set of attributes. Change these attribute values to modify the information
-' associated with an assembly.
-
-' Review the values of the assembly attributes
-
-
-
-
-
-
-
-
-
-
-'The following GUID is for the ID of the typelib if this project is exposed to COM
-
-
-' Version information for an assembly consists of the following four values:
-'
-' Major Version
-' Minor Version
-' Build Number
-' Revision
-'
-' You can specify all the values or you can default the Build and Revision Numbers
-' by using the '*' as shown below:
-'
-
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/My Project/Settings.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/My Project/Settings.Designer.vb
index 9678afcb5..316074994 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/My Project/Settings.Designer.vb
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/My Project/Settings.Designer.vb
@@ -18,9 +18,6 @@ Namespace My
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
- Inherits Global.System.Configuration.ApplicationSettingsBase
-
- Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
@@ -50,7 +47,7 @@ Namespace My
End SyncLock
End If
#End If
- Return defaultInstance
+ Return Nothing
End Get
End Property
End Class
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/Prefix.VbLibrary.vbproj b/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/Prefix.VbLibrary.vbproj
index d44d68b87..f4f132237 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/Prefix.VbLibrary.vbproj
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/Prefix.VbLibrary/Prefix.VbLibrary.vbproj
@@ -1,111 +1,10 @@
-
-
-
-
- Debug
- AnyCPU
- {CFAB82CD-BA17-4F08-99E2-403FADB0C46A}
- Library
- Prefix.VbLibrary
- Prefix.VbLibrary
- 512
- Windows
- v4.8
- true
-
-
-
- true
- full
- true
- true
- bin\Debug\
- Prefix.VbLibrary.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- pdbonly
- false
- true
- true
- bin\Release\
- Prefix.VbLibrary.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- On
-
-
- Binary
-
-
- Off
-
-
- On
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
- True
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
+
+
+
+ Prefix.VbLibrary
+ netstandard2.1
+
+
+
+
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/AVbClass.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/VisualBasicConsoleApp/AVbClass.vb
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/AVbClass.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/VisualBasicConsoleApp/AVbClass.vb
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/VisualBasicConsoleApp/VisualBasicConsoleApp.vbproj b/Tests/TestData/MultiFileCharacterization/SourceFiles/VisualBasicConsoleApp/VisualBasicConsoleApp.vbproj
new file mode 100644
index 000000000..bd110e6d7
--- /dev/null
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/VisualBasicConsoleApp/VisualBasicConsoleApp.vbproj
@@ -0,0 +1,13 @@
+
+
+
+ Exe
+ VisualBasicConsoleApp
+ net10.0
+
+
+
+
+
+
+
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/App.config b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/App.config
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/App.config
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/App.config
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/ApplicationEvents.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/ApplicationEvents.vb
new file mode 100644
index 000000000..3445e6db3
--- /dev/null
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/ApplicationEvents.vb
@@ -0,0 +1,29 @@
+Imports Microsoft.VisualBasic.ApplicationServices
+
+Namespace My
+ ' The following events are available for MyApplication:
+ ' Startup: Raised when the application starts, before the startup form is created.
+ ' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally.
+ ' UnhandledException: Raised if the application encounters an unhandled exception.
+ ' StartupNextInstance: Raised when launching a single-instance application and the application is already active.
+ ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
+
+ ' **NEW** ApplyApplicationDefaults: Raised when the application queries default values to be set for the application.
+
+ ' Example:
+ ' Private Sub MyApplication_ApplyApplicationDefaults(sender As Object, e As ApplyApplicationDefaultsEventArgs) Handles Me.ApplyApplicationDefaults
+ '
+ ' ' Setting the application-wide default Font:
+ ' e.Font = New Font(FontFamily.GenericSansSerif, 12, FontStyle.Regular)
+ '
+ ' ' Setting the HighDpiMode for the Application:
+ ' e.HighDpiMode = HighDpiMode.PerMonitorV2
+ '
+ ' ' If a splash dialog is used, this sets the minimum display time:
+ ' e.MinimumSplashScreenDisplayTime = 4000
+ ' End Sub
+
+ Partial Friend Class MyApplication
+
+ End Class
+End Namespace
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/FolderForm.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/FolderForm.Designer.vb
similarity index 95%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/FolderForm.Designer.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/FolderForm.Designer.vb
index 8f3921d98..c562987bc 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/FolderForm.Designer.vb
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/FolderForm.Designer.vb
@@ -54,7 +54,7 @@ Partial Class FolderForm
'ToolStripButton1
'
Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton1.Image = Global.WindowsAppVb.My.Resources.Resources.test
+ Me.ToolStripButton1.Image = Global.WinFormsAppVb.My.Resources.Resources.test
Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton1.Name = "ToolStripButton1"
Me.ToolStripButton1.Size = New System.Drawing.Size(23, 22)
@@ -63,7 +63,7 @@ Partial Class FolderForm
'ToolStripButton2
'
Me.ToolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton2.Image = Global.WindowsAppVb.My.Resources.Resources.test2
+ Me.ToolStripButton2.Image = Global.WinFormsAppVb.My.Resources.Resources.test2
Me.ToolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton2.Name = "ToolStripButton2"
Me.ToolStripButton2.Size = New System.Drawing.Size(23, 22)
@@ -72,7 +72,7 @@ Partial Class FolderForm
'ToolStripButton3
'
Me.ToolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton3.Image = Global.WindowsAppVb.My.Resources.Resources.test3
+ Me.ToolStripButton3.Image = Global.WinFormsAppVb.My.Resources.Resources.test3
Me.ToolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton3.Name = "ToolStripButton3"
Me.ToolStripButton3.Size = New System.Drawing.Size(23, 22)
@@ -81,7 +81,7 @@ Partial Class FolderForm
'ToolStripButton4
'
Me.ToolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton4.Image = Global.WindowsAppVb.My.Resources.Resource1.test
+ Me.ToolStripButton4.Image = Global.WinFormsAppVb.My.Resources.Resource1.test
Me.ToolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton4.Name = "ToolStripButton4"
Me.ToolStripButton4.Size = New System.Drawing.Size(23, 22)
@@ -90,7 +90,7 @@ Partial Class FolderForm
'ToolStripButton5
'
Me.ToolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton5.Image = Global.WindowsAppVb.My.Resources.Resource1.test2
+ Me.ToolStripButton5.Image = Global.WinFormsAppVb.My.Resources.Resource1.test2
Me.ToolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton5.Name = "ToolStripButton5"
Me.ToolStripButton5.Size = New System.Drawing.Size(23, 22)
@@ -99,7 +99,7 @@ Partial Class FolderForm
'ToolStripButton6
'
Me.ToolStripButton6.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton6.Image = Global.WindowsAppVb.My.Resources.Resource1.test3
+ Me.ToolStripButton6.Image = Global.WinFormsAppVb.My.Resources.Resource1.test3
Me.ToolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton6.Name = "ToolStripButton6"
Me.ToolStripButton6.Size = New System.Drawing.Size(23, 22)
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/FolderForm.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/FolderForm.resx
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/FolderForm.resx
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/FolderForm.resx
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/FolderForm.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/FolderForm.vb
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/FolderForm.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/FolderForm.vb
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/Resource2.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/Resource2.Designer.vb
similarity index 97%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/Resource2.Designer.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/Resource2.Designer.vb
index b7c3af9fc..c9f17546d 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/Resource2.Designer.vb
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/Resource2.Designer.vb
@@ -43,7 +43,7 @@ Namespace My.Resources
Friend Shared ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
- Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WindowsAppVb.Resource2", GetType(Resource2).Assembly)
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WinFormsAppVb.Resource2", GetType(Resource2).Assembly)
resourceMan = temp
End If
Return resourceMan
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/Resource2.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/Resource2.resx
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/Resource2.resx
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/Resource2.resx
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/test2.png b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/test2.png
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder/test2.png
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder/test2.png
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder2/Resource3.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder2/Resource3.Designer.vb
similarity index 97%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder2/Resource3.Designer.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder2/Resource3.Designer.vb
index d20900e67..04eabcc99 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder2/Resource3.Designer.vb
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder2/Resource3.Designer.vb
@@ -43,7 +43,7 @@ Namespace My.Resources
Friend Shared ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
- Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WindowsAppVb.Resource3", GetType(Resource3).Assembly)
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WinFormsAppVb.Resource3", GetType(Resource3).Assembly)
resourceMan = temp
End If
Return resourceMan
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder2/Resource3.en-US.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder2/Resource3.en-US.resx
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder2/Resource3.en-US.resx
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder2/Resource3.en-US.resx
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder2/Resource3.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder2/Resource3.resx
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder2/Resource3.resx
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder2/Resource3.resx
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder2/test3.png b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder2/test3.png
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Folder2/test3.png
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Folder2/test3.png
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Form1.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Form1.Designer.vb
new file mode 100644
index 000000000..0a21f031d
--- /dev/null
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Form1.Designer.vb
@@ -0,0 +1,31 @@
+
+Partial Class Form1
+ Inherits System.Windows.Forms.Form
+
+ 'Form overrides dispose to clean up the component list.
+
+ Protected Overrides Sub Dispose(disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
+
+ 'Required by the Windows Form Designer
+ Private components As System.ComponentModel.IContainer
+
+ 'NOTE: The following procedure is required by the Windows Form Designer
+ 'It can be modified using the Windows Form Designer.
+ 'Do not modify it using the code editor.
+
+ Private Sub InitializeComponent()
+ components = New System.ComponentModel.Container()
+ AutoScaleMode = AutoScaleMode.Font
+ ClientSize = New Size(800, 450)
+ Text = "Form1"
+ End Sub
+
+End Class
diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/Resources.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Form1.resx
similarity index 90%
rename from Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/Resources.resx
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Form1.resx
index af7dbebba..1af7de150 100644
--- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/Resources.resx
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Form1.resx
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
+
@@ -68,9 +69,10 @@
-
+
+
@@ -85,9 +87,10 @@
-
+
+
@@ -109,9 +112,9 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Form1.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Form1.vb
new file mode 100644
index 000000000..17d659563
--- /dev/null
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Form1.vb
@@ -0,0 +1,3 @@
+Public Class Form1
+
+End Class
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Application.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Application.Designer.vb
similarity index 95%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Application.Designer.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Application.Designer.vb
index 874c09e97..0bdda9b6b 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Application.Designer.vb
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Application.Designer.vb
@@ -32,7 +32,7 @@ Namespace My
_
Protected Overrides Sub OnCreateMainForm()
- Me.MainForm = Global.WindowsAppVb.WinformsDesignerTest
+ Me.MainForm = Global.WinFormsAppVb.WinformsDesignerTest
End Sub
End Class
End Namespace
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Application.myapp b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Application.myapp
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Application.myapp
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Application.myapp
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Resources.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Resources.Designer.vb
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Resources.Designer.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Resources.Designer.vb
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Resources.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Resources.resx
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Resources.resx
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Resources.resx
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Settings.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Settings.Designer.vb
similarity index 94%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Settings.Designer.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Settings.Designer.vb
index 62478ad1a..235377686 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Settings.Designer.vb
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Settings.Designer.vb
@@ -64,9 +64,9 @@ Namespace My
Friend Module MySettingsProperty
_
- Friend ReadOnly Property Settings() As Global.ConsoleApp1.My.MySettings
+ Friend ReadOnly Property Settings() As Global.WinFormsAppVb.My.MySettings
Get
- Return Global.ConsoleApp1.My.MySettings.Default
+ Return Global.WinFormsAppVb.My.MySettings.Default
End Get
End Property
End Module
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Settings.settings b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Settings.settings
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/ConsoleApp1/My Project/Settings.settings
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/My Project/Settings.settings
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/ReferencingFormThroughStatic.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/ReferencingFormThroughStatic.vb
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/ReferencingFormThroughStatic.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/ReferencingFormThroughStatic.vb
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Resource1.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Resource1.Designer.vb
similarity index 97%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Resource1.Designer.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Resource1.Designer.vb
index 2e614b97f..1a1016fe9 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Resource1.Designer.vb
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Resource1.Designer.vb
@@ -43,7 +43,7 @@ Namespace My.Resources
Public Shared ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
- Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WindowsAppVb.Resource1", GetType(Resource1).Assembly)
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WinFormsAppVb.Resource1", GetType(Resource1).Assembly)
resourceMan = temp
End If
Return resourceMan
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Resource1.en-US.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Resource1.en-US.Designer.vb
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Resource1.en-US.Designer.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Resource1.en-US.Designer.vb
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Resource1.en-US.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Resource1.en-US.resx
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Resource1.en-US.resx
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Resource1.en-US.resx
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Resource1.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Resource1.resx
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/Resource1.resx
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/Resource1.resx
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WinFormsAppVb.vbproj b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WinFormsAppVb.vbproj
new file mode 100644
index 000000000..5f48b39fb
--- /dev/null
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WinFormsAppVb.vbproj
@@ -0,0 +1,36 @@
+
+
+
+ WinExe
+ net10.0-windows
+ Sub Main
+ true
+ WindowsForms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ Application.myapp
+
+
+
+
+
+ MyApplicationCodeGenerator
+ Application.Designer.vb
+
+
+
+
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/WindowsAppVb.vbproj b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WindowsAppVb.vbproj
similarity index 96%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/WindowsAppVb.vbproj
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WindowsAppVb.vbproj
index e18703af8..fcca337ba 100644
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/WindowsAppVb.vbproj
+++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WindowsAppVb.vbproj
@@ -14,6 +14,7 @@
v4.8
true
+ true
AnyCPU
@@ -186,5 +187,11 @@
VbNetStandardLib
+
+
+ 4.6.1
+
+
+
\ No newline at end of file
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/WinformsDesignerTest.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WinformsDesignerTest.Designer.vb
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/WinformsDesignerTest.Designer.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WinformsDesignerTest.Designer.vb
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/WinformsDesignerTest.resx b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WinformsDesignerTest.resx
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/WinformsDesignerTest.resx
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WinformsDesignerTest.resx
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/WinformsDesignerTest.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WinformsDesignerTest.vb
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/WinformsDesignerTest.vb
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/WinformsDesignerTest.vb
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/test.png b/Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/test.png
similarity index 100%
rename from Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/test.png
rename to Tests/TestData/MultiFileCharacterization/SourceFiles/WinFormsAppVb/test.png
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/App.config b/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/App.config
deleted file mode 100644
index a86c64659..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/AssemblyInfo.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/AssemblyInfo.vb
deleted file mode 100644
index ae9fa2302..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/AssemblyInfo.vb
+++ /dev/null
@@ -1,35 +0,0 @@
-Imports System
-Imports System.Reflection
-Imports System.Runtime.InteropServices
-
-' General Information about an assembly is controlled through the following
-' set of attributes. Change these attribute values to modify the information
-' associated with an assembly.
-
-' Review the values of the assembly attributes
-
-
-
-
-
-
-
-
-
-
-'The following GUID is for the ID of the typelib if this project is exposed to COM
-
-
-' Version information for an assembly consists of the following four values:
-'
-' Major Version
-' Minor Version
-' Build Number
-' Revision
-'
-' You can specify all the values or you can default the Build and Revision Numbers
-' by using the '*' as shown below:
-'
-
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Settings.Designer.vb b/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Settings.Designer.vb
deleted file mode 100644
index e993f30bd..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Settings.Designer.vb
+++ /dev/null
@@ -1,73 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' This code was generated by a tool.
-' Runtime Version:4.0.30319.42000
-'
-' Changes to this file may cause incorrect behavior and will be lost if
-' the code is regenerated.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My
-
- _
- Partial Friend NotInheritable Class MySettings
- Inherits Global.System.Configuration.ApplicationSettingsBase
-
- Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
-
-#Region "My.Settings Auto-Save Functionality"
-#If _MyType = "WindowsForms" Then
- Private Shared addedHandler As Boolean
-
- Private Shared addedHandlerLockObject As New Object
-
- _
- Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
- If My.Application.SaveMySettingsOnExit Then
- My.Settings.Save()
- End If
- End Sub
-#End If
-#End Region
-
- Public Shared ReadOnly Property [Default]() As MySettings
- Get
-
-#If _MyType = "WindowsForms" Then
- If Not addedHandler Then
- SyncLock addedHandlerLockObject
- If Not addedHandler Then
- AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
- addedHandler = True
- End If
- End SyncLock
- End If
-#End If
- Return defaultInstance
- End Get
- End Property
- End Class
-End Namespace
-
-Namespace My
-
- _
- Friend Module MySettingsProperty
-
- _
- Friend ReadOnly Property Settings() As Global.WindowsAppVb.My.MySettings
- Get
- Return Global.WindowsAppVb.My.MySettings.Default
- End Get
- End Property
- End Module
-End Namespace
diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Settings.settings b/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Settings.settings
deleted file mode 100644
index 85b890b3c..000000000
--- a/Tests/TestData/MultiFileCharacterization/SourceFiles/WindowsAppVb/My Project/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/CharacterizationTestSolution.sln
index bb2bf81ad..815d2303a 100644
--- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/CharacterizationTestSolution.sln
+++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/CharacterizationTestSolution.sln
@@ -1,10 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.9.34321.82
+# Visual Studio Version 18
+VisualStudioVersion = 18.0.11205.157
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WindowsAppVb", "WindowsAppVb\WindowsAppVb.vbproj", "{D18AB89D-1897-4779-A937-F48661E0B6B8}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpConsoleApp", "ConsoleApp2\CSharpConsoleApp.csproj", "{B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore", "NetCore\NetCore.csproj", "{73BF583C-DD55-486C-9D0F-15D3D8CC72D9}"
@@ -24,7 +22,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpNetStandardLib", "CSh
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Prefix.VbLibrary", "Prefix.VbLibrary\Prefix.VbLibrary.vbproj", "{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}"
EndProject
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.vbproj", "{C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}"
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WinFormsAppVb", "WinFormsAppVb\WinFormsAppVb.vbproj", "{39455F38-4197-4C3A-BB70-4E647A538BBE}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "VisualBasicConsoleApp\VisualBasicConsoleApp.vbproj", "{C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -32,10 +32,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.Build.0 = Release|Any CPU
{B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -64,10 +60,14 @@ Global
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.Build.0 = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {39455F38-4197-4C3A-BB70-4E647A538BBE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C2784C8A-2BC8-4A76-BDEC-AC59F41E1894}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/CharacterizationTestSolution.sln
deleted file mode 100644
index acd902558..000000000
--- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/CharacterizationTestSolution.sln
+++ /dev/null
@@ -1,90 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.9.34321.82
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WindowsAppVb", "WindowsAppVb\WindowsAppVb.vbproj", "{D18AB89D-1897-4779-A937-F48661E0B6B8}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpConsoleApp", "ConsoleApp2\CSharpConsoleApp.csproj", "{B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore", "NetCore\NetCore.csproj", "{73BF583C-DD55-486C-9D0F-15D3D8CC72D9}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5E8B06A8-42BC-4D2A-A769-66A2352F215E}"
- ProjectSection(SolutionItems) = preProject
- ユニコード.txt = ユニコード.txt
- EndProjectSection
-EndProject
-Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "VbLibrary", "VbLibrary\VbLibrary.vbproj", "{23195658-FBE7-4A3E-B79D-91AAC2D428E7}"
-EndProject
-Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "VbNetStandardLib", "VbNetStandardLib\VbNetStandardLib.vbproj", "{FBFBE639-A532-408A-960D-288E05FEEB0E}"
-EndProject
-Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "ConsoleApp4", "ConsoleApp4\ConsoleApp4.vbproj", "{68361F37-56E9-4B49-AFF3-F1AF9938A97F}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpNetStandardLib", "CSharpNetStandardLib\CSharpNetStandardLib.csproj", "{4DE39D59-19C6-4E1E-910C-5EA8BA55348B}"
-EndProject
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Prefix.VbLibrary", "Prefix.VbLibrary\Prefix.VbLibrary.vbproj", "{CFAB82CD-BA17-4F08-99E2-403FADB0C46A}"
-EndProject
-Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.vbproj", "{C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpRefReturn", "CSharpRefReturn\CSharpRefReturn.csproj", "{8B843547-F49D-40A2-8C4E-1B81D8C5D589}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualBasicUsingCSharpRefReturn", "VisualBasicUsesCSharpRefReturn\VisualBasicUsingCSharpRefReturn.csproj", "{D0421946-845F-09E8-2545-DE3EB2218254}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D18AB89D-1897-4779-A937-F48661E0B6B8}.Release|Any CPU.Build.0 = Release|Any CPU
- {B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B7602E54-8F45-4DC4-88B5-E11CDC7E8B41}.Release|Any CPU.Build.0 = Release|Any CPU
- {73BF583C-DD55-486C-9D0F-15D3D8CC72D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {73BF583C-DD55-486C-9D0F-15D3D8CC72D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {73BF583C-DD55-486C-9D0F-15D3D8CC72D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {73BF583C-DD55-486C-9D0F-15D3D8CC72D9}.Release|Any CPU.Build.0 = Release|Any CPU
- {23195658-FBE7-4A3E-B79D-91AAC2D428E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {23195658-FBE7-4A3E-B79D-91AAC2D428E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {23195658-FBE7-4A3E-B79D-91AAC2D428E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {23195658-FBE7-4A3E-B79D-91AAC2D428E7}.Release|Any CPU.Build.0 = Release|Any CPU
- {FBFBE639-A532-408A-960D-288E05FEEB0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FBFBE639-A532-408A-960D-288E05FEEB0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FBFBE639-A532-408A-960D-288E05FEEB0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FBFBE639-A532-408A-960D-288E05FEEB0E}.Release|Any CPU.Build.0 = Release|Any CPU
- {68361F37-56E9-4B49-AFF3-F1AF9938A97F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {68361F37-56E9-4B49-AFF3-F1AF9938A97F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {68361F37-56E9-4B49-AFF3-F1AF9938A97F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {68361F37-56E9-4B49-AFF3-F1AF9938A97F}.Release|Any CPU.Build.0 = Release|Any CPU
- {4DE39D59-19C6-4E1E-910C-5EA8BA55348B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4DE39D59-19C6-4E1E-910C-5EA8BA55348B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4DE39D59-19C6-4E1E-910C-5EA8BA55348B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4DE39D59-19C6-4E1E-910C-5EA8BA55348B}.Release|Any CPU.Build.0 = Release|Any CPU
- {CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CFAB82CD-BA17-4F08-99E2-403FADB0C46A}.Release|Any CPU.Build.0 = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.Build.0 = Release|Any CPU
- {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.Build.0 = Release|Any CPU
- {D0421946-845F-09E8-2545-DE3EB2218254}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D0421946-845F-09E8-2545-DE3EB2218254}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D0421946-845F-09E8-2545-DE3EB2218254}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D0421946-845F-09E8-2545-DE3EB2218254}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {417600E1-EB0F-4AF6-9C2D-9F542F6AEE7A}
- EndGlobalSection
-EndGlobal
diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/ByRefArgument.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/ByRefArgument.cs
deleted file mode 100644
index d0bc1dcd2..000000000
--- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbUsingCSharpRefReturnOnly/VisualBasicUsesCSharpRefReturn/ByRefArgument.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using Microsoft.VisualBasic.CompilerServices;
-
-namespace VisualBasicUsesCSharpRefReturn
-{
- public class ByRefArgument
- {
- public void UseArr()
- {
- var arrObj = default(object[]);
- Modify(ref arrObj[0]);
-
- var arrInt = default(int[]);
- var tmp = arrInt;
- object argo = tmp[0];
- Modify(ref argo);
- tmp[0] = Conversions.ToInteger(argo);
- }
-
- public void UseRefReturn()
- {
- var lstObj = default(CSharpRefReturn.RefReturnList
-
+
+ 10.0.2
+
+
compile; build; native; contentfiles; analyzers; buildtransitive
@@ -70,6 +73,9 @@
4.8.6
+
+ 10.0.0
+
@@ -108,9 +114,7 @@
DefaultReferences.cs
-
- AppDomainExtensions.cs
-
+
diff --git a/Vsix/source.extension.vsixmanifest b/Vsix/source.extension.vsixmanifest
index 97b37e758..aad6a73ee 100644
--- a/Vsix/source.extension.vsixmanifest
+++ b/Vsix/source.extension.vsixmanifest
@@ -1,7 +1,7 @@
-
+
Code Converter (VB - C#)
Convert VB.NET to C# and vice versa with this roslyn based converter
https://github.com/icsharpcode/CodeConverter
@@ -13,12 +13,12 @@
code converter vb csharp visual basic csharp net translate
-
-
+
+
diff --git a/Web/ClientApp/package.json b/Web/ClientApp/package.json
index 4f14e9c9f..e91845d57 100644
--- a/Web/ClientApp/package.json
+++ b/Web/ClientApp/package.json
@@ -1,64 +1,64 @@
-{
- "name": "codeconverter",
- "version": "0.1.0",
- "private": true,
- "eslintConfig": {
- "extends": "react-app"
- },
- "scripts": {
- "prestart": "node aspnetcore-https && node aspnetcore-react",
- "start": "rimraf ./build && react-scripts start",
- "build": "react-scripts build",
- "test": "cross-env CI=true react-scripts test --env=jsdom",
- "eject": "react-scripts eject",
- "lint": "eslint ./src/"
- },
- "browserslist": {
- "production": [
- ">0.2%",
- "not dead",
- "not op_mini all"
- ],
- "development": [
- "last 1 chrome version",
- "last 1 firefox version",
- "last 1 safari version"
- ]
- },
- "babel": {
- "presets": [
- [
- "@babel/preset-react",
- {
- "runtime": "automatic"
- }
- ]
- ]
- },
- "dependencies": {
- "@monaco-editor/react": "^4.6.0",
- "axios": "^1.12.0",
- "bootstrap": "^5.3.3",
- "monaco-editor": "^0.52.0",
- "prop-types": "^15.8.1",
- "react": "^18.3.1",
- "react-dom": "^18.3.1",
- "react-router-bootstrap": "^0.26.3",
- "react-router-dom": "^6.26.2",
- "reactstrap": "^9.2.3"
- },
- "devDependencies": {
- "@types/jest": "^29.5.13",
- "@types/react": "^18.3.10",
- "@types/react-dom": "^18.3.0",
- "ajv": "^8.17.1",
- "cross-env": "^7.0.3",
- "eslint-config-react-app": "^7.0.1",
- "http-proxy-middleware": "^3.0.2",
- "jquery": "^3.7.1",
- "popper.js": "^1.16.1",
- "react-scripts": "^5.0.1",
- "rimraf": "^6.0.1",
- "typescript": "^4.9.5"
- }
-}
+{
+ "name": "codeconverter",
+ "version": "0.1.0",
+ "private": true,
+ "eslintConfig": {
+ "extends": "react-app"
+ },
+ "scripts": {
+ "prestart": "node aspnetcore-https && node aspnetcore-react",
+ "start": "rimraf ./build && react-scripts start",
+ "build": "react-scripts build",
+ "test": "cross-env CI=true react-scripts test --env=jsdom",
+ "eject": "react-scripts eject",
+ "lint": "eslint ./src/"
+ },
+ "browserslist": {
+ "production": [
+ ">0.2%",
+ "not dead",
+ "not op_mini all"
+ ],
+ "development": [
+ "last 1 chrome version",
+ "last 1 firefox version",
+ "last 1 safari version"
+ ]
+ },
+ "babel": {
+ "presets": [
+ [
+ "@babel/preset-react",
+ {
+ "runtime": "automatic"
+ }
+ ]
+ ]
+ },
+ "dependencies": {
+ "@monaco-editor/react": "^4.6.0",
+ "axios": "^1.12.0",
+ "bootstrap": "^5.3.3",
+ "monaco-editor": "^0.52.0",
+ "prop-types": "^15.8.1",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
+ "react-router-bootstrap": "^0.26.3",
+ "react-router-dom": "^6.26.2",
+ "reactstrap": "^9.2.3"
+ },
+ "devDependencies": {
+ "@types/jest": "^29.5.13",
+ "@types/react": "^18.3.10",
+ "@types/react-dom": "^18.3.0",
+ "ajv": "^8.17.1",
+ "cross-env": "^7.0.3",
+ "eslint-config-react-app": "^7.0.1",
+ "http-proxy-middleware": "^3.0.2",
+ "jquery": "^3.7.1",
+ "popper.js": "^1.16.1",
+ "react-scripts": "^5.0.1",
+ "rimraf": "^6.0.1",
+ "typescript": "^4.9.5"
+ }
+}
diff --git a/Web/Program.cs b/Web/Program.cs
index 07e1e2b46..367b919a8 100644
--- a/Web/Program.cs
+++ b/Web/Program.cs
@@ -1,6 +1,4 @@
-using ICSharpCode.CodeConverter.Util;
-using ICSharpCode.CodeConverter.Web;
-using Microsoft.OpenApi.Models;
+using Microsoft.OpenApi.Models;
var builder = WebApplication.CreateBuilder(args);
@@ -34,14 +32,6 @@
app.UseRouting();
app.UseCors(localOrigins);
-app.MapPost("/api/convert", async (ConvertRequest todo) => await WebConverter.ConvertAsync(todo))
- .RequireCors(localOrigins)
- .Produces();
-
-app.MapGet("/api/version", () => CodeConverterVersion.GetVersion())
- .RequireCors(localOrigins)
- .Produces();
-
app.MapFallbackToFile("index.html");
app.Run();
\ No newline at end of file
diff --git a/Web/Web.csproj b/Web/Web.csproj
index 428c8acfb..5161f5880 100644
--- a/Web/Web.csproj
+++ b/Web/Web.csproj
@@ -15,18 +15,11 @@
10.0
-
-
-
-
-
-
-
-
+