Skip to content

Commit 07fdd7e

Browse files
authored
Copy assemblyinfo.cs for hybrid module (#16692)
For hybrid module, we should have assemblyinfo.cs file for nested module as well
1 parent b4ba448 commit 07fdd7e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/Gen2Master/MoveFromGeneration2Master.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ Function Move-Generation2MasterHybrid {
316316
$Psd1Metadata.Remove("PrivateData")
317317
}
318318
New-ModuleManifest -Path $DestPsd1Path @Psd1Metadata
319+
320+
# Copy the assemblyinfo file
321+
Copy-Template -SourceName AssemblyInfo.cs -DestPath (Join-Path (Join-Path $DestPath $submoduleDir.Name) "Properties") -DestName AssemblyInfo.cs -ModuleName $submoduleName
319322
}
320323

321324
#update module page
@@ -361,7 +364,7 @@ Function Copy-Template {
361364
$DestPath = Join-Path -Path $DestPath -ChildPath $DestName
362365
If (-not (Test-Path -Path $DestPath)) {
363366
Write-Host "Copying template: $SourceName." -ForegroundColor Yellow
364-
New-Item -Path $DestPath
367+
New-Item -Path $DestPath -Force
365368
$TemplatePath = Join-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath "Templates") -ChildPath $SourceName
366369
$TemplateContent = Get-Content -Path $TemplatePath
367370
If ($TemplateContent -Match "{GUID}") {

0 commit comments

Comments
 (0)