VBAndCs / sVB-Small-Visual-Basic

Small Visual Basic (sVB) is an educational programming language, created by Eng. Mohammad Hamdy as an evolved version of Microsoft Small Basic (SB). It is meant to be easier and more powerful at the same time, to introduce programming basics to kids and beginners of any age, provided that they can use the English keyboard on the Windows OS.
Other
233 stars 16 forks source link

GUI or IDE not opening in Win11 #4

Closed Arjay-El closed 1 year ago

Arjay-El commented 1 year ago

I am running Win11. Net framework is installed.

When I double click the .exe, I see the splashcreeen for a minute and then it closes, no gui/ide/form opens. Am I missing something?

PS: Thanks for keeping BASIC alive, Its still a worthy system.

VBAndCs commented 1 year ago

@Arjay-El Thanks for reporting this. I've heard about this before, but unfortunately I couldn't install Win11 on any of my PCs and laptops because they don't have the minimum hardware required to run win 11, and I tried all tips and tricks mentioned to bypass the win11 checks, but it still complains about the old processors I am using! So, I need help here from any developer that has VS.NET installed on Win11 to download the source code from here and run it to find out if it has errors on win 11, or it will work fine and we just need to rebuild the exe for win11. I suspect that some component doesn't work well on Win11, but I need more info on that. If you want to help on that, I can walk you through installing VS.NET (the Community Edition is free), and how to build the sVB source code. Thanks.

VBAndCs commented 1 year ago

@Arjay-El As a workaround, you can activate the Hyper-V service on win 11. It is a virtual machine that allows you to create a virtual HDD and install any other operating system on, so you can install a lite 32-bit win 7, and run it from win 11 to run sVB on.

Arjay-El commented 1 year ago

Will give that a try.

Also, I am not a programmer by trade but if you write instructions on how to recompile under Win11, I can give that a try. The majority of my compiler experience has been with fortran and matlab code for engineering analysis.

