Skip to content

Commit

Permalink
Updates for VS 2019.
Browse files Browse the repository at this point in the history
Package updates.
  • Loading branch information
jp2masa committed Apr 15, 2019
1 parent bc8e4ea commit 169dc5e
Show file tree
Hide file tree
Showing 17 changed files with 68 additions and 133 deletions.
25 changes: 17 additions & 8 deletions Build/Targets/PackageVersions.targets
@@ -1,41 +1,50 @@
<Project>

<PropertyGroup>
<ApprovalTestsVersion>3.0.18</ApprovalTestsVersion>
<ApprovalTestsVersion>3.0.22</ApprovalTestsVersion>
<AvaloniaVersion>0.7.0</AvaloniaVersion>
<MicrosoftBuildVersion>15.9.20</MicrosoftBuildVersion>
<MicrosoftNETFrameworkReferenceAssembliesVersion>1.0.0-alpha-004</MicrosoftNETFrameworkReferenceAssembliesVersion>
<MicrosoftNETTestSdkVersion>15.9.0</MicrosoftNETTestSdkVersion>
<MicrosoftTestPlatformObjectModelVersion>15.9.0</MicrosoftTestPlatformObjectModelVersion>
<MicrosoftBuildVersion>16.0.461</MicrosoftBuildVersion>
<MicrosoftNETFrameworkReferenceAssembliesVersion>1.0.0-alpha-5</MicrosoftNETFrameworkReferenceAssembliesVersion>
<MicrosoftNETTestSdkVersion>16.0.1</MicrosoftNETTestSdkVersion>
<MicrosoftTestPlatformObjectModelVersion>16.0.1</MicrosoftTestPlatformObjectModelVersion>
<MicrosoftVisualStudioProjectSystemVersion>16.0.374-pre</MicrosoftVisualStudioProjectSystemVersion>
<MicrosoftVisualStudioSDKEmbedInteropTypesVersion>15.0.27</MicrosoftVisualStudioSDKEmbedInteropTypesVersion>
<MicrosoftVisualStudioSetupConfigurationInteropVersion>1.16.30</MicrosoftVisualStudioSetupConfigurationInteropVersion>
<MicrosoftVSSDKBuildToolsVersion>15.9.3039</MicrosoftVSSDKBuildToolsVersion>
<MicrosoftVisualStudioShell150Version>16.0.28729</MicrosoftVisualStudioShell150Version>
<MicrosoftVisualStudioShellInterop110Version>11.0.61031</MicrosoftVisualStudioShellInterop110Version>
<MicrosoftVSSDKBuildToolsVersion>16.0.2264</MicrosoftVSSDKBuildToolsVersion>
<MSTestVersion>1.4.0</MSTestVersion>
<NuGetVersion>4.9.3</NuGetVersion>
<NuGetVersion>5.0.0</NuGetVersion>
<NUnitVersion>3.11.0</NUnitVersion>
<NUnit3TestAdapterVersion>3.13.0</NUnit3TestAdapterVersion>
<ReactiveUIVersion>9.12.1</ReactiveUIVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Update="ApprovalTests" Version="$(ApprovalTestsVersion)" />
<PackageReference Update="ApprovalUtilities" Version="$(ApprovalTestsVersion)" />
<PackageReference Update="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Update="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageReference Update="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
<PackageReference Update="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
<PackageReference Update="Microsoft.Build.Framework" Version="$(MicrosoftBuildVersion)" />
<PackageReference Update="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="$(MicrosoftNETFrameworkReferenceAssembliesVersion)" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageReference Update="Microsoft.TestPlatform.ObjectModel" Version="$(MicrosoftTestPlatformObjectModelVersion)" />
<PackageReference Update="Microsoft.VisualStudio.ProjectSystem.Analyzers" Version="$(MicrosoftVisualStudioProjectSystemVersion)" />
<PackageReference Update="Microsoft.VisualStudio.ProjectSystem.Sdk" Version="$(MicrosoftVisualStudioProjectSystemVersion)" />
<PackageReference Update="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="$(MicrosoftVisualStudioSDKEmbedInteropTypesVersion)" />
<PackageReference Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="$(MicrosoftVisualStudioSetupConfigurationInteropVersion)" />
<PackageReference Update="Microsoft.VisualStudio.Shell.15.0" Version="$(MicrosoftVisualStudioShell150Version)" />
<PackageReference Update="Microsoft.VisualStudio.Shell.Interop.11.0" Version="$(MicrosoftVisualStudioShellInterop110Version)" />
<PackageReference Update="Microsoft.VSSDK.BuildTools" Version="$(MicrosoftVSSDKBuildToolsVersion)" />
<PackageReference Update="MSTest.TestAdapter" Version="$(MSTestVersion)" />
<PackageReference Update="MSTest.TestFramework" Version="$(MSTestVersion)" />
<PackageReference Update="NuGet.Common" Version="$(NuGetVersion)" />
<PackageReference Update="NuGet.Configuration" Version="$(NuGetVersion)" />
<PackageReference Update="NUnit" Version="$(NUnitVersion)" />
<PackageReference Update="NUnit3TestAdapter" Version="$(NUnit3TestAdapterVersion)" />
<PackageReference Update="ReactiveUI" Version="$(ReactiveUIVersion)" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions Build/Targets/RestoreSources.props
Expand Up @@ -6,9 +6,9 @@
<RestoreSources>
https://api.nuget.org/v3/index.json;
https://www.myget.org/F/cosmos/api/v3/index.json;
https://ci.appveyor.com/nuget/cosmos-common;
https://ci.appveyor.com/nuget/il2cpu;
https://ci.appveyor.com/nuget/xsharp;
https://ci.appveyor.com/nuget/cosmos-common;
https://ci.appveyor.com/nuget/il2cpu;
https://ci.appveyor.com/nuget/xsharp;
https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json
</RestoreSources>

