Skip to content

Commit ee2f06e

Browse files
committed
Use net6.0 in tests.
1 parent 6fda6cb commit ee2f06e

6 files changed

Lines changed: 17 additions & 22 deletions

File tree

PropertyChangedAnalyzers.Benchmarks/PropertyChangedAnalyzers.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<OutputType>Exe</OutputType>
66
</PropertyGroup>
77

PropertyChangedAnalyzers.Test/Helpers/SpecialMetadataReferences.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private static Assembly LoadUnsigned(string dllName)
2727
if (ProjectDirectory.EnumerateFiles(dllName, SearchOption.AllDirectories)
2828
.TryFirst(out var dll))
2929
{
30-
return Assembly.ReflectionOnlyLoadFrom(dll.FullName);
30+
return Assembly.LoadFile(dll.FullName);
3131
}
3232

3333
throw new FileNotFoundException(dllName);

PropertyChangedAnalyzers.Test/NullableFixTests/NullableFixTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ public static class NullableFixTests
1111
private static readonly CodeFixProvider Fix = new NullableFix();
1212
private static readonly ExpectedDiagnostic CS8618 = ExpectedDiagnostic.Create("CS8618");
1313
private static readonly ExpectedDiagnostic CS8625 = ExpectedDiagnostic.Create("CS8625", "Cannot convert null literal to non-nullable reference type.");
14-
private static readonly CSharpCompilationOptions CompilationOptions = new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable);
14+
private static readonly CSharpCompilationOptions CompilationOptions = new(OutputKind.DynamicallyLinkedLibrary, nullableContextOptions: NullableContextOptions.Enable);
1515

1616
[Test]
1717
public static void DeclareEventNullable()
1818
{
1919
var before = @"
20+
#pragma warning disable CS8612
2021
namespace N
2122
{
2223
using System.ComponentModel;
@@ -50,6 +51,7 @@ protected virtual void OnPropertyChanged(string propertyName)
5051
}";
5152

5253
var after = @"
54+
#pragma warning disable CS8612
5355
namespace N
5456
{
5557
using System.ComponentModel;
@@ -88,6 +90,7 @@ protected virtual void OnPropertyChanged(string propertyName)
8890
public static void DeclareEventNullableWhenConstructor()
8991
{
9092
var before = @"
93+
#pragma warning disable CS8612
9194
namespace N
9295
{
9396
using System.ComponentModel;
@@ -126,6 +129,7 @@ protected virtual void OnPropertyChanged(string propertyName)
126129
}";
127130

128131
var after = @"
132+
#pragma warning disable CS8612
129133
namespace N
130134
{
131135
using System.ComponentModel;

PropertyChangedAnalyzers.Test/PropertyChangedAnalyzers.Test.csproj

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFramework>net48</TargetFramework>
4+
<TargetFramework>net6.0-windows</TargetFramework>
5+
<UseWpf>true</UseWpf>
56
<LangVersion>latest</LangVersion>
67
</PropertyGroup>
78

@@ -20,13 +21,6 @@
2021
<ProjectReference Include="..\PropertyChangedAnalyzers\PropertyChangedAnalyzers.csproj" />
2122
</ItemGroup>
2223

23-
<ItemGroup>
24-
<Reference Include="PresentationCore" />
25-
<Reference Include="PresentationFramework" />
26-
<Reference Include="System.Xaml" />
27-
<Reference Include="WindowsBase" />
28-
</ItemGroup>
29-
3024
<ItemGroup>
3125
<PackageReference Include="Caliburn.Micro" Version="3.2" />
3226
<PackageReference Include="Gu.Analyzers" Version="2.0.0" PrivateAssets="all" />
@@ -37,7 +31,7 @@
3731
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" />
3832
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
3933
<PackageReference Include="MvvmCross" Version="8.0.2" />
40-
<PackageReference Include="MvvmLight" Version="5.4.1.1" />
34+
<PackageReference Include="MvvmLightLibs" Version="5.4.1.1" />
4135
<PackageReference Include="NUnit" Version="3.13.2" />
4236
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" PrivateAssets="all" />
4337
<PackageReference Include="Prism.Mvvm" Version="1.1.1" />

ValidCode/ValidCode.csproj

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFramework>net48</TargetFramework>
4+
<TargetFramework>net6.0-windows</TargetFramework>
5+
<UseWpf>true</UseWpf>
56
<LangVersion>latest</LangVersion>
67
<Nullable>Enable</Nullable>
78
</PropertyGroup>
89

910
<ItemGroup>
10-
<PackageReference Include="Caliburn.Micro" Version="4.0.62-alpha" />
11+
<PackageReference Include="Caliburn.Micro" Version="3.2" />
1112
<PackageReference Include="Gu.Wpf.Reactive" Version="5.0.1" />
1213
<PackageReference Include="MvvmCross" Version="8.0.2" />
13-
<PackageReference Include="MvvmLight" Version="5.4.1.1" />
14+
<PackageReference Include="MvvmLightLibs" Version="5.4.1.1" />
1415
<PackageReference Include="Prism.Wpf" Version="8.1.97" />
1516
<PackageReference Include="PropertyChangedAnalyzers" Version="4.0.0" PrivateAssets="all" />
1617
<PackageReference Include="ReflectionAnalyzers" Version="0.3.0" PrivateAssets="all" />
1718
<PackageReference Include="Stylet" Version="1.3.6" />
1819
</ItemGroup>
19-
20-
<ItemGroup>
21-
<Reference Include="PresentationCore" />
22-
<Reference Include="PresentationFramework" />
23-
<Reference Include="System.Xaml" />
24-
<Reference Include="WindowsBase" />
25-
</ItemGroup>
2620
</Project>

azure-pipelines.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ variables:
55
buildConfiguration: 'Release'
66

77
steps:
8+
- task: UseDotNet@2
9+
inputs:
10+
version: 6.0.x
811

912
- task: VSBuild@1
1013
displayName: Build

0 commit comments

Comments
 (0)