The #develop teamblog
#  Thursday, November 10, 2005

Daniel's comment got me into gear, and not only did I implement the #develop way of code conversion, I also put it online so you can convert your source code easily:

Convert C# 2.0 Code to VB.NET 8.0

Categories: Chris
Thursday, November 10, 2005 7:11:13 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]

 

Daniel did a great video on what is possible with NRefactory. When I saw it, I felt that I had to build something with it - and so I set out to create a simple ASP.NET 2.0 page that converts C# source code to VB.NET source code (written in VB.NET, just to get my fingers dirty once in a while):

The code is pretty much the same as Daniel wrote, this time VB.NET:

Imports ICSharpCode.NRefactory.Parser
Imports ICSharpCode.NRefactory.Parser.AST
Imports ICSharpCode.NRefactory.PrettyPrinter

Imports System.IO

Partial Class CodeConvert Inherits System.Web.UI.Page

Protected Sub convertCode_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles convertCode.Click
   Dim input As New StringReader(inputTextBox.Text)
   Dim parser As IParser

   parser = ParserFactory.CreateParser(SupportedLanguage.CSharp, input)
   parser.Parse()

   If (parser.Errors.count > 0) Then
      outputTextBox.Text = parser.Errors.ErrorOutput
      Exit Sub
   End If

   Dim cu As CompilationUnit, output As IOutputASTVisitor
   cu = parser.CompilationUnit

   output = CType(New VBNetOutputVisitor(), IOutputASTVisitor)
   cu.AcceptVisitor(output, DBNull.Value)
   outputTextBox.Text = output.Text
End Sub
End Class

The source code for the entire Web application is provided in the download at the end of this blog entry. Feel free to add more features to it, just note that the code is GPL-licensed, so please make your changes public.

CodeConvert.NET.zip (114.98 KB)

Categories: Chris
Thursday, November 10, 2005 5:56:58 PM (GMT Standard Time, UTC+00:00)  #    Comments [2]

 

This tutorial will show you how you can use NRefactory to parse C# code, modify the abstract syntax tree and generate C# code.

NRefactory.wmv (5.8MB, 13:17 m)

You can download the example code here: NRefactoryExample.zip (7,15 KB)

If you don't have SharpDevelop installed in C:\Program files\SharpDevelop\2.0, you will need to remove the reference to NRefactory from the project and add it with the correct location.

Categories: Daniel
Thursday, November 10, 2005 4:47:14 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]

 



#  Wednesday, November 09, 2005

Matt has a blog entry up with a list of features currently MIA for SharpDevelop 2.0. He promises to keep this list updated, so you know where to look to see if a feature has already made it to 2.0 or not.

Couple of notes: do not expect SharpReport to be ported any time soon. It itself is a work in progress, and is currently being finalized in version 1.1 (Fidalgo) of SharpDevelop. Also, Assembly Analyzer might or might not make it all.

Categories: Chris
Wednesday, November 09, 2005 6:01:21 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]

 



#  Sunday, November 06, 2005

After some internal testing, our public build server is now live under the following URL:

http://build.sharpdevelop.net/

There you can review the build logs (we basically perform a src\prepareRelease, src\releaseBuild and setup\buildSetup). On a successful build, the artefacts are copied to

http://build.sharpdevelop.net/BuildArtefacts/

where you can download both source zips as well as pre-built setup applications.

Categories: Chris
Sunday, November 06, 2005 10:01:13 AM (GMT Standard Time, UTC+00:00)  #    Comments [3]

 



#  Tuesday, November 01, 2005

The new URL for the Corsavy repository is

svn://sharpdevelop.net/sharpdevelop

Change reason is that Serralongue will be branched in this repository, therefore having a "codename-locked" repository name was a bad idea.

Categories: Chris
Tuesday, November 01, 2005 4:57:46 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]

 



#  Saturday, October 29, 2005

Many people requested a setup version for SharpDevelop 2 on .NET 2.0.50727.42. Normally Chris is doing the releases, but there were so many requests that I had to do it now.

I don't have access to the source forge page, so the file is hosted here on the team blog. To reduce the file size a bit, the incomplete SubversionAddin is not included in this setup.

Note: there are now newer setup versions available on the build server.
Old Download: Corsavy 654 Setup.exe (2,86 MB)

Changes to revision 593 (the last setup version) are: Many bugfixes, including critical bugs with the new MSBuild version; big improvements to BooBinding and a new feature called "Typing-Time Type Inference": Type "? name = ...;" or "Dim name As ? = ..." and SharpDevelop will substitute the question mark with the type of "...".

Categories: Daniel
Saturday, October 29, 2005 2:40:28 PM (GMT Daylight Time, UTC+01:00)  #    Comments [7]

 



#  Friday, October 28, 2005

The final version of .NET 2.0 has been released and SharpDevelop in the repository has been fixed to run on it. A setup will be made available for download in some days, until then you have to use the repository if you are interested in .NET 2.0.

.NET 2.0 download: The Framework[^] and the SDK[^]

All of the problems were due to changes in MSBuild. One old hack could be removed because MSBuild bug was fixed, but two new hacks had to be introduced for two new bugs. (not counting the strange "BuildProject" properties behaviour)

The new MSBuild does not understand the our solution (.sln) files because they were missing the SolutionConfiguration section. SharpDevelop will automatically add that section if you open a solution, so you won't notice the problem.

Categories: Daniel
Friday, October 28, 2005 12:34:06 PM (GMT Daylight Time, UTC+01:00)  #    Comments [4]

 



#  Friday, October 21, 2005

The third video explains how to create a primary display binding that can view images:

Tutorial3.wmv (3,78 MB, 07:38m)

Again, this tutorial starts with opening the AddIn created in tutorial 1, so make sure you watch that first.

MyTestAddIn.3.zip (4,06 KB) contains the addin as it should be after following the steps in this tutorial. It uses "..\Corsavy" as relative path to the SharpDevelop checkout directory, so make sure you extract it to the correct location.

Categories: Daniel
Friday, October 21, 2005 6:58:18 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]

 



#  Wednesday, October 19, 2005

This video explains how you can write a SharpDevelop addin that provides a tab page "Preview" that displays .html files.

Tutorial2.wmv (3.25 MB, 07:25 m)

The video starts with opening the AddIn created in tutorial 1, so make sure you watch that first.

I hope these tutorials will help some developers getting started with AddIn development so SharpDevelop 2 will have a number of AddIns available.

Categories: Daniel
Wednesday, October 19, 2005 5:21:53 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0]

 



© Copyright 2012 SharpDevelop Core Team

Subscribe to this weblog's RSS feed with SharpReader, Radio Userland, NewsGator or any other aggregator listening on port 5335 by clicking this button.   RSS 2.0|Atom 1.0  Send mail to the author(s)

 

Copyright ©2000-2009 IC#Code. All rights reserved. Projects sponsored by AlphaSierraPapa.