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 7d40ab8a98904d2f0833ffe4a2120edbb926a07b
Author: Shad Storhaug <[email protected]>
AuthorDate: Thu Apr 15 02:56:11 2021 +0700

    Lucene.Net.CodeAnalysis: Added Version.props file to make it possible to 
manually bump the assembly number by one revision on any code change (VS 
requires this, see: 
https://github.com/dotnet/roslyn/issues/4381#issuecomment-342867710).
---
 Lucene.Net.sln                                     |  3 ++
 .../Lucene.Net.CodeAnalysis.CSharp.csproj          |  4 ++-
 .../Lucene.Net.CodeAnalysis.VisualBasic.csproj     |  4 ++-
 src/dotnet/Lucene.Net.CodeAnalysis/Version.props   | 32 ++++++++++++++++++++++
 4 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/Lucene.Net.sln b/Lucene.Net.sln
index 591bda9..55b54e8 100644
--- a/Lucene.Net.sln
+++ b/Lucene.Net.sln
@@ -205,6 +205,9 @@ EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = 
"Lucene.Net.CodeAnalysis.VisualBasic", 
"src\dotnet\Lucene.Net.CodeAnalysis.VisualBasic\Lucene.Net.CodeAnalysis.VisualBasic.csproj",
 "{5CD4D4E8-6132-4384-98FC-6AB1C97E0B80}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lucene.Net.CodeAnalysis", 
"Lucene.Net.CodeAnalysis", "{E5E8C5DC-7048-4818-B884-FB2D037D2EF2}"
+       ProjectSection(SolutionItems) = preProject
+               src\dotnet\Lucene.Net.CodeAnalysis\Version.props = 
src\dotnet\Lucene.Net.CodeAnalysis\Version.props
+       EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", 
"{4D0ED7D9-ABEE-4890-B06C-477E3A32B9A0}"
        ProjectSection(SolutionItems) = preProject
diff --git 
a/src/dotnet/Lucene.Net.CodeAnalysis.CSharp/Lucene.Net.CodeAnalysis.CSharp.csproj
 
b/src/dotnet/Lucene.Net.CodeAnalysis.CSharp/Lucene.Net.CodeAnalysis.CSharp.csproj
index d59414a..01d3849 100644
--- 
a/src/dotnet/Lucene.Net.CodeAnalysis.CSharp/Lucene.Net.CodeAnalysis.CSharp.csproj
+++ 
b/src/dotnet/Lucene.Net.CodeAnalysis.CSharp/Lucene.Net.CodeAnalysis.CSharp.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -26,6 +26,8 @@
     <IncludeBuildOutput>false</IncludeBuildOutput>
   </PropertyGroup>
 
+  <Import Project="..\Lucene.Net.CodeAnalysis\Version.props" />
+
   <ItemGroup>
     <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" 
Version="$(MicrosoftCodeAnalysisAnalyzersPackageVersion)" PrivateAssets="all" />
     <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" 
Version="$(MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion)" 
PrivateAssets="all" />
diff --git 
a/src/dotnet/Lucene.Net.CodeAnalysis.VisualBasic/Lucene.Net.CodeAnalysis.VisualBasic.csproj
 
b/src/dotnet/Lucene.Net.CodeAnalysis.VisualBasic/Lucene.Net.CodeAnalysis.VisualBasic.csproj
index 3dbe3b2..9ac08af 100644
--- 
a/src/dotnet/Lucene.Net.CodeAnalysis.VisualBasic/Lucene.Net.CodeAnalysis.VisualBasic.csproj
+++ 
b/src/dotnet/Lucene.Net.CodeAnalysis.VisualBasic/Lucene.Net.CodeAnalysis.VisualBasic.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -26,6 +26,8 @@
     <IncludeBuildOutput>false</IncludeBuildOutput>
   </PropertyGroup>
 
+  <Import Project="..\Lucene.Net.CodeAnalysis\Version.props" />
+
   <ItemGroup>
     <PackageReference Include="Microsoft.CodeAnalysis.Analyzers" 
Version="$(MicrosoftCodeAnalysisAnalyzersPackageVersion)" PrivateAssets="all" />
     <PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" 
Version="$(MicrosoftCodeAnalysisVisualBasicWorkspacesPackageVersion)" 
PrivateAssets="all" />
diff --git a/src/dotnet/Lucene.Net.CodeAnalysis/Version.props 
b/src/dotnet/Lucene.Net.CodeAnalysis/Version.props
new file mode 100644
index 0000000..dee7b35
--- /dev/null
+++ b/src/dotnet/Lucene.Net.CodeAnalysis/Version.props
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ ""License""); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+   http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ ""AS IS"" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<Project>
+  <PropertyGroup Label="Version Override Properties">
+    <!-- Visual Studio doesn't reload analyzers with changes if you don't 
manually bump the assembly version on each change to the
+         analyzer (or the install/uninstall scripts). See: 
https://github.com/dotnet/roslyn/issues/4381#issuecomment-342867710
+
+         IMPORTANT: Make sure you update the AssemblyVersionRevision number on 
every code change!
+     -->
+    <AssemblyVersionRevision>1</AssemblyVersionRevision>
+
+    
<AssemblyMajorMinorPatchPattern>^\d+\.\d+\.\d+</AssemblyMajorMinorPatchPattern>
+    
<AssemblyMajorMinorPatch>$([System.Text.RegularExpressions.Regex]::Match($(AssemblyVersion),
 $(AssemblyMajorMinorPatchPattern)))</AssemblyMajorMinorPatch>
+    
+    
<AssemblyVersion>$(AssemblyMajorMinorPatch).$(AssemblyVersionRevision)</AssemblyVersion>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

Reply via email to