Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with New-HTML : The file 'NUglify.resources' could not be found. #467

Open
Rapidhands opened this issue Dec 30, 2024 · 5 comments
Open

Comments

@Rapidhands
Copy link

Hi Klyss,

I have a strange issue using New-HTML and I think I have found the cause.

More info in the transcript file : transcript.txt.
I have also add PSWriteHTML and PSParseHTML version in the transcript.

As you can see, I'm using the -Minify parameter with New-HTML. and I have an error, but If i disable this parameter, my function using New-HTML runs fine.

Hope this help you and happy new year
Regards

@PrzemyslawKlys
Copy link
Member

You need to install PSParseHTML for -Minify or -Format to work.

@Rapidhands
Copy link
Author

PSParseHTML is installed (see transcript) in the last version.

@PrzemyslawKlys
Copy link
Member

What versio of net framework you have installed? To me it seems like someting didn't load. Either files are missing, or old net framework.

@Rapidhands
Copy link
Author

PowerShellVersion : 5.1.22621.4391
NetFrameworkVersions : v2.0.50727; Version=2.0.50727.4927
v3.0; Version=3.0.30729.4926
Windows Communication Foundation; Version=3.0.4506.4926
Windows Presentation Foundation; Version=3.0.6920.4902
DotNetCoreVersions : Microsoft.AspNetCore.App; Version=7.0.20
Microsoft.AspNetCore.App; Version=9.0.0}
Microsoft.NETCore.App; Version=6.0.36
Microsoft.NETCore.App; Version=7.0.20
LatestNetFramework : 4.8.09032
LatestDotNetCore : 9.0.0

As you can see, .NET framework is on the latest version.

If it helps, I'll send you the full code I'm using in attachment. This is an advanced feature I built.
Get-EOL-V3.ps1.txt
I can also provide the exact command line I'm using.
Get-EOL -ProductName windows-server -Export -Verbose

My observations : I use the function in 2 ways: The first with in $PSDefaultParameterValues ​​(see line 230 and following), New-HTML:Minify'= $false, and the second way 'New-HTML:Minify'= $true

The problem only occurs when Minify = $true.
In both cases, I ran in Verbose mode and I have this line
"COMMENTS: Unable to verify version of Microsoft .NET Framework 4.7.2 because it is not in the list of allowed versions."

With Minify = $true, an fatal error occured.
Get-EOL : Failed to generate report: Exception calling "Html" with "2" argument(s): "The file 'NUglify.resources' could not be found."
At character Line:1 : 1

  • Get-EOL -ProductName windows-server -Export -Verbose
  • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
  • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-EOL

Hope this help

@PrzemyslawKlys
Copy link
Member

It's a problem on PSParseHTML, for some reason it doesn't work for you. Nothing to do with PSWriteHTML. You can try reinstalling it, and listing/checking files it has. Maybe try PS 7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants