win10 error from gui form

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
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 6 years and 1 month 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
ocsscott6969
Posts: 48
Last visit: Tue Dec 05, 2023 10:04 am

win10 error from gui form

Post by ocsscott6969 »

has anyone seen this error and know the cause

windows feature
an app on your pc needs the following feature:
.NET framework 3.5 (includes 2.0 and 3.0)

he app is built for x86 V2host (windows) with sta mode checked. seems fine in win7

win 10 has the frameworks and an older compile works fine, just no idea what might have changed to produce this error
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: win10 error from gui form

Post by davidc »

The V2 engines require .NET 2.0 or 3.5 to be installed.

Refer to this article:
https://www.sapien.com/blog/2015/11/16/ ... equisites/
David
SAPIEN Technologies, Inc.
User avatar
ocsscott6969
Posts: 48
Last visit: Tue Dec 05, 2023 10:04 am

Re: win10 error from gui form

Post by ocsscott6969 »

both are installed. Seems like a config file setting or build setting

not sure what I could have changed but now doesn't work. any ideas what to look at that might trigger that message?
User avatar
ocsscott6969
Posts: 48
Last visit: Tue Dec 05, 2023 10:04 am

Re: win10 error from gui form

Post by ocsscott6969 »

it looks like something to do with needing the exe.config file when its missing I get the error when its there it works.

Is the config always needed? Can it be compiled inside the exe?

is there a good doc on the build setting and options?

thanks
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: win10 error from gui form

Post by Alexander Riedel »

Well, that's why the config is there :-) . It's a Microsoft.NET thing, no it cannot be put anywhere inside and yes, if it doesn't work without it, you will need it.
Basically if your code is mixing assemblies using different runtimes, this is needed. PowerShell V2 uses .NET 2.0 but some default modules use 3.5 or 4.0, so for V2 compatible packages you will ALWAYS need the .config file.
Microsoft has a doc page for those things somewhere I would assume.
Alexander Riedel
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: win10 error from gui form

Post by jvierra »

This topic is 6 years and 1 month 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