Small Basic Forum
Old Version of MSBuild in SharpDevelop - Printable Version

+- Small Basic Forum (https://litdev.uk/mybb)
+-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1)
+--- Forum: C# Moving from Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=6)
+--- Thread: Old Version of MSBuild in SharpDevelop (/showthread.php?tid=62)



Old Version of MSBuild in SharpDevelop - z-s - 05-03-2024

May Be Any One Know This.
You Can Get Intelnise In
Sharp Develop By Installing Developer Pack Of .Net Framework.
View A Html In Source Directory Of Sharp Develop Named Dependences.html

LitDev I Have A Question ?
I Tried Using SB-Prime , SVB , SB , LD Extension Source Code In Sharp Develop When We Open It , Shows Some Error In Solution File Saying Old Version OF MSBuild.


RE: Old Version of MSBuild in SharpDevelop - litdev - 05-03-2024

SharpDevelop was stopped a few years ago.  While it is a great alternative to Visual Studio it cannot use more recent versions of the C# toolset/compiler.

These are defined in the .csproj project settings file.  You can open this file in a text editor and set the ToolsVersion="4.0", this is the last one for SharpDevelop.

I tried with SB-Prime changing the 3 projects from 15 to 4 and loading in SharpDevelop.
Also I changed TargetFrameworkVersion from 4.8 to to the latest 4.5.2 I have.

There are then some errors because I have used some syntax present in toolset 15, not present in version 4.  Some of these I could fix, but couldn't get SB-Prime to fully compile, mainly due to some of the external packages and other referenced dlls that use .Net 4.8 functionality.

It is going to be hard to to just port code backwards.  I suggest building you program from the scratch to start with, you will learn more.


RE: Old Version of MSBuild in SharpDevelop - z-s - 05-03-2024

Glad to see a new Form for csharp Smile
Thanks For Reply.
What scratch Means.


RE: Old Version of MSBuild in SharpDevelop - litdev - 05-03-2024

I did manage to get SharpDevelop to compile and run SB-Prime. Big Grin

1] Need to change csproj files as described before for ToolsVersion 4.0 and TargetFrameworkVersion 4.5.2
2] Fix a few minor syntax differences for earlier C# version - I have actually made these changes and checked them into git since they are fine in recent C# version.
3] Target CPU prefer 32 bit (Properties-Compiling)
4] Add a reference to System.Runtime 4.0.0.0 to SB-Prime project
5] Add system environment variable (your location may be different) TargetFrameworkSDKToolsDirectory = C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools
6] Set SB-Prime as startup project

Compile as debug or release both work for me (Build->Set configuration).

   

By starting from 'scratch' I mean creating your own project from the beginning with a window, maybe RTB and events for it.  You will learn more by creating from the start rather than copying code, although this can be helpful too.  It will be hard to modify a big code without understanding of how it works and the language syntax, which you get by writing your own projects 'from scratch'.


RE: Old Version of MSBuild in SharpDevelop - z-s - 05-03-2024

Do you uploaded it on github


RE: Old Version of MSBuild in SharpDevelop - litdev - 05-03-2024

I uploaded the changes to GitHub for point 2 which are OK for VS and SharpDevelop - I mainly use VS and my GitHub stuff is for VS.  The other points are specific to SharpDevelop or your environment.  

If any of the other points are not clear then let me know with some details about what isn't clear or difference on your system.


RE: Old Version of MSBuild in SharpDevelop - z-s - 05-11-2024

can we have a conveter program for this syntax converting of vs projects code so they can be used in sharpdevelop.


RE: Old Version of MSBuild in SharpDevelop - litdev - 05-11-2024

Hi,

Point by point:

1] This is a simple find/replace change so you can do it with a Small Basic program, or frankly its 15 seconds work in Notepad.
2] I already did this for SB-Prime - other projects may have any other differences so would have to be done case by case
3] Setting in SharpDevelop
4] Setting in SharpDevelop
5] Only needs to be done once
6] Setting in SharpDevelop

So its only point 1 which you could do manually very quickly or write a code to do it.
Cannot do point 2 as who knows what code differences there may be for other projects.