![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Problem with Power Shell and .config Files We're new to PS, and trying to instantiate and invoke our .NET objects from PS scripts. What a GREAT tool! We've overcome the initial learning curve, gotten past the intracies of LoadFrom() vs LoadFile() in the Reflection namespace, but have been stopped short because our objects hit .config files. We overcame the first problem - finding our config file in a custom location. For those not familiar, this does the trick nicely: [System.AppDomain]::CurrentDomain.SetData("APP_CONFIG_FILE", $currDir + "\app.config"); Now, however, we're hung up again because we use a custom config section: <section name="BMT" type="Bmt.Shared.Common.BmtConfigurationSection, Bmt.Shared.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b2911254f1c07a11"/> Even though our "Common" assembly has already been loaded in the PS1 script AND is in the same directory as the .config file, the .NET configuration architecture can't find it. Can any of you PS gurus help us out? We don't wanna put this assembly in the GAC. 'Preciate it, -BillyB |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Power Shell? | PowerShell | |||
| How to run power shell in batch files or MS-DOS | PowerShell | |||
| power shell in a script | PowerShell | |||
| Executing Power Shell Scripts from Windows Shell | PowerShell | |||
| power shell in x64 | PowerShell | |||