diff --git a/parameters.cake b/parameters.cake index b5839696c3..2639dd24c9 100644 --- a/parameters.cake +++ b/parameters.cake @@ -1,10 +1,12 @@ +using System.Xml.Linq; +using System.Linq; + public class Parameters { public string Configuration { get; private set; } public bool SkipTests { get; private set; } public string MainRepo { get; private set; } public string MasterBranch { get; private set; } - public string AssemblyInfoPath { get; private set; } public string ReleasePlatform { get; private set; } public string ReleaseConfiguration { get; private set; } public string MSBuildSolution { get; private set; } @@ -44,7 +46,6 @@ public class Parameters // CONFIGURATION MainRepo = "AvaloniaUI/Avalonia"; MasterBranch = "master"; - AssemblyInfoPath = context.File("./src/Shared/SharedAssemblyInfo.cs"); ReleaseConfiguration = "Release"; MSBuildSolution = "./dirs.proj"; @@ -62,7 +63,7 @@ public class Parameters IsMyGetRelease = !IsTagged && IsReleasable; // VERSION - Version = context.Argument("force-nuget-version", context.ParseAssemblyInfo(AssemblyInfoPath).AssemblyVersion); + Version = context.Argument("force-nuget-version", GetVersion()); if (IsRunningOnAppVeyor) { @@ -100,4 +101,10 @@ public class Parameters ZipSourceControlCatalogDesktopDirs = (DirectoryPath)context.Directory("./samples/ControlCatalog.Desktop/bin/" + DirSuffix + "/net461"); ZipTargetControlCatalogDesktopDirs = ZipRoot.CombineWithFilePath("ControlCatalog.Desktop-" + FileZipSuffix); } + + private static string GetVersion() + { + var xdoc = XDocument.Load("./build/SharedVersion.props"); + return xdoc.Descendants().First(x => x.Name.LocalName == "Version").Value; + } } diff --git a/src/Shared/SharedAssemblyInfo.cs b/src/Shared/SharedAssemblyInfo.cs deleted file mode 100644 index 44ebef4cd2..0000000000 --- a/src/Shared/SharedAssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; - -[assembly: AssemblyCompany("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCopyright("Copyright AvaloniaUI 2016")] -[assembly: AssemblyCulture("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyProduct("Avalonia")] -[assembly: AssemblyTrademark("")] -[assembly: NeutralResourcesLanguage("en")] - -[assembly: AssemblyVersion("0.6.2")] -[assembly: AssemblyFileVersion("0.6.2")] -[assembly: AssemblyInformationalVersion("0.6.2")] diff --git a/src/Shared/avalonia.platform.targets b/src/Shared/avalonia.platform.targets deleted file mode 100644 index d9d592831b..0000000000 --- a/src/Shared/avalonia.platform.targets +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - $(PrepareForRunDependsOn);CopyPlatformLibs - - - - - \ No newline at end of file