diff --git a/.gitmodules b/.gitmodules
index 0b2349ad42..bdd5d5ca4d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -5,9 +5,6 @@
path = src/Avalonia.HtmlRenderer/external
url = https://github.com/AvaloniaUI/HTML-Renderer.git
branch = perspex-pcl
-[submodule "src/Markup/Avalonia.Markup.Xaml/OmniXAML"]
- path = src/Markup/Avalonia.Markup.Xaml/OmniXAML
- url = https://github.com/AvaloniaUI/OmniXAML.git
-[submodule "src/Markup/Avalonia.Markup.Xaml/glass"]
- path = src/Markup/Avalonia.Markup.Xaml/glass
- url = https://github.com/SuperJMN/glass
+[submodule "src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github"]
+ path = src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github
+ url = https://github.com/cwensley/Portable.Xaml.git
diff --git a/build.cake b/build.cake
index cab2ba9b0a..c56089ab55 100644
--- a/build.cake
+++ b/build.cake
@@ -403,7 +403,8 @@ Task("Inspect")
{
var badIssues = new []{"PossibleNullReferenceException"};
var whitelist = new []{"tests", "src\\android", "src\\ios",
- "src\\windows\\avalonia.designer", "src\\avalonia.htmlrenderer\\external"};
+ "src\\windows\\avalonia.designer", "src\\avalonia.htmlrenderer\\external",
+ "src\\markup\\avalonia.markup.xaml\\portablexaml\\portable.xaml.github"};
Information("Running code inspections");
diff --git a/build/Markup.props b/build/Markup.props
index 36c4cb28d8..0e4baf5da9 100644
--- a/build/Markup.props
+++ b/build/Markup.props
@@ -5,5 +5,9 @@
+
+
+
+
diff --git a/build/XUnit.props b/build/XUnit.props
index 27e0afc987..d59cee6536 100644
--- a/build/XUnit.props
+++ b/build/XUnit.props
@@ -12,4 +12,16 @@
+
+ true
+
+
+
+
+ true
+
+
diff --git a/packages.cake b/packages.cake
index 07c77f64fd..5f268188dc 100644
--- a/packages.cake
+++ b/packages.cake
@@ -8,6 +8,42 @@ public class Packages
public string NugetPackagesDir {get; private set;}
public string SkiaSharpVersion {get; private set; }
public string SkiaSharpLinuxVersion {get; private set; }
+ public Dictionary>> PackageVersions{get; private set;}
+
+
+
+ class DependencyBuilder : List
+ {
+ Packages _parent;
+ public DependencyBuilder(Packages parent)
+ {
+ _parent = parent;
+ }
+
+ string GetVersion(string name)
+ {
+ return _parent.PackageVersions[name].First().Item1;
+ }
+
+
+ public DependencyBuilder Dep(string name, params string[] fws)
+ {
+ if(fws.Length == 0)
+ Add(new NuSpecDependency() { Id = name, Version = GetVersion(name) });
+ foreach(var fw in fws)
+ Add(new NuSpecDependency() { Id = name, TargetFramework = fw, Version = GetVersion(name) });
+ return this;
+ }
+ public DependencyBuilder Deps(string[] fws, params string[] deps)
+ {
+ foreach(var fw in fws)
+ foreach(var name in deps)
+ Add(new NuSpecDependency() { Id = name, TargetFramework = fw, Version = GetVersion(name) });
+ return this;
+ }
+ }
+
+ //new NuSpecDependency() { Id = "System.Threading.ThreadPool", TargetFramework = "netcoreapp1.0", Version = "4.3.0" },
public Packages(ICakeContext context, Parameters parameters)
{
// NUGET NUSPECS
@@ -26,7 +62,7 @@ public class Packages
// Key: Package Id
// Value is Tuple where Item1: Package Version, Item2: The *.csproj/*.props file path.
var packageVersions = new Dictionary>>();
-
+ PackageVersions = packageVersions;
System.IO.Directory.EnumerateFiles(((DirectoryPath)context.Directory("./build")).FullPath,
"*.props", SearchOption.AllDirectories).ToList().ForEach(fileName =>
{
@@ -150,12 +186,12 @@ public class Packages
};
var coreLibrariesFiles = coreLibraries.Select((lib) => {
- return (FilePath)context.File(lib[0] + lib[1] + "/bin/" + parameters.DirSuffix + "/netstandard1.1/" + lib[1] + lib[2]);
+ return (FilePath)context.File(lib[0] + lib[1] + "/bin/" + parameters.DirSuffix + "/netstandard1.3/" + lib[1] + lib[2]);
}).ToList();
var coreLibrariesNuSpecContent = coreLibrariesFiles.Select((file) => {
return new NuSpecContent {
- Source = file.FullPath, Target = "lib/netstandard1.1"
+ Source = file.FullPath, Target = "lib/netstandard1.3"
};
});
@@ -195,13 +231,12 @@ public class Packages
new NuGetPackSettings()
{
Id = "Avalonia",
- Dependencies = new []
+ Dependencies = new DependencyBuilder(this)
{
new NuSpecDependency() { Id = "Serilog", Version = SerilogVersion },
new NuSpecDependency() { Id = "Splat", Version = SplatVersion },
new NuSpecDependency() { Id = "Sprache", Version = SpracheVersion },
new NuSpecDependency() { Id = "System.Reactive", Version = SystemReactiveVersion },
- new NuSpecDependency() { Id = "System.ValueTuple", Version = SystemValueTupleVersion },
//.NET Core
new NuSpecDependency() { Id = "System.Threading.ThreadPool", TargetFramework = "netcoreapp1.0", Version = "4.3.0" },
new NuSpecDependency() { Id = "Microsoft.Extensions.DependencyModel", TargetFramework = "netcoreapp1.0", Version = "1.1.0" },
@@ -210,8 +245,11 @@ public class Packages
new NuSpecDependency() { Id = "Serilog", TargetFramework = "netcoreapp1.0", Version = SerilogVersion },
new NuSpecDependency() { Id = "Sprache", TargetFramework = "netcoreapp1.0", Version = SpracheVersion },
new NuSpecDependency() { Id = "System.Reactive", TargetFramework = "netcoreapp1.0", Version = SystemReactiveVersion },
- new NuSpecDependency() { Id = "System.ValueTuple", TargetFramework = "netcoreapp1.0", Version = SystemValueTupleVersion }
- },
+ }
+ .Deps(new string[]{null, "netcoreapp1.0"},
+ "System.ValueTuple", "System.ComponentModel.TypeConverter", "System.ComponentModel.Primitives",
+ "System.Runtime.Serialization.Primitives", "System.Xml.XmlDocument")
+ .ToArray(),
Files = coreLibrariesNuSpecContent
.Concat(win32CoreLibrariesNuSpecContent).Concat(net45RuntimePlatform)
.Concat(netcoreappCoreLibrariesNuSpecContent).Concat(netCoreRuntimePlatform)
@@ -231,9 +269,9 @@ public class Packages
},
Files = new []
{
- new NuSpecContent { Source = "Avalonia.HtmlRenderer.dll", Target = "lib/netstandard1.1" }
+ new NuSpecContent { Source = "Avalonia.HtmlRenderer.dll", Target = "lib/netstandard1.3" }
},
- BasePath = context.Directory("./src/Avalonia.HtmlRenderer/bin/" + parameters.DirSuffix + "/netstandard1.1"),
+ BasePath = context.Directory("./src/Avalonia.HtmlRenderer/bin/" + parameters.DirSuffix + "/netstandard1.3"),
OutputDirectory = parameters.NugetRoot
}
};
@@ -347,7 +385,7 @@ public class Packages
Files = new []
{
new NuSpecContent { Source = "Avalonia.Win32/bin/" + parameters.DirSuffix + "/Avalonia.Win32.dll", Target = "lib/net45" },
- new NuSpecContent { Source = "Avalonia.Win32.NetStandard/bin/" + parameters.DirSuffix + "/netstandard1.1/Avalonia.Win32.dll", Target = "lib/netstandard1.1" }
+ new NuSpecContent { Source = "Avalonia.Win32.NetStandard/bin/" + parameters.DirSuffix + "/netstandard1.3/Avalonia.Win32.dll", Target = "lib/netstandard1.3" }
},
BasePath = context.Directory("./src/Windows"),
OutputDirectory = parameters.NugetRoot
@@ -402,9 +440,9 @@ public class Packages
},
Files = new []
{
- new NuSpecContent { Source = "Avalonia.Gtk3.dll", Target = "lib/netstandard1.1" }
+ new NuSpecContent { Source = "Avalonia.Gtk3.dll", Target = "lib/netstandard1.3" }
},
- BasePath = context.Directory("./src/Gtk/Avalonia.Gtk3/bin/" + parameters.DirSuffix + "/netstandard1.1"),
+ BasePath = context.Directory("./src/Gtk/Avalonia.Gtk3/bin/" + parameters.DirSuffix + "/netstandard1.3"),
OutputDirectory = parameters.NugetRoot
},
///////////////////////////////////////////////////////////////////////////////
@@ -460,9 +498,9 @@ public class Packages
new NuSpecDependency() { Id = "Avalonia.Skia.Desktop", TargetFramework="net45", Version = parameters.Version },
new NuSpecDependency() { Id = "Avalonia.Gtk3", TargetFramework="net45", Version = parameters.Version },
//.NET Core
- new NuSpecDependency() { Id = "Avalonia.Win32", TargetFramework="netcoreapp1.1", Version = parameters.Version },
- new NuSpecDependency() { Id = "Avalonia.Skia.Desktop", TargetFramework="netcoreapp1.1", Version = parameters.Version },
- new NuSpecDependency() { Id = "Avalonia.Gtk3", TargetFramework="netcoreapp1.1", Version = parameters.Version }
+ new NuSpecDependency() { Id = "Avalonia.Win32", TargetFramework="netcoreapp1.0", Version = parameters.Version },
+ new NuSpecDependency() { Id = "Avalonia.Skia.Desktop", TargetFramework="netcoreapp1.0", Version = parameters.Version },
+ new NuSpecDependency() { Id = "Avalonia.Gtk3", TargetFramework="netcoreapp1.0", Version = parameters.Version }
},
Files = new NuSpecContent[]
{
diff --git a/samples/BindingTest/BindingTest.csproj b/samples/BindingTest/BindingTest.csproj
index b62f9a54b6..8e78b0c2cd 100644
--- a/samples/BindingTest/BindingTest.csproj
+++ b/samples/BindingTest/BindingTest.csproj
@@ -9,7 +9,7 @@
Properties
BindingTest
BindingTest
- v4.5
+ v4.6.1
512
true
diff --git a/samples/BindingTest/MainWindow.xaml b/samples/BindingTest/MainWindow.xaml
index 95f671fd84..7d633bcd0c 100644
--- a/samples/BindingTest/MainWindow.xaml
+++ b/samples/BindingTest/MainWindow.xaml
@@ -44,6 +44,8 @@
+
+
diff --git a/samples/BindingTest/ViewModels/MainWindowViewModel.cs b/samples/BindingTest/ViewModels/MainWindowViewModel.cs
index 4b58bf2279..2ec052c258 100644
--- a/samples/BindingTest/ViewModels/MainWindowViewModel.cs
+++ b/samples/BindingTest/ViewModels/MainWindowViewModel.cs
@@ -49,6 +49,9 @@ namespace BindingTest.ViewModels
Thread.Sleep(1000);
}
});
+
+ CurrentTimeObservable = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1))
+ .Select(x => DateTimeOffset.Now.ToString());
}
public ObservableCollection Items { get; }
@@ -85,6 +88,7 @@ namespace BindingTest.ViewModels
private set { this.RaiseAndSetIfChanged(ref _currentTime, value); }
}
+ public IObservable CurrentTimeObservable { get; }
public ReactiveCommand