Compilation fails - Assembly not referenced

Nov 26, 2012 at 6:39 AM

Hi Ingo,

When trying to run the ps2exe.ps1 script it fails with the following error:

"Could not create the PowerShell .exe file because of compilation errors. Use -verbose parameter to see details.
VERBOSE: c:\Users\username\AppData\Local\Temp\ireahcbw.0.cs(196,55) : error CS0012: The type
'System.Dynamic.IDynamicMetaObjectProvider' is defined in an assembly that is not referenced. You must add a reference
to assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."

Running on PowerShell v3 (as admin)

/Stefan

Nov 26, 2012 at 6:49 AM
Edited Nov 26, 2012 at 6:51 AM

Hi people,

If you get the following error when running the ps2exe.ps1 script in PowerShell v3: "VERBOSE: c:\Users\username\AppData\Local\Temp\uft4bdcu.0.cs(196,55) : error CS0012: The type 'System.Dynamic.IDynamicMetaObjectProvider' is defined in an assembly that is not referenced. You must add a refe
rence to assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."

Just startup PowerShell version 2.

How? Open Run, type PowerShell.exe -version 2

And now you can run the ps2exe.ps1 script without any errors.

/Stefan

Jan 22, 2013 at 8:20 AM

I run PowerShell.exe -version 2 and i still get this error. Maybe the fact that i have .NET Framework 4.5 is the problem ? Please help.

Coordinator
Mar 9, 2013 at 8:19 AM
Please try the new version 0.3.0.0 that I published today.

Kind regards
Ingo
Coordinator
Mar 9, 2013 at 8:19 AM
Please try the new version 0.3.0.0 that I published today.

Kind regards
Ingo

ikarstein wrote:
Please try the new version 0.3.0.0 that I published today.

Kind regards
Ingo
Mar 18, 2013 at 7:25 AM
So far no errors.