Expand Down
7 changes: 4 additions & 3 deletions Directory.Build.props
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<LangVersion>Latest</LangVersion>
<NoWarn>CA1051;CA1501;CA1707;CA1711;CA1801;$(NoWarn)</NoWarn>
<SignAssembly>True</SignAssembly>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -29,9 +30,9 @@
</PropertyGroup>

<PropertyGroup>
<CommonVersion>0.1.0-build8</CommonVersion>
<IL2CPUVersion>0.1.0-build328</IL2CPUVersion>
<XSharpVersion>0.1.0-build534</XSharpVersion>
<CommonVersion>0.1.0-build18</CommonVersion>
<IL2CPUVersion>0.1.0-build355</IL2CPUVersion>
<XSharpVersion>0.1.0-build562</XSharpVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 0 additions & 4 deletions Directory.Build.targets
@@ -1,9 +1,5 @@
<Project>

<PropertyGroup>
<SignAssembly>True</SignAssembly>
</PropertyGroup>

<Import Project="build\Targets\Import.targets" />

</Project>
1 change: 0 additions & 1 deletion Tests/Cosmos.System.Tests/Cosmos.System.Tests.csproj
Expand Up @@ -6,7 +6,6 @@

<ItemGroup>
<PackageReference Include="ApprovalTests" NoWarn="NU1701" />
<PackageReference Include="ApprovalUtilities" NoWarn="NU1701" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MSTest.TestAdapter" />
<PackageReference Include="MSTest.TestFramework" />
Expand Down
10 changes: 6 additions & 4 deletions Tests/Cosmos.TestRunner.UI/App.xaml.cs
Expand Up @@ -15,16 +15,18 @@ internal class App : Application
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
base.Initialize();
}

static void Main(string[] args)
private static void Main(string[] args)
{
InitializeLogging();
BuildAvaloniaApp().Start<MainWindow>();
}

private static AppBuilder BuildAvaloniaApp() =>
AppBuilder.Configure<App>()
.UsePlatformDetect()
.Start<MainWindow>();
}
.UseReactiveUI();

[Conditional("DEBUG")]
private static void InitializeLogging()
Expand Down
2 changes: 2 additions & 0 deletions Tests/Cosmos.TestRunner.UI/Cosmos.TestRunner.UI.csproj
Expand Up @@ -15,6 +15,8 @@
<ItemGroup>
<PackageReference Include="Avalonia" />
<PackageReference Include="Avalonia.Desktop" />
<PackageReference Include="Avalonia.ReactiveUI" />
<PackageReference Include="ReactiveUI" />
</ItemGroup>

<ItemGroup>
Expand Down
24 changes: 11 additions & 13 deletions Tests/Cosmos.TestRunner.UI/ViewModels/MainWindowViewModel.cs
@@ -1,36 +1,34 @@
using System;
using System.ComponentModel;
using System.Threading;

using ReactiveUI;

using Cosmos.TestRunner.Core;
using Cosmos.TestRunner.Full;

namespace Cosmos.TestRunner.UI.ViewModels
{
internal class MainWindowViewModel : INotifyPropertyChanged
internal class MainWindowViewModel : ReactiveObject
{
public event PropertyChangedEventHandler PropertyChanged;
private string _log;

public MainWindowViewModel(IEngineConfiguration aEngineConfiguration)
{
var xEngine = new FullEngine(aEngineConfiguration);

xEngine.SetOutputHandler(
new OutputHandler(
m =>
{
TestRunnerLog += m + Environment.NewLine;
OnPropertyChanged(nameof(TestRunnerLog));
}));
m => TestRunnerLog += m + Environment.NewLine));

new Thread(() => xEngine.Execute()).Start();
}

public string TestRunnerLog { get; set; }

