Issues with logging the past week

Hi again Adrian,

As mentioned by @mjr4077au in this bug report: [Bug] Duplicate Assets and String folders (New-ADTTemplate issue?) · Issue #1152 · PSAppDeployToolkit/PSAppDeployToolkit · GitHub

It’s meant to allow for modifications using the template/config/config.psd1 as long as I don’t modify anything in the template/PSAppDeployToolkit/*

Anyways, the last test I made was without any modifications whatsoever, simply a New-ADTFolder in the invoke-appdeploytoolkit.ps1

On top of that, I just now tried to run the script directly again and got a new error message:

PS D:\test\PSADTv4 - Test> .\Invoke-AppDeployToolkit.ps1
Import-Module : The specified module 'PSAppDeployToolkit' with version '4.0.4' was not loaded because no valid module file was found in any module directory.
At D:\test\PSADTv4 - Test\Invoke-AppDeployToolkit.ps1:276 char:5
+     Import-Module -FullyQualifiedName @{ ModuleName = $moduleName; Gu ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (PSAppDeployToolkit:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleWithVersionNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

It seems like it’s not correctly initializing the module, even though the module is readily available as a part of the template.
Running the .exe instead results in nothing, no output, no errors, no success just nothing

1 Like

With the above import error, I’d just download the latest template off GitHub and try again as something is likely broken. Once you’ve done that, if you have any further issues, report back and we can see what’s what.

2 Likes

I agree with @mjr4077au’s comment

I’ve been rethinking your comment… :thinking:

… I’m assuming you did not modify the Invoke-AppDeployToolKit.ps1 inside the .\PSAppDeployToolkit\FrontEnd\v4 folder? - This file is part of the code signed module (The signature block begins at line 321 on the original (v4.0.4) file) so should not be modified at all - or else you will likely be encountering code signing issues like you had above.

No no, just the one in the root of the template structure :slight_smile:

@mjr4077au I’ll give it a try with the github version

I am experiencing the same problem. The only working solution I have currently found is to install the “PSAppDeployToolkit” module before running the install script.

@Boesh what’s your exact issue? The OP seemingly had a corrupted module so yours may vary.

I still had an issue with the github version, re-installed the modules from the psgallery to no avail. I then tried on a new computer and used the github from the get go and it works. Reimaged the original pc and both versions now work for me.

Something seemed broken on the original pc apparently.

Thanks for the help guys

1 Like

My problem has also been solved in the meantime.
I had created a new project via the module on a network share. This changed the path for the variable “$moduleName” (row 267) which caused the script to stop working.
By first creating a project locally and then copying it to a network share, the problem was solved.

I believe there’s an open issue for this. If not, I’ll create one so we can repair it.

@Boesh I created [Bug] Fix `ReadAllText()`/`WriteAllText()` method calls within `New-ADTTemplate` for network shares. · Issue #1255 · PSAppDeployToolkit/PSAppDeployToolkit · GitHub for this, however I can’t replicate the issue. I ran New-ADTTemplate -Destination \\172.31.255.105\Data\Temp but it worked fine on my side (i.e. line 267 was modified as expected).

Can I please test again and confirm any specifics I may need to know?