Skip to content

Commit 7772c1c

Browse files
Revert to 4.1.0 before dotnet/roslyn#63921 was introduced
The issue says it's fixed, but the tests can't run due to the issue
1 parent 6ed1211 commit 7772c1c

10 files changed

Lines changed: 27 additions & 26 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
77

88
### Vsix
99

10-
* Compatible with Visual Studio 2022 17.6 onwards
10+
* Compatible with Visual Studio 2022 17.1 onwards
1111

1212
### VB -> C#
1313

CodeConverter/CSharp/CommonConversions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ public static CSSyntax.VariableDeclaratorSyntax CreateVariableDeclarator(string
569569
{
570570
if (operation is IPropertyReferenceOperation pro && pro.Arguments.Any() &&
571571
!VisualBasicExtensions.IsDefault(pro.Property)) {
572-
var isSetter = pro.Parent.Kind == OperationKind.SimpleAssignment && pro.Parent.ChildOperations.First() == pro;
572+
var isSetter = pro.Parent.Kind == OperationKind.SimpleAssignment && pro.Parent.Children.First() == pro;
573573
var extraArg = isSetter
574574
? await GetParameterizedSetterArgAsync(operation)
575575
: null;
@@ -674,7 +674,7 @@ public static ExpressionSyntax ThrowawayParameters(ExpressionSyntax invocable, i
674674
return SyntaxFactory.ParenthesizedLambdaExpression(parameters, SyntaxFactory.InvocationExpression(invocable));
675675
}
676676

677-
public static CSSyntax.ParameterListSyntax CreateParameterList(IEnumerable<CSSyntax.ParameterSyntax> ps)
677+
public static CSSyntax.ParameterListSyntax CreateParameterList(IEnumerable<SyntaxNode> ps)
678678
{
679679
return SyntaxFactory.ParameterList(SyntaxFactory.SeparatedList(ps));
680680
}

CodeConverter/CSharp/ProjectMergedDeclarationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private static async Task<Project> RenamePrefixAsync(Project project, string old
164164
for (var symbolToRename = await GetElementToRename(project); symbolToRename != null; symbolToRename = await GetElementToRename(project, toSkip)) {
165165
string newName = symbolToRename.Name.Replace(oldNamePrefix, newNamePrefix);
166166
try {
167-
var renamedSolution = await Renamer.RenameSymbolAsync(project.Solution, symbolToRename, new SymbolRenameOptions(), newName, cancellationToken);
167+
var renamedSolution = await Renamer.RenameSymbolAsync(project.Solution, symbolToRename, newName, project.Solution.Workspace.Options, cancellationToken);
168168
project = renamedSolution.GetProject(project.Id);
169169
} catch (Exception e) {
170170
toSkip++;

CodeConverter/CodeConverter.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
</ItemGroup>
3737

3838
<ItemGroup>
39-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
40-
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.6.0" />
39+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.1.0" />
40+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.1.0" />
41+
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.1.0" />
4142
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
4243
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
4344
<PrivateAssets>all</PrivateAssets>

CodeConverter/Common/SymbolRenamer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static async Task<Project> PerformRenamesAsync(Project project, IEnumerab
3535
ISymbol currentDeclaration = SymbolFinder.FindSimilarSymbols(originalSymbol, compilation).FirstOrDefault();
3636
if (currentDeclaration == null)
3737
continue; //Must have already renamed this symbol for a different reason
38-
solution = await Renamer.RenameSymbolAsync(solution, currentDeclaration, new SymbolRenameOptions(), newName, cancellationToken);
38+
solution = await Renamer.RenameSymbolAsync(solution, currentDeclaration, newName, solution.Workspace.Options);
3939
}
4040

4141
return solution.GetProject(project.Id);

CommandLine/CodeConv.NetFramework/CodeConv.NetFramework.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
13+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
1414
<PackageReference Include="Microsoft.Build.Locator" Version="1.2.6" />
15-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
16-
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.6.0" />
17-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.6.0" />
15+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.1.0" />
16+
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.1.0" />
17+
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.1.0" />
1818
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="16.10.56" />
1919
<PackageReference Include="NuGet.Build.Tasks" Version="5.4.0" />
20-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
20+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
2121
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
2222
<PackageReference Include="System.Memory" Version="4.5.5" />
2323
<PackageReference Include="System.Net.Http" Version="4.3.4" />

CommandLine/CodeConv/CodeConv.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
<ItemGroup>
3434
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
3535
<PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" />
36-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
37-
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.6.0" />
38-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.6.0" />
36+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.1.0" />
37+
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.1.0" />
38+
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.1.0" />
3939
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
4040
<PrivateAssets>all</PrivateAssets>
4141
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>

Func/Func.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131

3232
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
3333
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
34-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" />
35-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
36-
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.6.0" />
37-
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.6.0" />
38-
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.6.0" />
34+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
35+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.1.0" />
36+
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.1.0" />
37+
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.1.0" />
38+
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.1.0" />
3939
</ItemGroup>
4040
<ItemGroup>
4141
<None Update="host.json">

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Convert code from VB.NET to C# (and vice versa) using Roslyn - all free and open
66
* [Visual Studio extension](https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.CodeConverter)
77
* To install close VS and double-click the downloadeded .vsix file
88
* [Online snippet converter](https://icsharpcode.github.io/CodeConverter/)
9-
* Command line `dotnet tool install ICSharpCode.CodeConverter.codeconv --global` (still requires VS2022 17.6+ installed)
9+
* Command line `dotnet tool install ICSharpCode.CodeConverter.codeconv --global` (still requires VS2022 17.1+ installed)
1010
* [Nuget library](https://www.nuget.org/packages/ICSharpCode.CodeConverter/) (this underpins all other free converters you'll find online)
1111

1212
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
1515

1616
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.
1717

18-
Download from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.CodeConverter) (Use VS 2022 17.6+)
18+
Download from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.CodeConverter) (Use VS 2022 17.1+)
1919

2020
* Flexible: Convert a small selection, or a whole solution in one go, in either direction.
2121
* Accurate: Full project context (through Roslyn) is used to get the most accurate conversion.

Tests/Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
<ProjectReference Include="..\CommandLine\CodeConv.NetFramework\CodeConv.NetFramework.csproj" />
3737
</ItemGroup>
3838
<ItemGroup Label="ReSharper test runner requirements - test against latest Visual Studio version">
39-
<PackageReference Include="Microsoft.CodeAnalysis.Features" Version="4.6.0" />
40-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
41-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.6.0" />
42-
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.6.0" />
39+
<PackageReference Include="Microsoft.CodeAnalysis.Features" Version="4.1.0" />
40+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.1.0" />
41+
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.1.0" />
42+
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.1.0" />
4343
<PackageReference Include="Microsoft.Build" Version="17.4.0" />
4444
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.4.0" />
4545
</ItemGroup>

0 commit comments

Comments
 (0)