diff --git a/Microsoft.Bcl.Build.Symbols/Program.cs b/Microsoft.Bcl.Build.Symbols/Program.cs
index 4391b03..17e0521 100644
--- a/Microsoft.Bcl.Build.Symbols/Program.cs
+++ b/Microsoft.Bcl.Build.Symbols/Program.cs
@@ -5,12 +5,12 @@
namespace Microsoft.Bcl.Build.Symbols
{
- class Program
+ internal class Program
{
- static void Main(string[] args)
+ private static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.ReadKey();
}
}
-}
+}
\ No newline at end of file
diff --git a/Microsoft.Bcl.Build.Symbols/Properties/AssemblyInfo.cs b/Microsoft.Bcl.Build.Symbols/Properties/AssemblyInfo.cs
index dc5dc54..a9b2eaf 100644
--- a/Microsoft.Bcl.Build.Symbols/Properties/AssemblyInfo.cs
+++ b/Microsoft.Bcl.Build.Symbols/Properties/AssemblyInfo.cs
@@ -4,7 +4,6 @@
[assembly: AssemblyTitle("Microsoft.Bcl.Build.Symbols")]
[assembly: AssemblyDescription("Provides compile time symbols for .NET Framework.")]
-
[assembly: AssemblyCompany("Enner Pérez")]
[assembly: AssemblyProduct("Microsoft.Bcl.Build.Symbols")]
[assembly: AssemblyCopyright("Copyright © Enner Pérez")]
@@ -12,6 +11,6 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("A619D960-0942-47BC-B908-F940ECBFA1E1")]
-[assembly: AssemblyVersion("1.1.*")]
-[assembly: AssemblyFileVersion("1.1.0")]
+[assembly: AssemblyVersion("1.2.*")]
+[assembly: AssemblyFileVersion("1.2.0")]
[assembly: NeutralResourcesLanguage("en")]
\ No newline at end of file
diff --git a/Microsoft.Bcl.Build.Symbols/build/Microsoft.Bcl.Build.Symbols.targets b/Microsoft.Bcl.Build.Symbols/build/Microsoft.Bcl.Build.Symbols.targets
index 614f571..d72b225 100644
--- a/Microsoft.Bcl.Build.Symbols/build/Microsoft.Bcl.Build.Symbols.targets
+++ b/Microsoft.Bcl.Build.Symbols/build/Microsoft.Bcl.Build.Symbols.targets
@@ -19,51 +19,74 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
- $(FrameworkConstants)NETFX_47;
- $(FrameworkConstants)NETFX_462;
- $(FrameworkConstants)NETFX_461;
- $(FrameworkConstants)NETFX_46;
- $(FrameworkConstants)NETFX_452;
- $(FrameworkConstants)NETFX_451;
- $(FrameworkConstants)NETFX_45;
- $(FrameworkConstants)NETFX_40;
- $(FrameworkConstants)NETFX_35;
- $(FrameworkConstants)NETFX_30;
- $(FrameworkConstants)NETFX_20;
-
+ NETFX_20
+ NETFX_30
+ NETFX_35
+ NETFX_40
+ NETFX_45
+ NETFX_451
+ NETFX_452
+ NETFX_46
+ NETFX_461
+ NETFX_462
+ NETFX_47
+ NETFX_471
+ NETFX_472
+
+
+
+ $(BuildConstants)$(NETFX);
- PORTABLE;PROFILE_$(TargetFrameworkProfile.ToUpper().Substring(7));$(FrameworkConstants)
+ PORTABLE;PROFILE_$(TargetFrameworkProfile.ToUpper().Substring(7));$(BuildConstants)
- MONO;$(FrameworkConstants)
+ MONO;$(BuildConstants)
- MONO;$(FrameworkConstants)
+ MONO;$(BuildConstants)
- XAMARIN;$(FrameworkConstants)
+ XAMARIN;$(BuildConstants)
- ANDROID;$(FrameworkConstants)
+ ANDROID;$(BuildConstants)
- IOS;$(FrameworkConstants)
+ IOS;$(BuildConstants)
+
+
+
+
+ CSHARP_20
+ CSHARP_30
+ CSHARP_40
+ CSHARP_50
+ CSHARP_60
+ CSHARP_70
+
+ $(BuildConstants)$(CSHARP);
-
+
-
+
+
+
+
- $(FrameworkConstants)$(DefineConstants)
+ $(BuildConstants)$(DefineConstants)
-
\ No newline at end of file
diff --git a/build.cake b/build.cake
index 5c7ef11..efc6957 100644
--- a/build.cake
+++ b/build.cake
@@ -2,19 +2,27 @@
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
-var solution = "./Microsoft.Bcl.Build.Symbols.sln";
-var nuspec = "./Microsoft.Bcl.Build.Symbols/Package.nuspec";
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
-var assemblyInfo = ParseAssemblyInfo("./Microsoft.Bcl.Build.Symbols/Properties/AssemblyInfo.cs");
-var version = EnvironmentVariable ("APPVEYOR_BUILD_VERSION") ?? Argument("version", assemblyInfo.AssemblyFileVersion);
//////////////////////////////////////////////////////////////////////
// PREPARATION
//////////////////////////////////////////////////////////////////////
+// Define solution.
+var solution = "./Microsoft.Bcl.Build.Symbols.sln";
+
+// Define AssemblyInfo source.
+var assemblyInfoVersion = ParseAssemblyInfo("./Microsoft.Bcl.Build.Symbols/Properties/AssemblyInfo.cs");
+
+// Define version.
+var elapsedSpan = new TimeSpan(DateTime.Now.Ticks - new DateTime(2001, 1, 1).Ticks);
+var assemblyVersion = assemblyInfoVersion.AssemblyVersion.Replace("*", elapsedSpan.Ticks.ToString().Substring(4, 4));
+var version = EnvironmentVariable ("APPVEYOR_BUILD_VERSION") ?? Argument("version", assemblyVersion);
+
// Define directories.
-var buildDir = Directory("../Build/" + configuration);
+var outputDirectory = "Build/" + configuration;
+var buildDir = Directory("../" + outputDirectory);
//////////////////////////////////////////////////////////////////////
// TASKS
@@ -64,21 +72,27 @@ Task("Build-NuGet-Packages")
.IsDependentOn("Build")
.Does(() =>
{
- var nuGetPackSettings = new NuGetPackSettings()
- {
- OutputDirectory = "Build/" + configuration,
- IncludeReferencedProjects = false,
- Id = assemblyInfo.Title,
- Version = version,
- Authors = new [] {assemblyInfo.Company},
- Summary = assemblyInfo.Description,
- Copyright = assemblyInfo.Copyright,
- Properties = new Dictionary()
- {
- { "Configuration", configuration }
- }
- };
- NuGetPack(nuspec, nuGetPackSettings);
+ foreach (var folder in new System.IO.FileInfo(solution).Directory.GetDirectories())
+ foreach (var file in folder.GetFiles("*.nuspec"))
+ {
+ var assemblyInfo = ParseAssemblyInfo(folder + "/Properties/AssemblyInfo.cs");
+ var nuGetPackSettings = new NuGetPackSettings()
+ {
+ OutputDirectory = outputDirectory,
+ IncludeReferencedProjects = true,
+ Id = assemblyInfo.Title.Replace(" ", "."),
+ Title = assemblyInfo.Title,
+ Version = version,
+ Authors = new [] {assemblyInfo.Company},
+ Summary = assemblyInfo.Description,
+ Copyright = assemblyInfo.Copyright,
+ Properties = new Dictionary()
+ {
+ { "Configuration", configuration }
+ }
+ };
+ NuGetPack(file.FullName, nuGetPackSettings);
+ }
});
//////////////////////////////////////////////////////////////////////