.NET Requirement for Compiled EXE

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
chevynovaln
Posts: 11
Joined: Wed Jul 18, 2012 1:55 am

.NET Requirement for Compiled EXE

Post by chevynovaln »

Product, version and build: PowerShell Studio 2012 Build 3.1.35
32 or 64 bit version of product: 64-bit
Operating system: Windows Server 2012 R2
32 or 64 bit OS: 64-bit OS

I have a fairly simple question that I can't find the answer to. I wrote a fairly basic powershell script that I have compiled into a command-line Executable. It works great on several systems all running the same OS. However, apparently there is a .NET requirement for either 3.5 or 2.0 (not sure which) and it's not because of my code. We do not install .NET 3.5 (including 2.0) on our 2012 R2 servers (I have it on mine though) and when we launch this basic executable, the Windows Features Installer prompts stating that .NET 3.5 (including 2.0) could not be installed. If I run my script in a powershell window, all of the code works fine. So PowerShell Studio is making .NET 2 or 3.5 a requirement somehow. Is there something I can do to enable this basic program to run on a server without .NET 2.0 or 3.5 ? I'm upgrading to PowerShell Studio 2015 in a few weeks, maybe that will allow things to work with just .NET 4 ?

Brian

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: .NET Requirement for Compiled EXE

Post by davidc »

The .NET version depends on which engine / PowerShell version you select.

V2 requires .NET 2.0.
V3 (includes V4) requires .NET 4.0 client
V5 requires .NET 4.5

David
David
SAPIEN Technologies, Inc.

User avatar
chevynovaln
Posts: 11
Joined: Wed Jul 18, 2012 1:55 am

Re: .NET Requirement for Compiled EXE

Post by chevynovaln »

Perfect. That is what I needed to know. I almost always write code that is compatible with PowerShell 2.0 so it works on all systems but in this case it will only be ran on newer 2012 Servers so I was able to compile it using PowerShell v3 (v5 not installed/available yet for us) and get around the .Net 2.0 / 3.5 requirement.

Thanks!!

Brian

Locked