Exception calling LoadFile

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 15 years and 5 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
monsieur_jj
Posts: 5
Last visit: Wed Mar 04, 2009 1:03 pm

Exception calling LoadFile

Post by monsieur_jj »

Hi all,

I am studying how to integrate powershell into visualbuild to automate the unit testing and just show the result. Now I am loading a dll in my script and i get an error:

Exception calling "LoadFile" with "1" argument(s): "The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)"
At :line:14 char:43
+ $BBuilder = [Reflection.Assembly]::LoadFile <<<< ('C:ManagepointRMMPBriefBuilder.dll') | out-null

This is generated via this code:


$ep = get-executionpolicy
if ($ep -eq 'unrestricted') {
write-warning ": harness running in unresticted mode`n"
}
$address = "C:ManagepointRMMPBriefBuilder.dll"
write-host "Loading library RMMPBriefBuilder.dll `n"
$BBuilder = [Reflection.Assembly]::LoadFile('C:ManagepointRMMPBriefBuilder.dll') | out-null

Now i am wondering what could be wrong.

Thanks,
Jayjay
This topic is 15 years and 5 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked