Skip to content

Commit 9057ecb

Browse files
committed
Proposed fix to #100
This should make sure to use the "old" logic for any files reference by name, based on if they have .dll in their name. Otherwise it will simply try and load using the Add-Type and make sure it doesn't throw an error.
1 parent aa92235 commit 9057ecb

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

templates/PSFTests/general/Manifest.Tests.ps1

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,17 @@
4040

4141
foreach ($assembly in $manifest.RequiredAssemblies)
4242
{
43-
It "The file $assembly should exist" {
44-
Test-Path "$moduleRoot\$assembly" | Should -Be $true
45-
}
46-
}
43+
if ($assembly -contains ".dll") {
44+
It "The file $assembly should exist" {
45+
Test-Path "$moduleRoot\$assembly" | Should -Be $true
46+
}
47+
}
48+
else {
49+
It "The file $assembly should load from the GAC" {
50+
{ Add-Type -AssemblyName $assembly } | Should -Not -Throw
51+
}
52+
}
53+
}
4754

4855
foreach ($tag in $manifest.PrivateData.PSData.Tags)
4956
{

0 commit comments

Comments
 (0)