Skip to content

Commit 3c91775

Browse files
committed
Merge branch 'v4-upgrade-samples-nugets' into v4
2 parents f7c2011 + 885f724 commit 3c91775

File tree

17 files changed

+152
-182
lines changed

17 files changed

+152
-182
lines changed
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp1.0</TargetFramework>
5-
<AssemblyName>ConsoleApp-NetCore</AssemblyName>
4+
<TargetFramework>netcoreapp2.1</TargetFramework>
65
<OutputType>Exe</OutputType>
7-
<PackageId>ConsoleApp-NetCore</PackageId>
8-
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
9-
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
10-
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
11-
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
12-
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
6+
<StartupObject>ConsoleApp1.Program</StartupObject>
137
</PropertyGroup>
148

159
<ItemGroup>
16-
<PackageReference Include="UnitsNet" Version="3.45.0" />
10+
<PackageReference Include="UnitsNet" Version="4.0.0-beta1" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<Folder Include="Properties\" />
1715
</ItemGroup>
1816

1917
</Project>

Samples/ConsoleApp-NetCore/Program.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
52
using UnitsNet;
63

74
namespace ConsoleApp1

Samples/ConsoleApp-NetCore/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 19 deletions
This file was deleted.

Samples/SimpleConversionDemo.UWP.CSharp/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dependencies": {
33
"Microsoft.NETCore.UniversalWindowsPlatform": "6.1.9",
4-
"UnitsNet.WindowsRuntimeComponent": "4.0.0-alpha5"
4+
"UnitsNet.WindowsRuntimeComponent": "4.0.0-beta1"
55
},
66
"frameworks": {
77
"uap10.0.16299": {}

Samples/SimpleConversionDemo.UWP.WinJS/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"dependencies": {
33
"Microsoft.NETCore.UniversalWindowsPlatform": "6.1.9",
44
"System.ValueTuple": "4.5.0",
5-
"UnitsNet.WindowsRuntimeComponent": "4.0.0-alpha5"
5+
"UnitsNet.WindowsRuntimeComponent": "4.0.0-beta1"
66
},
77
"frameworks": {
88
"uap10.0": {}

Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,19 @@
3737
<ApplicationIcon>logo-512.ico</ApplicationIcon>
3838
</PropertyGroup>
3939
<ItemGroup>
40-
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
41-
<HintPath>..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
40+
<Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL">
41+
<HintPath>..\..\packages\ControlzEx.3.0.2.4\lib\net462\ControlzEx.dll</HintPath>
42+
</Reference>
43+
<Reference Include="MahApps.Metro, Version=1.6.5.1, Culture=neutral, processorArchitecture=MSIL">
44+
<HintPath>..\..\packages\MahApps.Metro.1.6.5\lib\net46\MahApps.Metro.dll</HintPath>
4245
</Reference>
4346
<Reference Include="System" />
4447
<Reference Include="System.Data" />
48+
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
49+
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
50+
</Reference>
4551
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
46-
<HintPath>..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
52+
<HintPath>..\..\packages\ControlzEx.3.0.2.4\lib\net462\System.Windows.Interactivity.dll</HintPath>
4753
</Reference>
4854
<Reference Include="System.Xml" />
4955
<Reference Include="Microsoft.CSharp" />
@@ -54,8 +60,8 @@
5460
<Reference Include="System.Xaml">
5561
<RequiredTargetFramework>4.0</RequiredTargetFramework>
5662
</Reference>
57-
<Reference Include="UnitsNet, Version=3.87.0.0, Culture=neutral, processorArchitecture=MSIL">
58-
<HintPath>..\..\packages\UnitsNet.3.87.0\lib\net40\UnitsNet.dll</HintPath>
63+
<Reference Include="UnitsNet, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f8601875a1f041da, processorArchitecture=MSIL">
64+
<HintPath>..\..\packages\UnitsNet.4.0.0-beta1\lib\net40\UnitsNet.dll</HintPath>
5965
</Reference>
6066
<Reference Include="WindowsBase" />
6167
<Reference Include="PresentationCore" />

Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitListItem.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22

33
namespace UnitsNet.Samples.UnitConverter.Wpf
44
{
@@ -14,7 +14,7 @@ public UnitListItem(object val)
1414
UnitEnumValue = val;
1515
UnitEnumValueInt = (int) val;
1616
UnitEnumType = val.GetType();
17-
Abbreviation = UnitSystem.Default.GetDefaultAbbreviation(UnitEnumType, UnitEnumValueInt);
17+
Abbreviation = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(UnitEnumType, UnitEnumValueInt);
1818

1919
Text = $"{val} [{Abbreviation}]";
2020
}
@@ -25,4 +25,4 @@ public UnitListItem(object val)
2525
public Type UnitEnumType { get; }
2626
public string Abbreviation { get; }
2727
}
28-
}
28+
}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="MahApps.Metro" version="1.5.0" targetFramework="net462" />
4-
<package id="UnitsNet" version="3.87.0" targetFramework="net462" />
3+
<package id="ControlzEx" version="3.0.2.4" targetFramework="net462" />
4+
<package id="MahApps.Metro" version="1.6.5" targetFramework="net462" />
5+
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
6+
<package id="UnitsNet" version="4.0.0-beta1" targetFramework="net462" />
57
</packages>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/>
55
</startup>
6-
</configuration>
6+
</configuration>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<Application x:Class="WpfMVVMSample.App"
1+
<unity:PrismApplication x:Class="WpfMVVMSample.App"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="clr-namespace:WpfMVVMSample">
4+
xmlns:unity="http://prismlibrary.com/">
55
<Application.Resources>
66

77
</Application.Resources>
8-
</Application>
8+
</unity:PrismApplication>

0 commit comments

Comments
 (0)