Skip to content

Commit 6bbf779

Browse files
committed
downgrade to Microsoft.CodeAnalysis.CSharp.Workspaces to 2.8.2
1 parent d1d0691 commit 6bbf779

File tree

10 files changed

+61
-23
lines changed

10 files changed

+61
-23
lines changed

Roslyn.Testing/Roslyn.Testing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<ItemGroup>
99
<PackageReference Include="JetBrains.Annotations" Version="2019.1.1" />
10-
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.0.0" />
10+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.8.2" />
1111
<PackageReference Include="Shouldly" Version="3.0.2" />
1212
</ItemGroup>
1313

System.IO.Abstractions.Analyzers.Tests/CodeFixes/FileServiceInterfaceInjectionCodeFixTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class FileServiceInterfaceInjectionCodeFixTests :
1616
[InlineData("BeforeFixExistsAbstractionsUsing.txt", "AfterFix.txt")]
1717
[InlineData("BeforeFixExistingConstructorParameter.txt", "AfterFix.txt")]
1818
[InlineData("BeforeFixExistingConstructorParameterUniqName.txt", "AfterFixConstructorParameterUniqName.txt")]
19+
[InlineData("BeforeFixContainsAssignment.txt", "AfterFixContainsAssignment.txt")]
1920
public void CodeFix(string sourceBefore, string sourceAfter)
2021
{
2122
var sourceBeforeFix = ReadFile(sourceBefore);

System.IO.Abstractions.Analyzers.Tests/System.IO.Abstractions.Analyzers.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
11-
<PackageReference Include="System.IO.Abstractions" Version="4.1.6" />
11+
<PackageReference Include="System.IO.Abstractions" Version="4.2.4" />
1212
<PackageReference Include="xunit" Version="2.4.1" />
1313
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
1414
</ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System.IO;
2+
using System.IO.Abstractions;
3+
4+
namespace SomeNameSpace
5+
{
6+
public class WithOutFileSystem
7+
{
8+
private readonly IFileSystem _fileSystem;
9+
10+
public WithOutFileSystem(IFileSystem fileSystem)
11+
{
12+
_fileSystem = fileSystem;
13+
}
14+
15+
public void SomeMethod()
16+
{
17+
const string filePath = "C:\\temp.txt";
18+
19+
if (File.Exists(filePath))
20+
{
21+
File.Delete(filePath);
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System.IO;
2+
3+
namespace SomeNameSpace
4+
{
5+
public class WithOutFileSystem
6+
{
7+
public WithOutFileSystem(IFileSystem fileSystem)
8+
{
9+
_fileSystem = fileSystem;
10+
}
11+
12+
public void SomeMethod()
13+
{
14+
const string filePath = "C:\\temp.txt";
15+
16+
if (File.Exists(filePath))
17+
{
18+
File.Delete(filePath);
19+
}
20+
}
21+
}
22+
}

System.IO.Abstractions.Analyzers/Analyzers/BaseFileSystemNodeAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ protected override void AnalyzeCompilation(CompilationStartAnalysisContext compi
4848

4949
private bool IsStaticInvocationStartWith(InvocationExpressionSyntax invocation) => invocation.Expression.NormalizeWhitespace()
5050
.ToFullString()
51-
.StartsWith(GetFileSystemType().Name + ".", StringComparison.InvariantCultureIgnoreCase);
51+
.StartsWith(GetFileSystemType().Name + ".", StringComparison.CurrentCultureIgnoreCase);
5252
}
5353
}

System.IO.Abstractions.Analyzers/RoslynToken/RoslynClassFileSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static UsingDirectiveSyntax GetSystemIoUsing(CompilationUnitSyntax unit)
4949
public static UsingDirectiveSyntax GetUsing(CompilationUnitSyntax unit, string usingName)
5050
{
5151
return unit.Usings.FirstOrDefault(x =>
52-
x.Name.NormalizeWhitespace().ToFullString().Equals(usingName, StringComparison.InvariantCultureIgnoreCase));
52+
x.Name.NormalizeWhitespace().ToFullString().Equals(usingName, StringComparison.CurrentCultureIgnoreCase));
5353
}
5454

5555
public static FieldDeclarationSyntax CreateFileSystemFieldDeclaration()

System.IO.Abstractions.Analyzers/System.IO.Abstractions.Analyzers.csproj

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFramework>netstandard1.4</TargetFramework>
55
<PackageTargetFallback>portable-net45+win8+wp8+wpa81</PackageTargetFallback>
66
<IncludeBuildOutput>false</IncludeBuildOutput>
77
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
8-
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
9-
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
10-
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
11-
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
12-
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
13-
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
14-
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
15-
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
16-
<DebugType>full</DebugType>
178
</PropertyGroup>
189
<PropertyGroup>
1910
<PackageId>Roslyn.System.IO.Abstractions.Analyzers</PackageId>
20-
<PackageVersion>4.0.1</PackageVersion>
11+
<PackageVersion>4.0.7</PackageVersion>
2112
<Authors>inyutin_maxim</Authors>
2213
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2314
<PackageProjectUrl>https://github.com/System-IO-Abstractions/System.IO.Abstractions.Analyzers/</PackageProjectUrl>
@@ -37,8 +28,7 @@
3728
<ItemGroup>
3829
<PackageReference Include="JetBrains.Annotations" Version="2019.1.1" PrivateAssets="all" />
3930
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="2.9.2" PrivateAssets="all" />
40-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.0.0" PrivateAssets="all" />
41-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.0.0" PrivateAssets="all" />
31+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.8.2" PrivateAssets="all" />
4232
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
4333
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.2" PrivateAssets="all" />
4434
<PackageReference Include="Microsoft.CodeQuality.Analyzers" Version="2.9.2" PrivateAssets="all" />

System.IO.Abstractions.Analyzers/tools/install.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
param ($installPath, $toolsPath, $package, $project)
1+
param($installPath, $toolsPath, $package, $project)
22

33
if ($project.Object.SupportsPackageDependencyResolution)
44
{
@@ -16,7 +16,7 @@ foreach ($analyzersPath in $analyzersPaths)
1616
if (Test-Path $analyzersPath)
1717
{
1818
# Install the language agnostic analyzers.
19-
foreach ($analyzerFilePath in Get-ChildItem -Path "$analyzersPath\*.dll" -Exclude * .resources.dll)
19+
foreach ($analyzerFilePath in Get-ChildItem -Path "$analyzersPath\*.dll" -Exclude *.resources.dll)
2020
{
2121
if ($project.Object.AnalyzerReferences)
2222
{
@@ -47,7 +47,7 @@ foreach ($analyzersPath in $analyzersPaths)
4747
$languageAnalyzersPath = join-path $analyzersPath $languageFolder
4848
if (Test-Path $languageAnalyzersPath)
4949
{
50-
foreach ($analyzerFilePath in Get-ChildItem -Path "$languageAnalyzersPath\*.dll" -Exclude * .resources.dll)
50+
foreach ($analyzerFilePath in Get-ChildItem -Path "$languageAnalyzersPath\*.dll" -Exclude *.resources.dll)
5151
{
5252
if ($project.Object.AnalyzerReferences)
5353
{

System.IO.Abstractions.Analyzers/tools/uninstall.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
param ($installPath, $toolsPath, $package, $project)
1+
param($installPath, $toolsPath, $package, $project)
22

33
if ($project.Object.SupportsPackageDependencyResolution)
44
{
@@ -16,7 +16,7 @@ foreach ($analyzersPath in $analyzersPaths)
1616
# Uninstall the language agnostic analyzers.
1717
if (Test-Path $analyzersPath)
1818
{
19-
foreach ($analyzerFilePath in Get-ChildItem -Path "$analyzersPath\*.dll" -Exclude * .resources.dll)
19+
foreach ($analyzerFilePath in Get-ChildItem -Path "$analyzersPath\*.dll" -Exclude *.resources.dll)
2020
{
2121
if ($project.Object.AnalyzerReferences)
2222
{
@@ -47,7 +47,7 @@ foreach ($analyzersPath in $analyzersPaths)
4747
$languageAnalyzersPath = join-path $analyzersPath $languageFolder
4848
if (Test-Path $languageAnalyzersPath)
4949
{
50-
foreach ($analyzerFilePath in Get-ChildItem -Path "$languageAnalyzersPath\*.dll" -Exclude * .resources.dll)
50+
foreach ($analyzerFilePath in Get-ChildItem -Path "$languageAnalyzersPath\*.dll" -Exclude *.resources.dll)
5151
{
5252
if ($project.Object.AnalyzerReferences)
5353
{

0 commit comments

Comments
 (0)