From 81e4c6be9242b3c2fd062a6a4440bb284fa612c0 Mon Sep 17 00:00:00 2001 From: Petrik van der Velde Date: Sat, 8 Jun 2019 10:50:26 +1200 Subject: [PATCH] Updating the Nuclei.Build project to .Net standard 1.3 references #7 --- .../AssemblyBuildInformationAttribute.cs | 7 +- .../AssemblyBuildTimeAttribute.cs | 7 +- src/nuclei.build/Nuclei.Build.csproj | 105 +++++---------- src/nuclei.build/Properties/AssemblyInfo.cs | 28 +--- .../Properties/Resources.Designer.cs | 73 +++++++++++ src/nuclei.build/Properties/Resources.resx | 123 ++++++++++++++++++ src/nuclei.build/nuclei.build.nuspec | 27 ---- src/nuclei.build/packages.config | 4 - 8 files changed, 240 insertions(+), 134 deletions(-) create mode 100644 src/nuclei.build/Properties/Resources.Designer.cs create mode 100644 src/nuclei.build/Properties/Resources.resx delete mode 100644 src/nuclei.build/nuclei.build.nuspec delete mode 100644 src/nuclei.build/packages.config diff --git a/src/nuclei.build/AssemblyBuildInformationAttribute.cs b/src/nuclei.build/AssemblyBuildInformationAttribute.cs index 3aac1d8..fba6eb2 100644 --- a/src/nuclei.build/AssemblyBuildInformationAttribute.cs +++ b/src/nuclei.build/AssemblyBuildInformationAttribute.cs @@ -7,6 +7,7 @@ using System; using System.Diagnostics.CodeAnalysis; +using Nuclei.Build.Properties; namespace Nuclei.Build { @@ -34,12 +35,14 @@ public AssemblyBuildInformationAttribute(int buildNumber, string versionControlI { if (versionControlInformation == null) { - throw new ArgumentNullException("versionControlInformation", "The version control information string should not be null"); + throw new ArgumentNullException(nameof(versionControlInformation)); } if (string.IsNullOrWhiteSpace(versionControlInformation)) { - throw new ArgumentException("The version control information string should not be an empty string.", "versionControlInformation"); + throw new ArgumentException( + Resources.Exceptions_Messages_ParameterShouldNotBeAnEmptyString, + nameof(versionControlInformation)); } BuildNumber = buildNumber; diff --git a/src/nuclei.build/AssemblyBuildTimeAttribute.cs b/src/nuclei.build/AssemblyBuildTimeAttribute.cs index eb1ecb0..ff08d34 100644 --- a/src/nuclei.build/AssemblyBuildTimeAttribute.cs +++ b/src/nuclei.build/AssemblyBuildTimeAttribute.cs @@ -8,6 +8,7 @@ using System; using System.Diagnostics.CodeAnalysis; using System.Globalization; +using Nuclei.Build.Properties; namespace Nuclei.Build { @@ -38,12 +39,14 @@ public AssemblyBuildTimeAttribute(string buildTime) { if (buildTime == null) { - throw new ArgumentNullException("buildTime", "The build time string should not be null"); + throw new ArgumentNullException(nameof(buildTime)); } if (string.IsNullOrWhiteSpace(buildTime)) { - throw new ArgumentException("The build time string should not be an empty string.", "buildTime"); + throw new ArgumentException( + Resources.Exceptions_Messages_ParameterShouldNotBeAnEmptyString, + nameof(buildTime)); } BuildTime = DateTimeOffset.ParseExact(buildTime, "o", CultureInfo.InvariantCulture); diff --git a/src/nuclei.build/Nuclei.Build.csproj b/src/nuclei.build/Nuclei.Build.csproj index 1102dca..a2b4a7a 100644 --- a/src/nuclei.build/Nuclei.Build.csproj +++ b/src/nuclei.build/Nuclei.Build.csproj @@ -1,86 +1,47 @@ - - + - $(MSBuildProjectDirectory)\.. - - - $(MSBuildProjectDirectory)\.. - {AEA39FA0-9B45-4FDF-B94C-543E410F480C} - Library - Nuclei.Build - Nuclei.Build - - 9.0.30729 - 2.0 - - Debug - AnyCPU - v4.0 - 512 - - Properties - $(SolutionDir)\..\build\bin\$(Platform)\$(Configuration)\ - $(SolutionDir)\..\build\temp\bin\obj\$(AssemblyName)\$(Platform)\$(Configuration)\ - - prompt - 4 - true + netstandard1.3 + 1.0.0.0 + 1.0.0.0 true - ..\default.ruleset - - - true - full - false - TRACE;DEBUG;CODE_ANALYSIS - - pdbonly - true - TRACE;CODE_ANALYSIS - - - pdbonly - true - TRACE + + + true + 1.0.0 + P. van der Velde + Company + Nuclei.Build + Provides attributes that can be applied to assemblies to provide build related information. + Mine + Apache-2.0 + https://github.com/thenucleus/nuclei.build + https://github.com/thenucleus/nuclei.build - - - - - - - - - - - + Properties\App.snk - - - - Designer - - - - + + + all + runtime; build; native; contentfiles; analyzers + + + + + True + True + Resources.resx + - - - + + ResXFileCodeGenerator + Resources.Designer.cs + - - \ No newline at end of file diff --git a/src/nuclei.build/Properties/AssemblyInfo.cs b/src/nuclei.build/Properties/AssemblyInfo.cs index 8d2bc50..5f8d388 100644 --- a/src/nuclei.build/Properties/AssemblyInfo.cs +++ b/src/nuclei.build/Properties/AssemblyInfo.cs @@ -12,20 +12,10 @@ using System.Runtime.InteropServices; using Nuclei.Build; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Nuclei.Build")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyProduct("Nuclei.Build")] - -[assembly: AssemblyCompany("")] -[assembly: AssemblyCopyright("Copyright © 2013")] - [assembly: AssemblyCulture("")] // Resources -[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.MainAssembly)] +[assembly: NeutralResourcesLanguage("en-US")] // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -40,22 +30,6 @@ // Indicate that the assembly is CLS compliant. [assembly: CLSCompliant(true)] -[assembly: AssemblyConfiguration("Release")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: AssemblyInformationalVersion("1.0.0.0")] - // The time the assembly was build [assembly: AssemblyBuildTime(buildTime: "1900-01-01T00:00:00.0000000+00:00")] diff --git a/src/nuclei.build/Properties/Resources.Designer.cs b/src/nuclei.build/Properties/Resources.Designer.cs new file mode 100644 index 0000000..3aa4c7c --- /dev/null +++ b/src/nuclei.build/Properties/Resources.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Nuclei.Build.Properties { + using System; + using System.Reflection; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Nuclei.Build.Properties.Resources", typeof(Resources).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The parameter should not be an empty string.. + /// + internal static string Exceptions_Messages_ParameterShouldNotBeAnEmptyString { + get { + return ResourceManager.GetString("Exceptions_Messages_ParameterShouldNotBeAnEmptyString", resourceCulture); + } + } + } +} diff --git a/src/nuclei.build/Properties/Resources.resx b/src/nuclei.build/Properties/Resources.resx new file mode 100644 index 0000000..0740405 --- /dev/null +++ b/src/nuclei.build/Properties/Resources.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The parameter should not be an empty string. + + \ No newline at end of file diff --git a/src/nuclei.build/nuclei.build.nuspec b/src/nuclei.build/nuclei.build.nuspec deleted file mode 100644 index 9b8d2a5..0000000 --- a/src/nuclei.build/nuclei.build.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - Nuclei.Build - $VersionSemantic$ - P. van der Velde - $CompanyName$ - http://www.apache.org/licenses/LICENSE-2.0 - $CompanyUrl$ - false - - Provides attributes that can be applied to assemblies to provide build related information. - - - $ReleaseNotes$ - - - $Dependencies$ - - - - - - - - - \ No newline at end of file diff --git a/src/nuclei.build/packages.config b/src/nuclei.build/packages.config deleted file mode 100644 index ca94d10..0000000 --- a/src/nuclei.build/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file