From: Mohammad Hamdy Ghanem @.> Sent: Tuesday, January 10, 2023 6:43 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Arjay-El @.>; Mention @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] GUI or IDE not opening in Win11 (Issue #4)

@Arjay-El https://github.com/Arjay-El As a workaround, you can activate the Hyper-V service on win 11. It is a virtual machine that allows you to create a virtual HDD and install any other operating system on, so you can install a lite 32-bit win 7, and run it from win 11 to run sVB on.

— Reply to this email directly, view it on GitHub https://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/4#issuecomment-1378040703 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVZSN27J2EKFQHSDWVL2XLWRXXW3ANCNFSM6AAAAAATXEENHI . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ACVZSN6FVUW5LEWOQDERAP3WRXXW3A5CNFSM6AAAAAATXEENHKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSSEM5X6.gif Message ID: @. @.> >

VBAndCs commented 1 year ago

@Arjay-El You can download VS .NET 2022 community for free from: https://visualstudio.microsoft.com/vs/community/ While installing it, you only need to select the Desktop workload (you can modify the installation later to add more workloads if you need them). Then download sVB source code from Github: https://github.com/VBAndCs/sVB-Small-Visual-Basic/archive/refs/heads/master.zip Unzip the file, then open the sVB.sln file with VS .NET and hit F5 to run the code. If the sVB runs correctly, you can find the compiled files in SmallBasicIDE\bin\Debug folder in the source code folder. The ToolBox and lib folders will be missing, so, you can copy them from the SmallBasicIDE\SB.Lib folder and past them to the debug folder. It is better of course to build the source for release, but lets see if this works first. If any errors happened, please tell me about. Thanks.

Arjay-El commented 1 year ago

I have visual studio community version previously loaded so I loaded the .sln file and ran a build (tried the F5 key but nothing seemed to happen so I chose build from the menu (it is set to debug, not release). There are two listed targets I see, svBCompiler and svb.Ide. Attached is a text file of the build errors and warnings.

From: Mohammad Hamdy Ghanem @.> Sent: Tuesday, January 10, 2023 8:23 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Arjay-El @.>; Mention @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] GUI or IDE not opening in Win11 (Issue #4)

@Arjay-El https://github.com/Arjay-El You can download VS .NET 2022 community for free from: https://visualstudio.microsoft.com/vs/community/ While installing it, you only need to select the Desktop workload (you can modify the installation later to add more workloads if you need them). Then download sVB source code from Github: https://github.com/VBAndCs/sVB-Small-Visual-Basic/archive/refs/heads/master.zip Unzip the file, then open the sVB.sln file with VS .NET and hit F5 to run the code. If the sVB runs correctly, you can find the compiled files in SmallBasicIDE\bin\Debug folder in the source code folder. The ToolBox and lib folders will be missing, so, you can copy them from the SmallBasicIDE\SB.Lib folder and past them to the debug folder. It is better of course to build the source for release, but lets see if this works first. If any errors happened, please tell me about. Thanks.

— Reply to this email directly, view it on GitHub https://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/4#issuecomment-1378117218 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVZSN75UDYEG6DP43W7PBDWRYDPNANCNFSM6AAAAAATXEENHI . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ACVZSNZ5JHWHDTFGFYWZR4DWRYDPNA5CNFSM6AAAAAATXEENHKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSSERTGE.gif Message ID: @. @.> >

Build started... 1>------ Build started: Project: svB.Compiler, Configuration: Debug Any CPU ------ 2>------ Build started: Project: DiagramHelper, Configuration: Debug Any CPU ------ 1>D:\Programming\sVB-Small-Visual-Basic-master\SmallBasicLibrary\sVB.Library.vbproj : warning : The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json. 1>D:\Programming\sVB-Small-Visual-Basic-master\SmallBasicLibrary\sVB.Library.vbproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found. 3>------ Build started: Project: LangServices, Configuration: Debug Any CPU ------ 3>D:\Programming\sVB-Small-Visual-Basic-master\ToolFramework\ToolFramework.vbproj : warning : The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json. 3>D:\Programming\sVB-Small-Visual-Basic-master\ToolFramework\ToolFramework.vbproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found. 3>D:\Programming\sVB-Small-Visual-Basic-master\SmallBasicLibrary\sVB.Library.vbproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Helper Classes\Commands.vb(27,30): warning BC42104: Variable 'brush' is used before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(833,39): warning BC42030: Variable 'baseName' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1496,36): warning BC42030: Variable 'Item' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1496,42): warning BC42030: Variable 'Pnl' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1496,47): warning BC42030: Variable 'Diagram' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1538,36): warning BC42030: Variable 'Item' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1538,42): warning BC42030: Variable 'Pnl' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1538,47): warning BC42030: Variable 'Diagram' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1581,36): warning BC42030: Variable 'Item' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1581,42): warning BC42030: Variable 'Pnl' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1581,47): warning BC42030: Variable 'Diagram' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1623,36): warning BC42030: Variable 'Item' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1623,42): warning BC42030: Variable 'Pnl' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(1623,47): warning BC42030: Variable 'Diagram' is passed by reference before it has been assigned a value. A null reference exception could result at runtime. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(122,43): error BC30002: Type 'Windows.Visibility' is not defined. 2>D:\Programming\sVB-Small-Visual-Basic-master\DiagramHelper\Designer.vb(127,22): error BC30002: Type 'Windows.Visibility' is not defined. 4>------ Build started: Project: sVB.IDE, Configuration: Debug Any CPU ------ 4>D:\Programming\sVB-Small-Visual-Basic-master\ToolFramework\ToolFramework.vbproj : warning : The NuGetSdkResolver did not resolve this SDK because there was no version specified in the project or global.json. 4>D:\Programming\sVB-Small-Visual-Basic-master\ToolFramework\ToolFramework.vbproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found. 4>D:\Programming\sVB-Small-Visual-Basic-master\SmallBasicLibrary\sVB.Library.vbproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found. ========== Build: 0 succeeded, 4 failed, 0 up-to-date, 0 skipped ========== ========== Elapsed 00:02.110 ==========