private void OnPropertyChanged(string aPropertyName) =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(aPropertyName));

public string TestRunnerLog
{
get => _log;
set => this.RaiseAndSetIfChanged(ref _log, value);
}

internal class OutputHandler : OutputHandlerFullTextBase
{
private Action<string> mLog;
Expand Down
46 changes: 11 additions & 35 deletions Tests/Cosmos.TestRunner.UI/ViewModels/SettingsDialogViewModel.cs
Expand Up @@ -2,32 +2,32 @@
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Windows.Input;
using PropertyChangedEventArgs = System.ComponentModel.PropertyChangedEventArgs;

using Avalonia.Controls;

using ReactiveUI;

using Cosmos.Build.Common;
using Cosmos.TestRunner.Core;
using Cosmos.TestRunner.Full;

namespace Cosmos.TestRunner.UI.ViewModels
{
internal class SettingsDialogViewModel : IEngineConfiguration, INotifyPropertyChanged
internal class SettingsDialogViewModel : ReactiveObject, IEngineConfiguration
{
private static IEngineConfiguration defaultEngineConfiguration = new DefaultEngineConfiguration();
private static IEnumerable<Type> stableKernelTypes = TestKernelSets.GetStableKernelTypes();

public event PropertyChangedEventHandler PropertyChanged;

public SettingsDialogViewModel(Window aWindow)
{
KernelTypesToRun = new ObservableCollection<Type>(stableKernelTypes);
RunTests = new RunTestsCommand(aWindow, this);

RunTestsCommand = ReactiveCommand.Create(
() => RunTests(aWindow),
this.WhenAny(v => v.KernelTypesToRun, c => c.Value.Any()));
}

#region Engine Configuration
Expand Down Expand Up @@ -128,41 +128,17 @@ public RunTargetEnum RunTarget

#endregion

public ICommand RunTests { get; set; }
public ICommand RunTestsCommand { get; set; }

private void RunTests(Window aWindow) => aWindow.Close(this);

private void SetProperty<T>(ref T aProperty, T aValue, [CallerMemberName]string aPropertyName = null)
{
if (!EqualityComparer<T>.Default.Equals(aProperty, aValue))
{
aProperty = aValue;
OnPropertyChanged(aPropertyName);
}
}

private void OnPropertyChanged(string aPropertyName) =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(aPropertyName));

internal class RunTestsCommand : ICommand
{
private Window mWindow;
private SettingsDialogViewModel mViewModel;

public RunTestsCommand(Window aWindow, SettingsDialogViewModel aViewModel)
{
mWindow = aWindow;
mViewModel = aViewModel;

mViewModel.KernelTypesToRun.CollectionChanged += KernelTypesToRun_CollectionChanged;
this.RaisePropertyChanged(aPropertyName);
}

public event EventHandler CanExecuteChanged;

public bool CanExecute(object parameter) => mViewModel.KernelTypesToRun.Any();

public void Execute(object parameter) => mWindow.Close(mViewModel);

private void KernelTypesToRun_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) =>
CanExecuteChanged?.Invoke(this, EventArgs.Empty);
}
}
}
10 changes: 5 additions & 5 deletions Tests/Cosmos.TestRunner.UI/Views/SettingsDialog.xaml
Expand Up @@ -2,13 +2,13 @@
Title="Cosmos Test Runner Settings"
SizeToContent="WidthAndHeight">

<StackPanel Gap="8"
<StackPanel Spacing="8"
Margin="16">

<StackPanel Orientation="Horizontal"
Gap="16">
Spacing="16">

<StackPanel Gap="8">
<StackPanel Spacing="8">

<TextBlock>Allowed seconds in kernel:</TextBlock>
<TextBox Text="{Binding AllowedSecondsInKernel}" />
Expand All @@ -20,7 +20,7 @@

</StackPanel>

<StackPanel Gap="8">
<StackPanel Spacing="8">

<CheckBox IsChecked="{Binding DebugIL2CPU}">Debug IL2CPU</CheckBox>
<TextBlock>Kernel package:</TextBlock>
Expand All @@ -42,7 +42,7 @@
SelectedItems="{Binding KernelTypesToRun}"
SelectionMode="Multiple" />

<Button Command="{Binding RunTests}">Run Tests</Button>
<Button Command="{Binding RunTestsCommand}">Run Tests</Button>

</StackPanel>

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
@@ -1,5 +1,5 @@
version: 0.20150918.{build}
image: Visual Studio 2017
image: Visual Studio 2019 Preview
configuration: Debug-CI
platform: Any CPU
shallow_clone: true
Expand Down
2 changes: 1 addition & 1 deletion source/Cosmos.VS.DebugEngine/Cosmos.VS.DebugEngine.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net471</TargetFramework>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 169dc5e

Please sign in to comment.