This is an automated email from the ASF dual-hosted git repository. nightowl888 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit f6dd70d9e7bf240f4563b9a13e0cd094ab09cd97 Author: Shad Storhaug <[email protected]> AuthorDate: Tue Jul 9 18:24:54 2019 +0700 Moved <AssemblyOriginatorKeyFile> to Directory.Build.props so we don't have to specify in every project at the same directory depth. Moved AssemblyKeys to Lucene.Net.Support. (closes #227, LUCENENET-608) --- Version.proj | 5 ----- src/CommonAssemblyKeys.cs | 4 ++-- src/Directory.Build.props | 7 +++++++ src/Lucene.Net.Analysis.Common/Properties/AssemblyInfo.cs | 3 ++- .../Properties/AssemblyInfo.cs | 3 ++- .../Properties/AssemblyInfo.cs | 3 ++- .../Properties/AssemblyInfo.cs | 3 ++- src/Lucene.Net.Benchmark/Properties/AssemblyInfo.cs | 4 ++-- src/Lucene.Net.Demo/Properties/AssemblyInfo.cs | 3 ++- src/Lucene.Net.Facet/Properties/AssemblyInfo.cs | 3 ++- src/Lucene.Net.Highlighter/Properties/AssemblyInfo.cs | 7 ++++--- src/Lucene.Net.Join/Properties/AssemblyInfo.cs | 3 ++- src/Lucene.Net.Memory/Properties/AssemblyInfo.cs | 3 ++- src/Lucene.Net.Misc/Properties/AssemblyInfo.cs | 3 ++- src/Lucene.Net.QueryParser/Properties/AssemblyInfo.cs | 3 ++- src/Lucene.Net.Spatial/Properties/AssemblyInfo.cs | 3 ++- src/Lucene.Net.Suggest/Properties/AssemblyInfo.cs | 3 ++- src/Lucene.Net.TestFramework/Properties/AssemblyInfo.cs | 5 +++-- src/Lucene.Net/Properties/AssemblyInfo.cs | 15 ++++++++------- src/dotnet/Directory.Build.props | 6 ++++++ src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj | 7 +------ src/dotnet/Lucene.Net.ICU/Properties/AssemblyInfo.cs | 3 ++- .../Lucene.Net.Replicator.AspNetCore.csproj | 5 ----- .../Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj | 6 ------ src/dotnet/tools/Directory.Build.props | 6 ++++++ .../Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj | 5 ----- src/dotnet/tools/lucene-cli/lucene-cli.csproj | 5 ----- 27 files changed, 65 insertions(+), 61 deletions(-) diff --git a/Version.proj b/Version.proj index 2a421b2..d603e38 100644 --- a/Version.proj +++ b/Version.proj @@ -31,11 +31,6 @@ <!-- .NET enforces AssemblyVersion as the "major" version (when strong-named), so AssemblyVersion should only be changed for each major version release. --> <AssemblyVersion>4.0.0</AssemblyVersion> - - <!-- This is the default location of Lucene.Net.snk relative to the project directory. - If the project is further nested from the repo root, override this value in the csproj. --> - <AssemblyOriginatorKeyFile>..\..\Lucene.Net.snk</AssemblyOriginatorKeyFile> - <SignAssembly>true</SignAssembly> </PropertyGroup> </Project> diff --git a/src/CommonAssemblyKeys.cs b/src/CommonAssemblyKeys.cs index 93f77a4..90e787a 100644 --- a/src/CommonAssemblyKeys.cs +++ b/src/CommonAssemblyKeys.cs @@ -18,11 +18,11 @@ using System; using System.Reflection; -namespace Lucene.Net +namespace Lucene.Net.Support { internal static class AssemblyKeys { - internal const string PublicKey = + public const string PublicKey = "002400000480000094000000060200000024000052534131000400000100010075a07ce602f88e" + "f263c7db8cb342c58ebd49ecdcc210fac874260b0213fb929ac3dcaf4f5b39744b800f99073eca" + "72aebfac5f7284e1d5f2c82012a804a140f06d7d043d83e830cdb606a04da2ad5374cc92c0a495" + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 7cb8e9e..572b263 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -26,4 +26,11 @@ SolutionDir is only available when running in the IDE, so we patch to ensure it also works when using dotnet.exe --> <SolutionDir Condition=" '$(SolutionDir)' == '' ">$(MSBuildThisFileDirectory)../</SolutionDir> </PropertyGroup> + + <PropertyGroup Label="Assembly Signing"> + <!-- This is the default location of Lucene.Net.snk relative to the project directory. + If the project is further nested from the repo root, override this value in the csproj. --> + <AssemblyOriginatorKeyFile>$(SolutionDir)Lucene.Net.snk</AssemblyOriginatorKeyFile> + <SignAssembly>true</SignAssembly> + </PropertyGroup> </Project> \ No newline at end of file diff --git a/src/Lucene.Net.Analysis.Common/Properties/AssemblyInfo.cs b/src/Lucene.Net.Analysis.Common/Properties/AssemblyInfo.cs index e0f1967..e1cfd92 100644 --- a/src/Lucene.Net.Analysis.Common/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Analysis.Common/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,7 +42,7 @@ using System.Runtime.InteropServices; [assembly: Guid("f57314a7-e71f-4b3c-860f-564046ca398b")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Analysis.Common, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Analysis.Common, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Analysis.Kuromoji/Properties/AssemblyInfo.cs b/src/Lucene.Net.Analysis.Kuromoji/Properties/AssemblyInfo.cs index 854d7b2..7b1665d 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/Properties/AssemblyInfo.cs @@ -15,6 +15,7 @@ * limitations under the License. */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -37,6 +38,6 @@ using System.Runtime.InteropServices; [assembly: Guid("8408625a-2508-46d5-8519-045183c43724")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Analysis.Kuromoji, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Analysis.Kuromoji, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Analysis.Phonetic/Properties/AssemblyInfo.cs b/src/Lucene.Net.Analysis.Phonetic/Properties/AssemblyInfo.cs index 476697e..c2353b7 100644 --- a/src/Lucene.Net.Analysis.Phonetic/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Analysis.Phonetic/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,6 +42,6 @@ using System.Runtime.InteropServices; [assembly: Guid("dafe3b64-616a-4a2f-90e5-1f135e8a9af5")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Analysis.Phonetic, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Analysis.Phonetic, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Analysis.Stempel/Properties/AssemblyInfo.cs b/src/Lucene.Net.Analysis.Stempel/Properties/AssemblyInfo.cs index ddd35ba..94491ce 100644 --- a/src/Lucene.Net.Analysis.Stempel/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Analysis.Stempel/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,6 +42,6 @@ using System.Runtime.InteropServices; [assembly: Guid("a76dad88-e3a5-40f9-9114-facd77bd8265")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Analysis.Stempel, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Analysis.Stempel, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Benchmark/Properties/AssemblyInfo.cs b/src/Lucene.Net.Benchmark/Properties/AssemblyInfo.cs index bf31b4e..ffb1acc 100644 --- a/src/Lucene.Net.Benchmark/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Benchmark/Properties/AssemblyInfo.cs @@ -15,7 +15,7 @@ * limitations under the License. */ - +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -38,6 +38,6 @@ using System.Runtime.InteropServices; [assembly: Guid("edc77cb4-597f-4818-8c83-3c006d12c384")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Benchmark, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Benchmark, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Demo/Properties/AssemblyInfo.cs b/src/Lucene.Net.Demo/Properties/AssemblyInfo.cs index 11f866a..547a89e 100644 --- a/src/Lucene.Net.Demo/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Demo/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -33,7 +34,7 @@ using System.Runtime.InteropServices; [assembly: CLSCompliant(true)] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Demo, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Demo, PublicKey=" + AssemblyKeys.PublicKey)] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/src/Lucene.Net.Facet/Properties/AssemblyInfo.cs b/src/Lucene.Net.Facet/Properties/AssemblyInfo.cs index d6a3f8c..1030b04 100644 --- a/src/Lucene.Net.Facet/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Facet/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,6 +42,6 @@ using System.Runtime.InteropServices; [assembly: Guid("8dd11ab2-c5b3-4691-99da-2941f27e0e10")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Facet, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Facet, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Highlighter/Properties/AssemblyInfo.cs b/src/Lucene.Net.Highlighter/Properties/AssemblyInfo.cs index 94ed833..6fe1b6b 100644 --- a/src/Lucene.Net.Highlighter/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Highlighter/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -40,9 +41,9 @@ using System.Runtime.InteropServices; // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("e9e769ea-8504-44bc-8dc9-ccf958765f8f")] -[assembly: InternalsVisibleTo("Lucene.Net.ICU, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.ICU, PublicKey=" + AssemblyKeys.PublicKey)] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Highlighter, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] -[assembly: InternalsVisibleTo("Lucene.Net.Tests.ICU, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Highlighter, PublicKey=" + AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.ICU, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Join/Properties/AssemblyInfo.cs b/src/Lucene.Net.Join/Properties/AssemblyInfo.cs index 3898fdc..cfa00bb 100644 --- a/src/Lucene.Net.Join/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Join/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,6 +42,6 @@ using System.Runtime.InteropServices; [assembly: Guid("e8a339c7-fcf6-4a72-8586-56d8961d7b99")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Join, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Join, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Memory/Properties/AssemblyInfo.cs b/src/Lucene.Net.Memory/Properties/AssemblyInfo.cs index 2c9e42d..702ac64 100644 --- a/src/Lucene.Net.Memory/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Memory/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,6 +42,6 @@ using System.Runtime.InteropServices; [assembly: Guid("ca052094-4c45-44d7-9dcf-3d46ae6930fe")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Memory, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Memory, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Misc/Properties/AssemblyInfo.cs b/src/Lucene.Net.Misc/Properties/AssemblyInfo.cs index 99098d6..f0156f4 100644 --- a/src/Lucene.Net.Misc/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Misc/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,6 +42,6 @@ using System.Runtime.InteropServices; [assembly: Guid("b2a3a8e1-a92a-4bd6-9f87-7747470615c3")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Misc, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Misc, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.QueryParser/Properties/AssemblyInfo.cs b/src/Lucene.Net.QueryParser/Properties/AssemblyInfo.cs index d39a8f7..e2f6951 100644 --- a/src/Lucene.Net.QueryParser/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.QueryParser/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,6 +42,6 @@ using System.Runtime.InteropServices; [assembly: Guid("7c58cf05-89dd-4c02-a948-c28cdaf05247")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.QueryParser, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.QueryParser, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Spatial/Properties/AssemblyInfo.cs b/src/Lucene.Net.Spatial/Properties/AssemblyInfo.cs index 0b66524..79ca457 100644 --- a/src/Lucene.Net.Spatial/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Spatial/Properties/AssemblyInfo.cs @@ -15,6 +15,7 @@ * limitations under the License. */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -38,6 +39,6 @@ using System.Security; [assembly: Guid("5c8e810f-4bf7-472f-9785-8d80a0de6ea8")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Spatial, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Spatial, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.Suggest/Properties/AssemblyInfo.cs b/src/Lucene.Net.Suggest/Properties/AssemblyInfo.cs index 091808c..e8f3b31 100644 --- a/src/Lucene.Net.Suggest/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.Suggest/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,6 +42,6 @@ using System.Runtime.InteropServices; [assembly: Guid("0e1499f7-850e-4583-8994-623eb2480200")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Suggest, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Suggest, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net.TestFramework/Properties/AssemblyInfo.cs b/src/Lucene.Net.TestFramework/Properties/AssemblyInfo.cs index 178d7db..3c3a495 100644 --- a/src/Lucene.Net.TestFramework/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net.TestFramework/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -40,7 +41,7 @@ using System.Runtime.InteropServices; // We need InternalsVisibleTo in order to prevent making everything public just for the sake of testing. // This has broad implications, though because many methods are marked "protected internal", which means other assemblies // must update overridden methods to match. -[assembly: InternalsVisibleTo("Lucene.Net.Tests, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Misc, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests, PublicKey=" + AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Misc, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/Lucene.Net/Properties/AssemblyInfo.cs b/src/Lucene.Net/Properties/AssemblyInfo.cs index 8ba038c..9658deb 100644 --- a/src/Lucene.Net/Properties/AssemblyInfo.cs +++ b/src/Lucene.Net/Properties/AssemblyInfo.cs @@ -15,6 +15,7 @@ * limitations under the License. */ +using Lucene.Net.Support; using System; using System.Diagnostics; using System.Reflection; @@ -32,12 +33,12 @@ using System.Runtime.CompilerServices; // We need InternalsVisibleTo in order to prevent making everything public just for the sake of testing. // This has broad implications because many methods are marked "protected internal", which means other assemblies // must update overridden methods to match. -[assembly: InternalsVisibleTo("Lucene.Net.Tests, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] -[assembly: InternalsVisibleTo("Lucene.Net.TestFramework, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] -[assembly: InternalsVisibleTo("Lucene.Net.Misc, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] -[assembly: InternalsVisibleTo("Lucene.Net.Tests.ICU, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] // For Analysis.Util.TestSegmentingTokenizerBase -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Misc, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] -[assembly: InternalsVisibleTo("Lucene.Net.Tests.QueryParser, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] -[assembly: InternalsVisibleTo("Lucene.Net.Tests.Cli, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] // For lucene-cli +[assembly: InternalsVisibleTo("Lucene.Net.Tests, PublicKey=" + AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.TestFramework, PublicKey=" + AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Misc, PublicKey=" + AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.ICU, PublicKey=" + AssemblyKeys.PublicKey)] // For Analysis.Util.TestSegmentingTokenizerBase +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Misc, PublicKey=" + AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.QueryParser, PublicKey=" + AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.Cli, PublicKey=" + AssemblyKeys.PublicKey)] // For lucene-cli // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/dotnet/Directory.Build.props b/src/dotnet/Directory.Build.props index b299cb2..4fd6669 100644 --- a/src/dotnet/Directory.Build.props +++ b/src/dotnet/Directory.Build.props @@ -26,4 +26,10 @@ SolutionDir is only available when running in the IDE, so we patch to ensure it also works when using dotnet.exe --> <SolutionDir>$(MSBuildThisFileDirectory)../../</SolutionDir> </PropertyGroup> + + <PropertyGroup Label="Assembly Signing"> + <!-- This is the default location of Lucene.Net.snk relative to the project directory. + If the project is further nested from the repo root, override this value in the csproj. --> + <AssemblyOriginatorKeyFile>$(SolutionDir)Lucene.Net.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> </Project> \ No newline at end of file diff --git a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj index 17df6a5..0be847a 100644 --- a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj +++ b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj @@ -23,12 +23,7 @@ <Import Project="$(SolutionDir)Version.proj" /> <Import Project="$(SolutionDir)build/NuGet.props" /> - <Import Project="..\..\..\Version.proj" /> - <PropertyGroup> - <!-- Override AssemblyOriginatorKeyFile specified in Version.proj because we're deeper from the root --> - <AssemblyOriginatorKeyFile>..\..\..\Lucene.Net.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> - + <PropertyGroup> <TargetFrameworks>netstandard1.6;net45</TargetFrameworks> <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback> diff --git a/src/dotnet/Lucene.Net.ICU/Properties/AssemblyInfo.cs b/src/dotnet/Lucene.Net.ICU/Properties/AssemblyInfo.cs index a9eeb43..b1de0be 100644 --- a/src/dotnet/Lucene.Net.ICU/Properties/AssemblyInfo.cs +++ b/src/dotnet/Lucene.Net.ICU/Properties/AssemblyInfo.cs @@ -19,6 +19,7 @@ * */ +using Lucene.Net.Support; using System; using System.Reflection; using System.Runtime.CompilerServices; @@ -41,6 +42,6 @@ using System.Runtime.InteropServices; [assembly: Guid("349cb7c9-7534-4e1d-9b0a-5521441af0ae")] // for testing -[assembly: InternalsVisibleTo("Lucene.Net.Tests.ICU, PublicKey=" + Lucene.Net.AssemblyKeys.PublicKey)] +[assembly: InternalsVisibleTo("Lucene.Net.Tests.ICU, PublicKey=" + AssemblyKeys.PublicKey)] // NOTE: Version information is in CommonAssemblyInfo.cs diff --git a/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj b/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj index ee1a4cc..f101455 100644 --- a/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj +++ b/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj @@ -24,11 +24,6 @@ <Import Project="$(SolutionDir)Version.proj" /> <!-- For now, we are not deploying this to NuGet.org --> <!--<Import Project="$(SolutionDir)build/NuGet.props" />--> - <Import Project="..\..\..\Version.proj" /> - <PropertyGroup> - <!-- Override AssemblyOriginatorKeyFile specified in Version.proj because we're deeper from the root --> - <AssemblyOriginatorKeyFile>..\..\..\Lucene.Net.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> <PropertyGroup> <TargetFrameworks>netstandard1.6;net451</TargetFrameworks> diff --git a/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj b/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj index d19079e..789f370 100644 --- a/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj +++ b/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj @@ -23,12 +23,6 @@ <Import Project="$(SolutionDir)TestTargetFramework.proj" /> <Import Project="$(SolutionDir)Version.proj" /> - <Import Project="..\..\..\TestTargetFramework.proj" /> - <Import Project="..\..\..\Version.proj" /> - <PropertyGroup> - <!-- Override AssemblyOriginatorKeyFile specified in Version.proj because we're deeper from the root --> - <AssemblyOriginatorKeyFile>..\..\..\Lucene.Net.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> <PropertyGroup> <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback> diff --git a/src/dotnet/tools/Directory.Build.props b/src/dotnet/tools/Directory.Build.props index 60fd836..f4aeda3 100644 --- a/src/dotnet/tools/Directory.Build.props +++ b/src/dotnet/tools/Directory.Build.props @@ -26,4 +26,10 @@ SolutionDir is only available when running in the IDE, so we patch to ensure it also works when using dotnet.exe --> <SolutionDir>$(MSBuildThisFileDirectory)../../../</SolutionDir> </PropertyGroup> + + <PropertyGroup Label="Assembly Signing"> + <!-- This is the default location of Lucene.Net.snk relative to the project directory. + If the project is further nested from the repo root, override this value in the csproj. --> + <AssemblyOriginatorKeyFile>$(SolutionDir)Lucene.Net.snk</AssemblyOriginatorKeyFile> + </PropertyGroup> </Project> \ No newline at end of file diff --git a/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj b/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj index 6ac9783..3fec7de 100644 --- a/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj +++ b/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj @@ -22,11 +22,6 @@ <Project Sdk="Microsoft.NET.Sdk"> <Import Project="$(SolutionDir)Version.proj" /> - <Import Project="..\..\..\..\Version.proj" /> - <PropertyGroup> - <!-- Override AssemblyOriginatorKeyFile specified in Version.proj because we're deeper from the root --> - <AssemblyOriginatorKeyFile>..\..\..\..\Lucene.Net.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> <PropertyGroup> <TargetFramework>netcoreapp2.1</TargetFramework> diff --git a/src/dotnet/tools/lucene-cli/lucene-cli.csproj b/src/dotnet/tools/lucene-cli/lucene-cli.csproj index 5073960..1be4be2 100644 --- a/src/dotnet/tools/lucene-cli/lucene-cli.csproj +++ b/src/dotnet/tools/lucene-cli/lucene-cli.csproj @@ -23,11 +23,6 @@ <Import Project="$(SolutionDir)Version.proj" /> <Import Project="$(SolutionDir)build/NuGet.props" /> - <Import Project="..\..\..\..\Version.proj" /> - <PropertyGroup> - <!-- Override AssemblyOriginatorKeyFile specified in Version.proj because we're deeper from the root --> - <AssemblyOriginatorKeyFile>..\..\..\..\Lucene.Net.snk</AssemblyOriginatorKeyFile> - </PropertyGroup> <PropertyGroup> <TargetFramework>netcoreapp2.1</TargetFramework>