VBAndCs commented 1 year ago

@Arjay-El Thanks. Please install .NET Framework 4.8 developer pack and try again.

VBAndCs commented 1 year ago

@Arjay-El This is an sVB version built on win-11. Try it and tell me if it works fine on your PC. sVB_Win11.zip

Arjay-El commented 1 year ago

Thanks for the update. Same behavior as the previous. I have not had time to go back and make another build attempt but I will try this weekend. I will delete VS completely and re-install the specific version number. Updates and extra extensions to an existing installation like I tried typically don’t seem to work as well as clean installs. I find Win11 has various compatibility problems that did not exist in Win10 (I use a lot of number crunching packages and its an endless cycle of workarounds). Unfortunately MS pushes users into the new system. Maybe Win12 will correct it all.

Thanks.

From: Mohammad Hamdy Ghanem @.> Sent: Friday, January 13, 2023 8:15 PM To: VBAndCs/sVB-Small-Visual-Basic @.> Cc: Arjay-El @.>; Mention @.> Subject: Re: [VBAndCs/sVB-Small-Visual-Basic] GUI or IDE not opening in Win11 (Issue #4)

@Arjay-El https://github.com/Arjay-El This is an sVB version built on win-11. Try it and tell me if it works fine on your PC. sVB_Win11.zip https://github.com/VBAndCs/sVB-Small-Visual-Basic/files/10416293/sVB_Win11.zip

— Reply to this email directly, view it on GitHub https://github.com/VBAndCs/sVB-Small-Visual-Basic/issues/4#issuecomment-1382620818 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVZSN6UNBL3WEHN7KCBXHDWSH42BANCNFSM6AAAAAATXEENHI . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ACVZSN2IS2YBCAC7RBDCNI3WSH42BA5CNFSM6AAAAAATXEENHKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSSNEPJE.gif Message ID: @. @.> >

VBAndCs commented 1 year ago

@Arjay-El I think your anti-virus or fire wall may be responsible for this issue. This version is built using VS on win 11 and works fine even on win 32, so, I see no issue in VS nor sVB. You better check your win 11 settings.

VBAndCs commented 1 year ago

@Arjay-El I want to try something. Remove the Lib and ToolBar folders from the sVB\bin folder then run sVB. I want to make sure that they are not the source of the issue.

progamateur commented 1 year ago

@Arjay-El Hello, Same problem with windows 10 22H2. I solved it by modifying the sVB.exe.config file by adding a <runtime> section after the <system.diagnostics> section i.e. :

`<?xml version="1.0" encoding="utf-8"?>

`

I hope this will work for windows 11 as well...

Arjay-El commented 1 year ago

It seems to be working in Win11. Can you tell me why this fix worked? Thanks for your help, much appreciated to get this working!

VBAndCs commented 1 year ago

@Arjay-El @progamateur Thanks both for helping to fix this. I updated the sVB and the compiler projects to add this fix. You can download the Updated version from here

This article seems to explain the issue. sVB uses Assembly.LoadFile to load external libraries from the sVB\bin\lib folder. This was trusted by default on .NET Framework 4, but Win11 seems to have a security update that made it untrusted!

progamateur commented 1 year ago

In the \bin directory, with the original sVB.exe.config file, it seems that an error is preventing sVB.exe from starting. I was able to see the corresponding error message by typing the following command: sVB.exe 2>&1 | more. This message gives information about the type of error (probably a FileLoadException) and suggests to consult this link which miraculously gives the solution in the "Example" paragraph: The following example shows how to grant full trust to applications from remote sources. `

`

Hence the change to the sVB.exe.config file that I applied.

P.S I'm not a "pro" programmer.