Skip to content

Commit e984bdc

Browse files
committed
Adapt to new functionality from master
1 parent 1b560ba commit e984bdc

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/Nerdbank.GitVersioning.Tasks/AssemblyVersionInfo.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,17 @@ private void CreateAssemblyAttributes()
259259
this.generator.DeclareAttribute(typeof(AssemblyVersionAttribute), this.AssemblyVersion);
260260
this.generator.DeclareAttribute(typeof(AssemblyFileVersionAttribute), this.AssemblyFileVersion);
261261
this.generator.DeclareAttribute(typeof(AssemblyInformationalVersionAttribute), this.AssemblyInformationalVersion);
262-
if (!string.IsNullOrEmpty(this.AssemblyTitle))
263-
this.generator.DeclareAttribute(typeof(AssemblyTitleAttribute), this.AssemblyTitle);
264-
if (!string.IsNullOrEmpty(this.AssemblyProduct))
265-
this.generator.DeclareAttribute(typeof(AssemblyProductAttribute), this.AssemblyProduct);
266-
if (!string.IsNullOrEmpty(this.AssemblyCompany))
267-
this.generator.DeclareAttribute(typeof(AssemblyCompanyAttribute), this.AssemblyCompany);
268-
if (!string.IsNullOrEmpty(this.AssemblyCopyright))
269-
this.generator.DeclareAttribute(typeof(AssemblyCopyrightAttribute), this.AssemblyCopyright);
262+
if (this.EmitNonVersionCustomAttributes)
263+
{
264+
if (!string.IsNullOrEmpty(this.AssemblyTitle))
265+
this.generator.DeclareAttribute(typeof(AssemblyTitleAttribute), this.AssemblyTitle);
266+
if (!string.IsNullOrEmpty(this.AssemblyProduct))
267+
this.generator.DeclareAttribute(typeof(AssemblyProductAttribute), this.AssemblyProduct);
268+
if (!string.IsNullOrEmpty(this.AssemblyCompany))
269+
this.generator.DeclareAttribute(typeof(AssemblyCompanyAttribute), this.AssemblyCompany);
270+
if (!string.IsNullOrEmpty(this.AssemblyCopyright))
271+
this.generator.DeclareAttribute(typeof(AssemblyCopyrightAttribute), this.AssemblyCopyright);
272+
}
270273
}
271274

272275
private void CreateThisAssemblyClass()

0 commit comments

Comments
 (0)