Code only for Dotnet 2.0

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 SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
rubberduck
Posts: 54
Joined: Wed Oct 30, 2013 9:34 am

Code only for Dotnet 2.0

Post by rubberduck » Tue Apr 19, 2016 4:00 am

Product, version and build: 5.2.119
32 or 64 bit version of product: 64
Operating system: Windows 10
32 or 64 bit OS: 64
PowerShell Version: 5

Hello,

short question.

Im working with Windows 10 and Powershell Studion 2016 and Ihe Code is automatically working with .NetFramework 4

If I want to Code for DotnetFramework Version 2, how would I do this?


thanks in advance.

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

Re: Code only for Dotnet 2.0

Post by davidc » Tue Apr 19, 2016 9:04 am

To help me better understand the request, what are you trying to accomplish? Are you asking in regards to GUI scripts or general PowerShell scripts?

David
David
SAPIEN Technologies, Inc.

User avatar
rubberduck
Posts: 54
Joined: Wed Oct 30, 2013 9:34 am

Re: Code only for Dotnet 2.0

Post by rubberduck » Tue Apr 19, 2016 10:51 pm

Hello and thanks for reply,

in this case it is a special Power Shell Studio question.

I want to make GUI Applications for our Server, but theres another dotnet and powershell Version installed.

When I transform my powershell scripts to executables, theres always a popup failure coming up, that dotnet 4.xxx has to be installed.

I dont want this on our Server, i want to use dotnet 2.xx and the corresponding powershell Version.



Hope you understand what I´m trying to say
greets

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

Re: Code only for Dotnet 2.0

Post by davidc » Wed Apr 20, 2016 8:27 am

The dot net version is determined by the packager engine / PowerShell version:

https://www.sapien.com/blog/2015/11/16/ ... equisites/

If you are using GUI scripts, make sure you have the PowerShell V2 (.NET 2.0) compatibility option checked (Options->Designer):
PowerShell V2 compatibility.png
PowerShell V2 compatibility.png (25.53 KiB) Viewed 1264 times
When dealing with multiple PowerShell versions, you will need to create a separate executable that corresponds to each PowerShell version.

David
David
SAPIEN Technologies, Inc.

User avatar
rubberduck
Posts: 54
Joined: Wed Oct 30, 2013 9:34 am

Re: Code only for Dotnet 2.0

Post by rubberduck » Thu Apr 21, 2016 2:50 am

Hey David,

thanks a lot. That solved my Problem.