<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Laputa - Daniel</title>
    <link>http://laputa.sharpdevelop.net/</link>
    <description>The Web log of the #develop team</description>
    <language>en-us</language>
    <copyright>SharpDevelop Core Team</copyright>
    <lastBuildDate>Sun, 06 Sep 2009 13:10:51 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>team@icsharpcode.net</managingEditor>
    <webMaster>team@icsharpcode.net</webMaster>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=cf507c8b-e2b3-4f91-bbf2-98c70e3f7d71</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,cf507c8b-e2b3-4f91-bbf2-98c70e3f7d71.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,cf507c8b-e2b3-4f91-bbf2-98c70e3f7d71.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cf507c8b-e2b3-4f91-bbf2-98c70e3f7d71</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Starting with SharpDevelop 3.1 RC2, new
projects are created with a "Target CPU" setting of "x86". Previously, projects were
created as "AnyCPU". This change affects only new projects; existing projects keep
their old setting.<br /><br />
Now, what is the difference between these settings? On 32-bit Windows, there isn't
any. But on 64-bit Windows, for <b>programs</b>, the "x86" setting means your program
will run as a 32-bit process in the "Windows on Windows" emulation layer. AnyCPU programs
would run as a native 64-bit process.<br />
For <b>libraries</b>, the new setting will prevent them from being loaded into 64-bit
processes.<br /><br />
Now, restricting stuff to 32-bit doesn't sound like it's the way forward. Why did
we do this change?<br /><ol><li>
If you never test on 64-bit Windows, the new setting ensures your program will run
in compatibility mode. This is better than breaking on your user's 64-bit machines
because you unknowingly had 32-bit-only code in your program.<br /></li><li>
The SharpDevelop debugger does not yet support 64-bit processes.<br /></li><li>
Microsoft did the same change: Visual Studio 2010 also creates x86 projects by default.</li></ol>
The main problem with the target processor is that <b>you cannot mix libraries with
different processor types</b>. If your program is running as 64-bit process, it cannot
load 32-bit libraries. If your program is running as 32-bit process, it cannot load
64-bit libraries.<br /><b>If you have an existing AnyCPU solution</b> and add new projects to it using SharpDevelop
3.1, <b>you should change the target CPU of all new projects back to AnyCPU.</b><br /><br />
As soon as your program depends on an unmanaged library, you will be forced to pick
the corresponding processor type (e.g. SharpDevelop includes 32-bit SQLite and Subversion,
so it must run as a 32-bit process). Unless your program is completely managed, AnyCPU
is a bad idea because you would have to load a different unmanaged library depending
on the process type your program got loaded into.<br /><br />
For purely managed libraries, the situation is different. Here I must recommend to
use AnyCPU to allow your library to be loaded into any process type. In fact, in the
case of SharpDevelop, only the executable (SharpDevelop.exe) is marked as 32-bit;
all other libraries are AnyCPU.<br /><img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=cf507c8b-e2b3-4f91-bbf2-98c70e3f7d71" /></body>
      <title>SharpDevelop now creates projects as 32-bit by default</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,cf507c8b-e2b3-4f91-bbf2-98c70e3f7d71.aspx</guid>
      <link>http://laputa.sharpdevelop.net/SharpDevelopNowCreatesProjectsAs32bitByDefault.aspx</link>
      <pubDate>Sun, 06 Sep 2009 13:10:51 GMT</pubDate>
      <description>Starting with SharpDevelop 3.1 RC2, new projects are created with a "Target CPU" setting of "x86". Previously, projects were created as "AnyCPU". This change affects only new projects; existing projects keep their old setting.&lt;br&gt;
&lt;br&gt;
Now, what is the difference between these settings? On 32-bit Windows, there isn't
any. But on 64-bit Windows, for &lt;b&gt;programs&lt;/b&gt;, the "x86" setting means your program
will run as a 32-bit process in the "Windows on Windows" emulation layer. AnyCPU programs
would run as a native 64-bit process.&lt;br&gt;
For &lt;b&gt;libraries&lt;/b&gt;, the new setting will prevent them from being loaded into 64-bit
processes.&lt;br&gt;
&lt;br&gt;
Now, restricting stuff to 32-bit doesn't sound like it's the way forward. Why did
we do this change?&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;
If you never test on 64-bit Windows, the new setting ensures your program will run
in compatibility mode. This is better than breaking on your user's 64-bit machines
because you unknowingly had 32-bit-only code in your program.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
The SharpDevelop debugger does not yet support 64-bit processes.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Microsoft did the same change: Visual Studio 2010 also creates x86 projects by default.&lt;/li&gt;
&lt;/ol&gt;
The main problem with the target processor is that &lt;b&gt;you cannot mix libraries with
different processor types&lt;/b&gt;. If your program is running as 64-bit process, it cannot
load 32-bit libraries. If your program is running as 32-bit process, it cannot load
64-bit libraries.&lt;br&gt;
&lt;b&gt;If you have an existing AnyCPU solution&lt;/b&gt; and add new projects to it using SharpDevelop
3.1, &lt;b&gt;you should change the target CPU of all new projects back to AnyCPU.&lt;/b&gt;
&lt;br&gt;
&lt;br&gt;
As soon as your program depends on an unmanaged library, you will be forced to pick
the corresponding processor type (e.g. SharpDevelop includes 32-bit SQLite and Subversion,
so it must run as a 32-bit process). Unless your program is completely managed, AnyCPU
is a bad idea because you would have to load a different unmanaged library depending
on the process type your program got loaded into.&lt;br&gt;
&lt;br&gt;
For purely managed libraries, the situation is different. Here I must recommend to
use AnyCPU to allow your library to be loaded into any process type. In fact, in the
case of SharpDevelop, only the executable (SharpDevelop.exe) is marked as 32-bit;
all other libraries are AnyCPU.&lt;br&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=cf507c8b-e2b3-4f91-bbf2-98c70e3f7d71" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,cf507c8b-e2b3-4f91-bbf2-98c70e3f7d71.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=2223b9f6-c02d-4943-94b6-2e4ff8d26b46</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,2223b9f6-c02d-4943-94b6-2e4ff8d26b46.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,2223b9f6-c02d-4943-94b6-2e4ff8d26b46.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=2223b9f6-c02d-4943-94b6-2e4ff8d26b46</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">In SharpDevelop 4.0.0.4711, I have rewritten
the ParserService class.<br /><br />
There are lots of changes.<br />
First, <b>from the point of view of an AddIn implementing IParser:</b><br /><ul><li>
SharpDevelop will not create a single instance of your class, but one instance per
file.</li><li>
Keep in mind that there might be concurrent parser runs for the same file. IParser
implementations must be thread-safe.<br /></li><li>
The ITextBuffer interface now provides a 'Version' property which allows comparing
two versions of the same document and efficiently retrieving the changes between them.</li></ul>
Together, these changes allow for the implementation of incremental parsers. The parser
instance can simply store the ITextBufferVersion of a the last run in a field and
use it to detect the changes to the next version.<br />
We do not plan to write replace our existing parsers with incremental parsers now
- but we are working on an incremental XML parser. The XAML code completion support
is already taking advantage of this; and once we re-implement XML code folding for
SharpDevelop 4, it will likely use this incremental parser, too.<br /><br />
However, a Parser instance should never cache the ICompilationUnit or parts of it:
it now is possible for a file to have multiple compilation units (one per project
that contains it). See "Support for files shared between multiple projects" below.<br /><br />
Originally, I wanted to give a "no-concurrency guarantee" for IParser implementations,
i.e. the ParserService would ensure that there is only a single parser run for each
file. However, to implement this, a per-file lock while calling into the parser was
required. The main thread could wait for existing parser runs to finish while the
parser implementation would wait for the main thread to run an invoked method -&gt;
deadlock.<br />
In the end, I decided the IParser implementation should have the responsibility for
this - if it needs to avoid concurrent execution, it should use a lock.<br /><br />
For someone <b>using the ParserService:</b><br /><ul><li>
Methods dealing with assembly references have been moved into the new class 'AssemblyParserService'.</li><li>
The remaining methods are now documented, in particular regarding their thread-safety.<br /></li><li>
All events are now raised on the main thread. This guarantees that events arrive in
the correct order and makes consuming them easier.</li><li>
EnqueueForParsing has been renamed to BeginParse and now provides a <a href="http://en.wikipedia.org/wiki/Futures_and_promises">future</a> (<a href="http://msdn.microsoft.com/en-us/library/dd321424%28VS.100%29.aspx">Task</a>&lt;ParseInformation&gt;)
to allow waiting for the result. However, to avoid deadlocks, this should not be done
by any thread the parser might be waiting for (especially the main thread).<br /></li><li>
The ParseFile method does not necessarily parse the snapshot of the file you specify
- it might parse a newer version instead (but never an older version). Unlike BeginParse().Wait(),
ParseFile() is safe to call from the main thread.<br /></li><li>
If a file hasn't changed, calling ParseFile is a no-op.<br /></li><li>
The ParseInformation class has been made immutable. Support for 'ValidCompilationUnit'
and 'DirtyCompilationUnit' has been removed.</li><li>
The GetParser() method allows retrieving the IParser instance for a specific file.
This is useful in some special cases for using details of specific IParser implementations.<br /></li></ul>
The API changes here are more limited. Most important is the change to ParseInformation:
the existing concept of keeping an old but valid compilation unit during parse errors
was dropped because the was no useful upper bound on the age of the valid compilation
unit; in some cases the 'valid compilation unit' might be several hours old and would
represent an empty file.<br />
All CompilationUnit-properties on ParseInformation now return same value; the old
properties will be marked [Obsolete].<br /><br />
If a parser wants to reuse information from old parse runs because its error recovery
is not reliable enough, the parser itself now has to maintain this state and mix it
into the new compilation units - doing this is much easier now due to 'one IParser
instance per file'.<br /><br /><br /><b>Support for files shared between multiple projects</b><br />
Also, there has been a major internal change that isn't apparent in the API:<br />
A single file can now have multiple ParseInformation instances - one per project that
contains the file. Previously, files used by multiple projects would show up in code
completion only for one of the projects. Now the file will be parsed once for each
project that contains it.<br /><br />
Because a single IParser instance is used for all these parse runs, it is possible
for incremental parsers to avoid redundantly parsing the file. However, a separate
ICompilationUnit must be produced for each run because it contains a pointer to the
parent project content.<br /><br /><br /><p></p><img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=2223b9f6-c02d-4943-94b6-2e4ff8d26b46" /></body>
      <title>ParserService Refactoring</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,2223b9f6-c02d-4943-94b6-2e4ff8d26b46.aspx</guid>
      <link>http://laputa.sharpdevelop.net/ParserServiceRefactoring.aspx</link>
      <pubDate>Mon, 17 Aug 2009 17:06:32 GMT</pubDate>
      <description>In SharpDevelop 4.0.0.4711, I have rewritten the ParserService class.&lt;br&gt;
&lt;br&gt;
There are lots of changes.&lt;br&gt;
First, &lt;b&gt;from the point of view of an AddIn implementing IParser:&lt;/b&gt;
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
SharpDevelop will not create a single instance of your class, but one instance per
file.&lt;/li&gt;
&lt;li&gt;
Keep in mind that there might be concurrent parser runs for the same file. IParser
implementations must be thread-safe.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
The ITextBuffer interface now provides a 'Version' property which allows comparing
two versions of the same document and efficiently retrieving the changes between them.&lt;/li&gt;
&lt;/ul&gt;
Together, these changes allow for the implementation of incremental parsers. The parser
instance can simply store the ITextBufferVersion of a the last run in a field and
use it to detect the changes to the next version.&lt;br&gt;
We do not plan to write replace our existing parsers with incremental parsers now
- but we are working on an incremental XML parser. The XAML code completion support
is already taking advantage of this; and once we re-implement XML code folding for
SharpDevelop 4, it will likely use this incremental parser, too.&lt;br&gt;
&lt;br&gt;
However, a Parser instance should never cache the ICompilationUnit or parts of it:
it now is possible for a file to have multiple compilation units (one per project
that contains it). See "Support for files shared between multiple projects" below.&lt;br&gt;
&lt;br&gt;
Originally, I wanted to give a "no-concurrency guarantee" for IParser implementations,
i.e. the ParserService would ensure that there is only a single parser run for each
file. However, to implement this, a per-file lock while calling into the parser was
required. The main thread could wait for existing parser runs to finish while the
parser implementation would wait for the main thread to run an invoked method -&amp;gt;
deadlock.&lt;br&gt;
In the end, I decided the IParser implementation should have the responsibility for
this - if it needs to avoid concurrent execution, it should use a lock.&lt;br&gt;
&lt;br&gt;
For someone &lt;b&gt;using the ParserService:&lt;/b&gt;
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
Methods dealing with assembly references have been moved into the new class 'AssemblyParserService'.&lt;/li&gt;
&lt;li&gt;
The remaining methods are now documented, in particular regarding their thread-safety.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
All events are now raised on the main thread. This guarantees that events arrive in
the correct order and makes consuming them easier.&lt;/li&gt;
&lt;li&gt;
EnqueueForParsing has been renamed to BeginParse and now provides a &lt;a href="http://en.wikipedia.org/wiki/Futures_and_promises"&gt;future&lt;/a&gt; (&lt;a href="http://msdn.microsoft.com/en-us/library/dd321424%28VS.100%29.aspx"&gt;Task&lt;/a&gt;&amp;lt;ParseInformation&amp;gt;)
to allow waiting for the result. However, to avoid deadlocks, this should not be done
by any thread the parser might be waiting for (especially the main thread).&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
The ParseFile method does not necessarily parse the snapshot of the file you specify
- it might parse a newer version instead (but never an older version). Unlike BeginParse().Wait(),
ParseFile() is safe to call from the main thread.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
If a file hasn't changed, calling ParseFile is a no-op.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
The ParseInformation class has been made immutable. Support for 'ValidCompilationUnit'
and 'DirtyCompilationUnit' has been removed.&lt;/li&gt;
&lt;li&gt;
The GetParser() method allows retrieving the IParser instance for a specific file.
This is useful in some special cases for using details of specific IParser implementations.&lt;br&gt;
&lt;/li&gt;
&lt;/ul&gt;
The API changes here are more limited. Most important is the change to ParseInformation:
the existing concept of keeping an old but valid compilation unit during parse errors
was dropped because the was no useful upper bound on the age of the valid compilation
unit; in some cases the 'valid compilation unit' might be several hours old and would
represent an empty file.&lt;br&gt;
All CompilationUnit-properties on ParseInformation now return same value; the old
properties will be marked [Obsolete].&lt;br&gt;
&lt;br&gt;
If a parser wants to reuse information from old parse runs because its error recovery
is not reliable enough, the parser itself now has to maintain this state and mix it
into the new compilation units - doing this is much easier now due to 'one IParser
instance per file'.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Support for files shared between multiple projects&lt;/b&gt;
&lt;br&gt;
Also, there has been a major internal change that isn't apparent in the API:&lt;br&gt;
A single file can now have multiple ParseInformation instances - one per project that
contains the file. Previously, files used by multiple projects would show up in code
completion only for one of the projects. Now the file will be parsed once for each
project that contains it.&lt;br&gt;
&lt;br&gt;
Because a single IParser instance is used for all these parse runs, it is possible
for incremental parsers to avoid redundantly parsing the file. However, a separate
ICompilationUnit must be produced for each run because it contains a pointer to the
parent project content.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=2223b9f6-c02d-4943-94b6-2e4ff8d26b46" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,2223b9f6-c02d-4943-94b6-2e4ff8d26b46.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=ec5316c9-cfeb-4cf1-bb31-2afb463bd68a</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,ec5316c9-cfeb-4cf1-bb31-2afb463bd68a.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,ec5316c9-cfeb-4cf1-bb31-2afb463bd68a.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ec5316c9-cfeb-4cf1-bb31-2afb463bd68a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">SharpDevelop uses the MSBuild libraries
for compilation. But when you compile a project inside SharpDevelop, there's more
going on than a simple call to MSBuild.<br /><br />
SharpDevelop does not pass the whole solution to MSBuild, but performs one build for
each project. This is done to give SharpDevelop more control - e.g. we can pass properties
to MSBuild per-project. For example, when you click "Run code analysis on project
X", we'll first build all dependencies of X normally, and then project X with code
analysis enabled. A normal MSBuild call (e.g. if you use it on the command line) would
perform code analysis on all dependencies of X, too.<br /><br />
When calling MSBuild on a project on the command line, MSBuild will find all referenced
projects and build them recursively. We have to prevent this kind of recursive build
inside SharpDevelop, as we already took care of the referenced projects. We don't
want MSBuild to check referenced projects for changes repeatedly (this would dramatically
slow down builds), and of course we need to prevent MSBuild from running stuff like
code analysis on the dependencies. Fortunately, the Visual Studio team had the same
requirement, so SharpDevelop can simply set the property "BuildingInsideVisualStudio"
to true to disable recursive builds.<br /><br />
However, using that property, MSBuild will call the C# compiler on every build, even
if no source files were changed. This is desired in Visual Studio - VS has its own
"host compiler" that does change detection. But it's bad for SharpDevelop. As a workaround,
we override the MSBuild target responsible for this and fix it. This is an <b>in-memory
modification </b>to your project file; it never gets saved to disk.<br /><br />
Another point where we use this kind of in-memory modifications is for <b>importing
additional .targets files </b>in your project. Some AddIns in SharpDevelop do this
to add new features to the build process - for example the code analysis AddIn.<br /><br />
Now enter <b>parallel builds</b>. It would be nice to be able to call MSBuild on multiple
threads and compile projects in parallel. Unfortunately, that's not possible. MSBuild
uses the process's <b>working directory</b> as a global variable. In one process,
only one build can run at a time. Even worse: if you have MSBuild in your process,
all your other code must deal with concurrent changes to the working directory.<br /><br />
In <b>.NET 3.5</b>, Microsoft introduced the "/m" switch in MSBuild. This makes MSBuild
create multiple worker processes (usually one per processor), enabling concurrent
builds. Unfortunately, this feature is exposed in the MSBuild API only through a single
method, and that only allows several project files from the hard disk in parallel.
It does not support in-memory projects; it cannot even compile projects in parallel
if there are dependencies. Microsoft solves the latter problem by separating the project
in the solution into 'levels' which depend only on projects from the previous level.
However, this doesn't mix well with the way building is integrated in SharpDevelop
- we don't use levels but do a kind of topological sort on the dependency graph, and
not all SharpDevelop project have to use MSBuild; AddIn authors could choose their
own project format and build engine. In the end, I had to <a href="http://laputa.sharpdevelop.net/CompilingInSharpDevelopJustGot30Faster.aspx">create
my own build worker executable</a>.<br /><br />
Now<b></b>in <b>.NET 4.0</b>, Microsoft created a <b>completely new MSBuild API</b>.
The 'level' problem is solved: the new API allows adding new jobs to a running build.
It also seems like it is possible to build in-memory projects in parallel now. But
as it turned out, in-memory changes only work in the primary build worker (in-process),
all other workers load the file from the hard disk and <b>ignore our changes</b>.<br />
Instead of going back to our custom build worker, however; I decided to find a different
solution for handling our modifications. Microsoft.Common.targets contains several
extensions points adding custom .targets files by setting a property. A good solution
for added a custom new target might be setting "CustomAfterMicrosoftCommonTargets"
to the name of the .targets file. However, this might conflict with projects that
already use this feature, so instead I chose "CodeAnalysisTargets". SharpDevelop comes
with its own code analysis targets, so it doesn't hurt if we disable the Microsoft
targets.<br />
So in the end, the solution is trivial: create a temporary file containing only our
modifications and set a property to tell MSBuild to pick up that file.<br /><br />
Why couldn't I simply write the project file including the modifications into a temporary
file? The <a href="http://msdn.microsoft.com/en-us/library/ms164309.aspx">MSBuild
reserved properties</a> would point to the temporary file and custom build events
using those properties would likely fail.<img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=ec5316c9-cfeb-4cf1-bb31-2afb463bd68a" /></body>
      <title>Compiling with MSBuild in SharpDevelop</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,ec5316c9-cfeb-4cf1-bb31-2afb463bd68a.aspx</guid>
      <link>http://laputa.sharpdevelop.net/CompilingWithMSBuildInSharpDevelop.aspx</link>
      <pubDate>Sat, 13 Jun 2009 13:09:44 GMT</pubDate>
      <description>SharpDevelop uses the MSBuild libraries for compilation. But when you compile a project inside SharpDevelop, there's more going on than a simple call to MSBuild.&lt;br&gt;
&lt;br&gt;
SharpDevelop does not pass the whole solution to MSBuild, but performs one build for
each project. This is done to give SharpDevelop more control - e.g. we can pass properties
to MSBuild per-project. For example, when you click "Run code analysis on project
X", we'll first build all dependencies of X normally, and then project X with code
analysis enabled. A normal MSBuild call (e.g. if you use it on the command line) would
perform code analysis on all dependencies of X, too.&lt;br&gt;
&lt;br&gt;
When calling MSBuild on a project on the command line, MSBuild will find all referenced
projects and build them recursively. We have to prevent this kind of recursive build
inside SharpDevelop, as we already took care of the referenced projects. We don't
want MSBuild to check referenced projects for changes repeatedly (this would dramatically
slow down builds), and of course we need to prevent MSBuild from running stuff like
code analysis on the dependencies. Fortunately, the Visual Studio team had the same
requirement, so SharpDevelop can simply set the property "BuildingInsideVisualStudio"
to true to disable recursive builds.&lt;br&gt;
&lt;br&gt;
However, using that property, MSBuild will call the C# compiler on every build, even
if no source files were changed. This is desired in Visual Studio - VS has its own
"host compiler" that does change detection. But it's bad for SharpDevelop. As a workaround,
we override the MSBuild target responsible for this and fix it. This is an &lt;b&gt;in-memory
modification &lt;/b&gt;to your project file; it never gets saved to disk.&lt;br&gt;
&lt;br&gt;
Another point where we use this kind of in-memory modifications is for &lt;b&gt;importing
additional .targets files &lt;/b&gt;in your project. Some AddIns in SharpDevelop do this
to add new features to the build process - for example the code analysis AddIn.&lt;br&gt;
&lt;br&gt;
Now enter &lt;b&gt;parallel builds&lt;/b&gt;. It would be nice to be able to call MSBuild on multiple
threads and compile projects in parallel. Unfortunately, that's not possible. MSBuild
uses the process's &lt;b&gt;working directory&lt;/b&gt; as a global variable. In one process,
only one build can run at a time. Even worse: if you have MSBuild in your process,
all your other code must deal with concurrent changes to the working directory.&lt;br&gt;
&lt;br&gt;
In &lt;b&gt;.NET 3.5&lt;/b&gt;, Microsoft introduced the "/m" switch in MSBuild. This makes MSBuild
create multiple worker processes (usually one per processor), enabling concurrent
builds. Unfortunately, this feature is exposed in the MSBuild API only through a single
method, and that only allows several project files from the hard disk in parallel.
It does not support in-memory projects; it cannot even compile projects in parallel
if there are dependencies. Microsoft solves the latter problem by separating the project
in the solution into 'levels' which depend only on projects from the previous level.
However, this doesn't mix well with the way building is integrated in SharpDevelop
- we don't use levels but do a kind of topological sort on the dependency graph, and
not all SharpDevelop project have to use MSBuild; AddIn authors could choose their
own project format and build engine. In the end, I had to &lt;a href="http://laputa.sharpdevelop.net/CompilingInSharpDevelopJustGot30Faster.aspx"&gt;create
my own build worker executable&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
Now&lt;b&gt; &lt;/b&gt;in &lt;b&gt;.NET 4.0&lt;/b&gt;, Microsoft created a &lt;b&gt;completely new MSBuild API&lt;/b&gt;.
The 'level' problem is solved: the new API allows adding new jobs to a running build.
It also seems like it is possible to build in-memory projects in parallel now. But
as it turned out, in-memory changes only work in the primary build worker (in-process),
all other workers load the file from the hard disk and &lt;b&gt;ignore our changes&lt;/b&gt;.&lt;br&gt;
Instead of going back to our custom build worker, however; I decided to find a different
solution for handling our modifications. Microsoft.Common.targets contains several
extensions points adding custom .targets files by setting a property. A good solution
for added a custom new target might be setting "CustomAfterMicrosoftCommonTargets"
to the name of the .targets file. However, this might conflict with projects that
already use this feature, so instead I chose "CodeAnalysisTargets". SharpDevelop comes
with its own code analysis targets, so it doesn't hurt if we disable the Microsoft
targets.&lt;br&gt;
So in the end, the solution is trivial: create a temporary file containing only our
modifications and set a property to tell MSBuild to pick up that file.&lt;br&gt;
&lt;br&gt;
Why couldn't I simply write the project file including the modifications into a temporary
file? The &lt;a href="http://msdn.microsoft.com/en-us/library/ms164309.aspx"&gt;MSBuild
reserved properties&lt;/a&gt; would point to the temporary file and custom build events
using those properties would likely fail.&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=ec5316c9-cfeb-4cf1-bb31-2afb463bd68a" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,ec5316c9-cfeb-4cf1-bb31-2afb463bd68a.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=39534573-5893-46b6-866c-a7743e03f68b</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,39534573-5893-46b6-866c-a7743e03f68b.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,39534573-5893-46b6-866c-a7743e03f68b.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=39534573-5893-46b6-866c-a7743e03f68b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As you've probably already heard, Microsoft released .NET 4.0 Beta 1 on May, 20th.
</p>
        <p>
SharpDevelop 4.0 will be the SharpDevelop version built on top of .NET 4.0. I've just
got it running:
</p>
        <img border="0" src="http://laputa.sharpdevelop.net/content/binary/RunningOnDotnet4.png" />
        <p>
Yes, that message really reads: "Compiling is not yet implemented". There were huge
changes in MSBuild 4.0 and the parts of SharpDevelop's project system that are talking
to MSBuild will have to be rewritten.
</p>
        <p>
The .NET 4.0 work on SharpDevelop is going on in the dotnet4 branch, for which we
do not provide builds. The dotnet4 branch will be merged back into trunk as soon as
it's good enough so that I think other SharpDevelop contributors can be expected to
use it.
</p>
        <p>
But myself, I'm currently stuck using a dysfunctional version of SharpDevelop for
development. I cannot use previous versions since they cannot compile for .NET 4.0
and don't have code completion for 4.0 libraries. Using the dotnet4 version of SharpDevelop
at least gives me code completion for 4.0 libraries, but it looks like I'll have to
compile from the command line for some time.
</p>
        <p>
I cannot even use Visual Studio 2010 as it doesn't want to open ICSharpCode.SharpDevelop.csproj
- it says it's an unsupported project format. Even if I recreate that project in Visual
Studio, VS doesn't want to open it - looks like a VS bug to me.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=39534573-5893-46b6-866c-a7743e03f68b" />
      </body>
      <title>SharpDevelop running on .NET 4.0 Beta 1</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,39534573-5893-46b6-866c-a7743e03f68b.aspx</guid>
      <link>http://laputa.sharpdevelop.net/SharpDevelopRunningOnNET40Beta1.aspx</link>
      <pubDate>Fri, 22 May 2009 18:50:08 GMT</pubDate>
      <description>&lt;p&gt;
As you've probably already heard, Microsoft released .NET 4.0 Beta 1 on May, 20th.
&lt;/p&gt;
&lt;p&gt;
SharpDevelop 4.0 will be the SharpDevelop version built on top of .NET 4.0. I've just
got it running:
&lt;/p&gt;
&lt;img border="0" src="http://laputa.sharpdevelop.net/content/binary/RunningOnDotnet4.png"&gt; 
&lt;p&gt;
Yes, that message really reads: "Compiling is not yet implemented". There were huge
changes in MSBuild 4.0 and the parts of SharpDevelop's project system that are talking
to MSBuild will have to be rewritten.
&lt;/p&gt;
&lt;p&gt;
The .NET 4.0 work on SharpDevelop is going on in the dotnet4 branch, for which we
do not provide builds. The dotnet4 branch will be merged back into trunk as soon as
it's good enough so that I think other SharpDevelop contributors can be expected to
use it.
&lt;/p&gt;
&lt;p&gt;
But myself, I'm currently stuck using a dysfunctional version of SharpDevelop for
development. I cannot use previous versions since they cannot compile for .NET 4.0
and don't have code completion for 4.0 libraries. Using the dotnet4 version of SharpDevelop
at least gives me code completion for 4.0 libraries, but it looks like I'll have to
compile from the command line for some time.
&lt;/p&gt;
&lt;p&gt;
I cannot even use Visual Studio 2010 as it doesn't want to open ICSharpCode.SharpDevelop.csproj
- it says it's an unsupported project format. Even if I recreate that project in Visual
Studio, VS doesn't want to open it - looks like a VS bug to me.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=39534573-5893-46b6-866c-a7743e03f68b" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,39534573-5893-46b6-866c-a7743e03f68b.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=77dc4d59-d95d-4984-8dac-91a5c6f63ce7</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,77dc4d59-d95d-4984-8dac-91a5c6f63ce7.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,77dc4d59-d95d-4984-8dac-91a5c6f63ce7.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=77dc4d59-d95d-4984-8dac-91a5c6f63ce7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The time to send in proposals for Google Summer Of Code is over now.
</p>
        <p>
Now we're busy reading your proposals and trying to decide on a ranking. This is a
lot more work than I initially expected - we got lots of proposals during the last
three days. Unfortunately, most of the late proposals were of a rather low quality.
</p>
        <p>
In total, we got 44 proposals from 34 students - much more than I expected.
</p>
        <p>
Here's the list of topics proposals were written on. As you can see, most of
them come straight from the <a href="http://wiki.sharpdevelop.net/gsoc.ashx">ideas
page</a>.
</p>
        <ul>
          <li>
10 proposals on Database tools 
</li>
          <li>
5 class diagram / UML related 
</li>
          <li>
4 Edit and Continue / C# background compilation 
</li>
          <li>
4 ASP.NET 
</li>
          <li>
4 Refactoring 
</li>
          <li>
3 C++ support 
</li>
          <li>
3 Debugger visualizer 
</li>
          <li>
3 Customizable Shortcuts 
</li>
          <li>
1 VB 9 code completion 
</li>
          <li>
1 Pretty printer 
</li>
          <li>
1 XAML code completion 
</li>
          <li>
1 Integrated bug tracking 
</li>
          <li>
1 actually creative idea 
</li>
          <li>
1 idea completely unrelated to SharpDevelop 
</li>
          <li>
1 idea I couldn't understand - due to completely broken English and an empty 'Details'
section 
</li>
          <li>
1 proposal that didn't have any idea</li>
        </ul>
        <p>
But we're looking for students who would like to join the SharpDevelop team; we don't
simply want to get some work done. So it's possible that we'll pick multiple
students from the same 'category'; and having the only proposal on a much required
feature doesn't mean you're automatically accepted.
</p>
        <p>
There also were some Java proposals but I'm not sure where they disappeared to. In
any case, SharpDevelop is a .NET IDE, not a Java one. There are already good open
source Java IDEs available; no need to add Java support to SharpDevelop.
</p>
        <p>
This is our first GSOC and I'm not too sure how we should judge the proposals.
A surprisingly large part of them is obviously disqualified because the proposal is
missing necessary details / the template isn't filled out completely. And what
to do with a student who makes a promising impression but chose a project that isn't
really interesting to us; or looks like it's not enough work for GSOC? What about
projects that look like they cannot be done in the GSOC time frame; but it might be
possible for a good coder and the Bio looks like the student knows what he's doing?
</p>
        <p>
We don't know yet how many slots Google will give to us, so we are as excited
as you are :)
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=77dc4d59-d95d-4984-8dac-91a5c6f63ce7" />
      </body>
      <title>GSOC proposals</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,77dc4d59-d95d-4984-8dac-91a5c6f63ce7.aspx</guid>
      <link>http://laputa.sharpdevelop.net/GSOCProposals.aspx</link>
      <pubDate>Sat, 04 Apr 2009 00:16:03 GMT</pubDate>
      <description>&lt;p&gt;
The time to send in proposals for Google Summer Of Code is over now.
&lt;/p&gt;
&lt;p&gt;
Now we're busy reading your proposals and trying to decide on a ranking. This is a
lot more work than I initially expected - we got lots of proposals during the last
three days. Unfortunately, most of the late proposals were of a rather low quality.
&lt;/p&gt;
&lt;p&gt;
In total, we got 44 proposals from 34 students - much more than I expected.
&lt;/p&gt;
&lt;p&gt;
Here's&amp;nbsp;the list of topics proposals were written on. As you can see, most of
them come straight from the &lt;a href="http://wiki.sharpdevelop.net/gsoc.ashx"&gt;ideas
page&lt;/a&gt;.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
10 proposals on Database tools 
&lt;li&gt;
5 class diagram / UML related 
&lt;li&gt;
4 Edit and Continue / C# background compilation 
&lt;li&gt;
4 ASP.NET 
&lt;li&gt;
4 Refactoring 
&lt;li&gt;
3 C++ support 
&lt;li&gt;
3 Debugger visualizer 
&lt;li&gt;
3 Customizable Shortcuts 
&lt;li&gt;
1 VB 9 code completion 
&lt;li&gt;
1 Pretty printer 
&lt;li&gt;
1 XAML code completion 
&lt;li&gt;
1 Integrated bug tracking 
&lt;li&gt;
1 actually creative idea 
&lt;li&gt;
1&amp;nbsp;idea completely unrelated to SharpDevelop 
&lt;li&gt;
1 idea I couldn't understand - due to completely broken English and an empty 'Details'
section 
&lt;li&gt;
1 proposal that didn't have any idea&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
But we're looking for students who would like to join the SharpDevelop team; we don't
simply&amp;nbsp;want to get some work done. So it's possible that we'll pick multiple
students from the same 'category'; and having the only proposal on a much required
feature doesn't mean you're automatically accepted.
&lt;/p&gt;
&lt;p&gt;
There also were some Java proposals but I'm not sure where they disappeared to. In
any case, SharpDevelop is a .NET IDE, not a Java one. There are already good open
source Java IDEs available; no need to add Java support to SharpDevelop.
&lt;/p&gt;
&lt;p&gt;
This is our first GSOC and I'm not too sure&amp;nbsp;how we should judge the proposals.
A surprisingly large part of them is obviously disqualified because the proposal is
missing necessary details / the template isn't filled out completely.&amp;nbsp;And what
to do with a student who makes a promising impression but chose a project that isn't
really interesting to us; or looks like it's not enough work for GSOC? What about
projects that look like they cannot be done in the GSOC time frame; but it might be
possible for a good coder and the Bio looks like the student knows what he's doing?
&lt;/p&gt;
&lt;p&gt;
We don't know yet how many slots Google will give to us, so&amp;nbsp;we&amp;nbsp;are as excited
as you are :)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=77dc4d59-d95d-4984-8dac-91a5c6f63ce7" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,77dc4d59-d95d-4984-8dac-91a5c6f63ce7.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=d3ccf7d4-ff3d-4790-b316-87d4e13962dc</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,d3ccf7d4-ff3d-4790-b316-87d4e13962dc.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,d3ccf7d4-ff3d-4790-b316-87d4e13962dc.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=d3ccf7d4-ff3d-4790-b316-87d4e13962dc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In SharpDevelop 3.1.0.3948, I changed our Subversion integration to use <a href="http://sharpsvn.open.collab.net/">SharpSVN</a> instead
of <a href="http://www.pumacode.org/projects/svndotnet/">SvnDotNet</a>.
</p>
        <p>
SharpSVN exposes more Subversion APIs to managed code, which could result in some
nice features in the (far) future - for example, "SVN Diff" right inside the
text editor.
</p>
        <p>
But the main reason for the upgrade was that SharpSVN supports Subversion 1.6. <strong>If
you are using TortoiseSVN 1.6, you need to update to SharpDevelop 3.1</strong>. The
old SvnDotNet does not work with new working copies.
</p>
        <p>
However, the same is true in the other direction: <strong>if you use SharpDevelop
3.1, you must update to TortoiseSVN 1.6</strong>. No matter which .NET wrapper or
client version is accessing a repository, the underlying Subversion library has
the unpleasant feature to <strong>automatically upgrade working copies</strong>. As
soon as the Subversion 1.6 library inside SharpDevelop touches your working copy,
Subversion 1.5 clients will no longer be able to access it.
</p>
        <p>
You need to <strong>update all Subversion clients</strong> on your machine <strong>at
the same time</strong>. SharpDevelop contains a Subversion client<strong>:</strong></p>
        <ul>
          <li>
SharpDevelop 3.0 comes with Subversion 1.5 and requires TortoiseSVN 1.5.</li>
          <li>
SharpDevelop 3.1 <font size="1">(starting with revision 3948)</font> comes with Subversion
1.6 and requires TortoiseSVN 1.6.</li>
        </ul>
        <p>
          <a href="http://subversion.tigris.org/faq.html#working-copy-format-change">This entry
in the Subversion FAQ</a> describes the problem and offers a working copy downgrade
script, in case you decide to go back to a previous SVN client version.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=d3ccf7d4-ff3d-4790-b316-87d4e13962dc" />
      </body>
      <title>Subversion 1.6</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,d3ccf7d4-ff3d-4790-b316-87d4e13962dc.aspx</guid>
      <link>http://laputa.sharpdevelop.net/Subversion16.aspx</link>
      <pubDate>Fri, 03 Apr 2009 20:20:24 GMT</pubDate>
      <description>&lt;p&gt;
In SharpDevelop 3.1.0.3948, I changed our Subversion integration to use &lt;a href="http://sharpsvn.open.collab.net/"&gt;SharpSVN&lt;/a&gt; instead
of &lt;a href="http://www.pumacode.org/projects/svndotnet/"&gt;SvnDotNet&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
SharpSVN exposes more Subversion APIs to managed code, which could result in some
nice features in the (far) future&amp;nbsp;- for example, "SVN Diff" right inside the
text editor.
&lt;/p&gt;
&lt;p&gt;
But the main reason for the upgrade was that SharpSVN supports Subversion 1.6. &lt;strong&gt;If
you are using TortoiseSVN 1.6, you need to update to SharpDevelop 3.1&lt;/strong&gt;. The
old SvnDotNet does not work with new working copies.
&lt;/p&gt;
&lt;p&gt;
However, the same is true in the other direction: &lt;strong&gt;if you use SharpDevelop
3.1, you must update to TortoiseSVN 1.6&lt;/strong&gt;. No matter which .NET wrapper or
client version is accessing a repository, the underlying Subversion library&amp;nbsp;has
the unpleasant feature to &lt;strong&gt;automatically upgrade working copies&lt;/strong&gt;. As
soon as the Subversion 1.6 library inside SharpDevelop&amp;nbsp;touches your working copy,
Subversion 1.5 clients will no longer be able to access it.
&lt;/p&gt;
&lt;p&gt;
You need to &lt;strong&gt;update all Subversion clients&lt;/strong&gt; on your machine &lt;strong&gt;at
the same time&lt;/strong&gt;. SharpDevelop contains a Subversion client&lt;strong&gt;:&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
SharpDevelop 3.0 comes with Subversion 1.5 and requires TortoiseSVN 1.5.&lt;/li&gt;
&lt;li&gt;
SharpDevelop 3.1 &lt;font size=1&gt;(starting with revision 3948)&lt;/font&gt; comes with Subversion
1.6 and requires TortoiseSVN 1.6.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;a href="http://subversion.tigris.org/faq.html#working-copy-format-change"&gt;This entry
in the Subversion FAQ&lt;/a&gt;&amp;nbsp;describes the problem and offers a working copy downgrade
script, in case you decide to go back to a previous SVN client version.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=d3ccf7d4-ff3d-4790-b316-87d4e13962dc" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,d3ccf7d4-ff3d-4790-b316-87d4e13962dc.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=2c488b7c-f660-47dd-8625-207532c25c44</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,2c488b7c-f660-47dd-8625-207532c25c44.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,2c488b7c-f660-47dd-8625-207532c25c44.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=2c488b7c-f660-47dd-8625-207532c25c44</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In version 3.0.0.3660, I changed how NRefactory's <font face="Courier New">TypeReference.Type</font> works.
This is a potentially breaking change to users of NRefactory.
</p>
        <p>
Previously, <font face="Courier New">TypeReference</font> had both a "<font face="Courier New">Type</font>"
and a "<font face="Courier New">SystemType</font>". If you parsed "<font face="Courier New">long
a;</font>", you got a <font face="Courier New">TypeReference</font> with Type="<font face="Courier New">long</font>"
and SystemType="<font face="Courier New">System.Int64</font>". 
</p>
        <p>
However, this got a little problematic if you wanted to modify the AST - do you have
to change both <font face="Courier New">Type</font> and <font face="Courier New">SystemType</font>?
Actually, setting <font face="Courier New">Type</font> to "<font face="Courier New">int</font>"
was automatically setting <font face="Courier New">SystemType</font> to "<font face="Courier New">System.Int32</font>"
- even if you were modifying VB code which doesn't have the "<font face="Courier New">int</font>"
keyword but uses "<font face="Courier New">Integer</font>". The other way round,
setting <font face="Courier New">Type</font> to "<font face="Courier New">DATE</font>"
would set <font face="Courier New">SystemType</font> to "<font face="Courier New">System.DateTime</font>"
- not only for VB, but also for C#. Because the parser internally also uses the Type
setter, "<font face="Courier New">DATE d;</font>" would parse to "<font face="Courier New">System.DateTime
d;</font>" in C#!
</p>
        <p>
To solve this, I removed the language-specific "<font face="Courier New">Type</font>".
Now the <font face="Courier New">Type</font> property always contains the <font face="Courier New">SystemType</font>.
You can use the new boolean <font face="Courier New">IsKeyword</font> property to
tell if the type was specified using the language keyword or if the CLR type was specified
explicitly.
</p>
        <p>
Another related problem was that there was no way to output "<font face="Courier New">System.Int32
a;</font>" using NRefactory - the output visitor would always automatically convert
it to "<font face="Courier New">int a;</font>". I changed this, too - now the output
visitors will use the short form only if the <font face="Courier New">IsKeyword</font> property
is set. So code generators using NRefactory will output the long form when using the
new NRefactory version unless they are modified to set <font face="Courier New">IsKeyword</font>=<font face="Courier New">true</font>.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=2c488b7c-f660-47dd-8625-207532c25c44" />
      </body>
      <title>NRefactory TypeReference - breaking change</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,2c488b7c-f660-47dd-8625-207532c25c44.aspx</guid>
      <link>http://laputa.sharpdevelop.net/NRefactoryTypeReferenceBreakingChange.aspx</link>
      <pubDate>Sat, 06 Dec 2008 18:49:41 GMT</pubDate>
      <description>&lt;p&gt;
In version 3.0.0.3660, I changed how NRefactory's &lt;font face="Courier New"&gt;TypeReference.Type&lt;/font&gt; works.
This is a potentially breaking change to users of NRefactory.
&lt;/p&gt;
&lt;p&gt;
Previously, &lt;font face="Courier New"&gt;TypeReference&lt;/font&gt; had both a "&lt;font face="Courier New"&gt;Type&lt;/font&gt;"
and a "&lt;font face="Courier New"&gt;SystemType&lt;/font&gt;". If you parsed "&lt;font face="Courier New"&gt;long
a;&lt;/font&gt;", you got a &lt;font face="Courier New"&gt;TypeReference&lt;/font&gt; with Type="&lt;font face="Courier New"&gt;long&lt;/font&gt;"
and SystemType="&lt;font face="Courier New"&gt;System.Int64&lt;/font&gt;". 
&lt;/p&gt;
&lt;p&gt;
However, this got a little problematic if you wanted to modify the AST - do you have
to change both &lt;font face="Courier New"&gt;Type&lt;/font&gt; and &lt;font face="Courier New"&gt;SystemType&lt;/font&gt;?
Actually, setting &lt;font face="Courier New"&gt;Type&lt;/font&gt; to "&lt;font face="Courier New"&gt;int&lt;/font&gt;"
was&amp;nbsp;automatically setting &lt;font face="Courier New"&gt;SystemType&lt;/font&gt; to "&lt;font face="Courier New"&gt;System.Int32&lt;/font&gt;"
- even if you were modifying VB code which doesn't have the&amp;nbsp;"&lt;font face="Courier New"&gt;int&lt;/font&gt;"
keyword but uses&amp;nbsp;"&lt;font face="Courier New"&gt;Integer&lt;/font&gt;". The other way round,
setting &lt;font face="Courier New"&gt;Type&lt;/font&gt; to "&lt;font face="Courier New"&gt;DATE&lt;/font&gt;"
would set &lt;font face="Courier New"&gt;SystemType&lt;/font&gt; to "&lt;font face="Courier New"&gt;System.DateTime&lt;/font&gt;"
- not only for VB, but also for C#. Because the parser internally also uses the Type
setter, "&lt;font face="Courier New"&gt;DATE d;&lt;/font&gt;" would parse to "&lt;font face="Courier New"&gt;System.DateTime
d;&lt;/font&gt;" in C#!
&lt;/p&gt;
&lt;p&gt;
To solve this, I removed the language-specific "&lt;font face="Courier New"&gt;Type&lt;/font&gt;".
Now the &lt;font face="Courier New"&gt;Type&lt;/font&gt; property always contains the &lt;font face="Courier New"&gt;SystemType&lt;/font&gt;.
You can use the new boolean &lt;font face="Courier New"&gt;IsKeyword&lt;/font&gt; property to
tell if the type was specified using the language keyword or if the CLR type was specified
explicitly.
&lt;/p&gt;
&lt;p&gt;
Another related problem was that there was no way to output "&lt;font face="Courier New"&gt;System.Int32
a;&lt;/font&gt;" using NRefactory - the output visitor would always automatically convert
it to "&lt;font face="Courier New"&gt;int a;&lt;/font&gt;". I changed this, too - now the output
visitors will use the short form only if the &lt;font face="Courier New"&gt;IsKeyword&lt;/font&gt; property
is set. So code generators using NRefactory will output the long form when using the
new NRefactory version unless they are modified to set &lt;font face="Courier New"&gt;IsKeyword&lt;/font&gt;=&lt;font face="Courier New"&gt;true&lt;/font&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=2c488b7c-f660-47dd-8625-207532c25c44" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,2c488b7c-f660-47dd-8625-207532c25c44.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=ffdeb55b-b553-4803-92cf-424197b3d150</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,ffdeb55b-b553-4803-92cf-424197b3d150.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,ffdeb55b-b553-4803-92cf-424197b3d150.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ffdeb55b-b553-4803-92cf-424197b3d150</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In revision 3506, SharpDevelop 3.0 got improved support for code analysis using FxCop
1.36.
</p>
        <p>
There were some bugs fixed that were related to the suppress message command
- it was working only with FxCop 1.35, but even there couldn't suppress messages for
static constructors and explicitly implemented interface members.
</p>
        <p>
          <img src="http://laputa.sharpdevelop.net/content/binary/SuppressMessage1.png" border="0" />
        </p>
        <p>
Using this command inserts a SuppressMessageAttribute in the code:<br /><img src="http://laputa.sharpdevelop.net/content/binary/SuppressMessage2.png" border="0" /></p>
        <p>
A new feature is support for custom dictionaries for the FxCop spell checker. Instead
of suppressing tons of spelling messages, you can simply add a new xml file to your
project with content like this:
</p>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">
            <p>
&lt;?xml version="1.0"?&gt;<br /></p>
          </font>
        </font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;Dictionary&gt;<br />
  &lt;Words&gt;<br />
    &lt;Recognized&gt;<br />
      </font>
        </font>
        <font color="#008000" size="2">
          <font color="#008000" size="2">&lt;!--
add words specific to your application here --&gt;<br />
      </font>
        </font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;Word&gt;</font>
        </font>
        <font color="#000000" size="2">Uncollapse</font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;/Word&gt;<br />
    &lt;/Recognized&gt;<br />
    &lt;Unrecognized&gt;<br />
      </font>
        </font>
        <font color="#008000" size="2">
          <font color="#008000" size="2">&lt;!--
Disable Lineup as a single word - LineUp is the spelling used in WPF --&gt;<br />
      </font>
        </font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;Word&gt;</font>
        </font>
        <font color="#000000" size="2">Lineup</font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;/Word&gt;<br />
    &lt;/Unrecognized&gt;<br />
    &lt;Deprecated&gt;<br />
      </font>
        </font>
        <font color="#008000" size="2">
          <font color="#008000" size="2">&lt;!--
Use this section to deprecate terms --&gt;<br />
      </font>
        </font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;Term </font>
        </font>
        <font color="#ff0000" size="2">
          <font color="#ff0000" size="2">PreferredAlternate</font>
        </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">="Best"</font>
        </font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&gt;</font>
        </font>
        <font color="#000000" size="2">Bestest</font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;/Term&gt;<br />
    &lt;/Deprecated&gt;<br />
  &lt;/Words&gt;<br />
  &lt;Acronyms&gt;<br />
    &lt;CasingExceptions&gt;<br />
      </font>
        </font>
        <font color="#008000" size="2">
          <font color="#008000" size="2">&lt;!--
Use this section to tell FxCop the correct casing of acronyms. --&gt;<br />
      </font>
        </font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;Acronym&gt;</font>
        </font>
        <font color="#000000" size="2">WiX</font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;/Acronym&gt;<br />
    &lt;/CasingExceptions&gt;<br />
  </font>
        </font>
        <font color="#8b008b" size="2">
          <font color="#8b008b" size="2">&lt;/Acronyms&gt;<br />
&lt;/Dictionary&gt;</font>
        </font>
        <p>
          <font color="#8b008b" size="2">
            <font color="#8b008b" size="2">
              <font color="#003300">And
then set the file's build action to "CodeAnalysisDictionary" (this build action does
not appear in the drop down, you'll have to type it in).</font>
            </font>
          </font>
        </p>
        <p>
          <img src="http://laputa.sharpdevelop.net/content/binary/CodeAnalysisDictionaryBuildAction.png" border="0" />
        </p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=ffdeb55b-b553-4803-92cf-424197b3d150" />
      </body>
      <title>Code Analysis improvements in SharpDevelop 3.0</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,ffdeb55b-b553-4803-92cf-424197b3d150.aspx</guid>
      <link>http://laputa.sharpdevelop.net/CodeAnalysisImprovementsInSharpDevelop30.aspx</link>
      <pubDate>Sat, 06 Sep 2008 17:32:29 GMT</pubDate>
      <description>&lt;p&gt;
In revision 3506, SharpDevelop 3.0 got improved support for code analysis using FxCop
1.36.
&lt;/p&gt;
&lt;p&gt;
There were some bugs fixed that were&amp;nbsp;related to the suppress message command
- it was working only with FxCop 1.35, but even there couldn't suppress messages for
static constructors and explicitly implemented interface members.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/SuppressMessage1.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Using this command inserts a SuppressMessageAttribute in the code:&lt;br&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/SuppressMessage2.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
A new feature is support for custom dictionaries for the FxCop spell checker. Instead
of suppressing tons of spelling messages, you can simply add a new xml file to your
project with content like this:
&lt;/p&gt;
&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;Dictionary&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Words&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Recognized&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;lt;!--
add words specific to your application here --&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;Word&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;Uncollapse&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;/Word&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/Recognized&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Unrecognized&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;lt;!--
Disable Lineup as a single word - LineUp is the spelling used in WPF --&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;Word&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;Lineup&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;/Word&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Unrecognized&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Deprecated&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;lt;!--
Use this section to deprecate terms --&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;Term &lt;/font&gt;&lt;/font&gt;&lt;font color=#ff0000 size=2&gt;&lt;font color=#ff0000 size=2&gt;PreferredAlternate&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;="Best"&lt;/font&gt;&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;Bestest&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;/Term&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Deprecated&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/Words&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Acronyms&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CasingExceptions&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#008000 size=2&gt;&amp;lt;!--
Use this section to tell FxCop the correct casing of acronyms. --&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;Acronym&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;WiX&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;/Acronym&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/CasingExceptions&amp;gt;&lt;br&gt;
&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&amp;lt;/Acronyms&amp;gt;&lt;br&gt;
&amp;lt;/Dictionary&amp;gt;&lt;/font&gt;&lt;/font&gt;&gt;
&lt;p&gt;
&lt;font color=#8b008b size=2&gt;&lt;font color=#8b008b size=2&gt;&lt;font color=#003300&gt;And then
set the file's build action to "CodeAnalysisDictionary" (this build action does not
appear in the drop down, you'll have to type it in).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/CodeAnalysisDictionaryBuildAction.png" border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=ffdeb55b-b553-4803-92cf-424197b3d150" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,ffdeb55b-b553-4803-92cf-424197b3d150.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=7ad7ab79-b986-41f1-9330-c7d4e2337702</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,7ad7ab79-b986-41f1-9330-c7d4e2337702.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,7ad7ab79-b986-41f1-9330-c7d4e2337702.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7ad7ab79-b986-41f1-9330-c7d4e2337702</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
More than one year ago, I added the XAML language binding to SharpDevelop 3.0, showing
tooltips in .xaml files and enabling refactoring. ("<a class="TitleLinkStyle" href="http://laputa.sharpdevelop.net/XAMLAndWPFSupportInSharpDevelop30.aspx" rel="bookmark">XAML
and WPF support in SharpDevelop 3.0</a>")
</p>
        <p>
Now I finally added the missing part: code completion.
</p>
        <p>
You get completion when typing an element:<br /><img src="http://laputa.sharpdevelop.net/content/binary/XamlElementCompletion.png" border="0" /></p>
        <p>
For attributes:<br /><img src="http://laputa.sharpdevelop.net/content/binary/XamlAttributeCompletion.png" border="0" /></p>
        <p>
And for attribute values if the property expects an enum:<br /><img src="http://laputa.sharpdevelop.net/content/binary/XamlEnumCompletion.png" border="0" /></p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=7ad7ab79-b986-41f1-9330-c7d4e2337702" />
      </body>
      <title>XAML code completion</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,7ad7ab79-b986-41f1-9330-c7d4e2337702.aspx</guid>
      <link>http://laputa.sharpdevelop.net/XAMLCodeCompletion.aspx</link>
      <pubDate>Thu, 04 Sep 2008 23:04:00 GMT</pubDate>
      <description>&lt;p&gt;
More than one year ago, I added the XAML language binding to SharpDevelop 3.0, showing
tooltips in .xaml files and enabling refactoring. ("&lt;a class=TitleLinkStyle href="http://laputa.sharpdevelop.net/XAMLAndWPFSupportInSharpDevelop30.aspx" rel=bookmark&gt;XAML
and WPF support in SharpDevelop 3.0&lt;/a&gt;")
&lt;/p&gt;
&lt;p&gt;
Now I finally added the missing part: code completion.
&lt;/p&gt;
&lt;p&gt;
You get completion when typing an element:&lt;br&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/XamlElementCompletion.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
For attributes:&lt;br&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/XamlAttributeCompletion.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
And for attribute values if the property expects an enum:&lt;br&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/XamlEnumCompletion.png" border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=7ad7ab79-b986-41f1-9330-c7d4e2337702" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,7ad7ab79-b986-41f1-9330-c7d4e2337702.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=f1145c1c-3278-4d96-8cf3-539ed0cdc2a5</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,f1145c1c-3278-4d96-8cf3-539ed0cdc2a5.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,f1145c1c-3278-4d96-8cf3-539ed0cdc2a5.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f1145c1c-3278-4d96-8cf3-539ed0cdc2a5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Starting with version 3.0.0.3010, the C# code completion in SharpDevelop has support
for implicitly typed lambda expressions.
</p>
        <p>
Given a variable "IEnumerable&lt;MyClass&gt; items" and the "Select" extension method
from LINQ, typing "items.Select(i =&gt; i." now shows the members of MyClass. And
if the result of the Select call is assigned to an implicitly typed variable, SharpDevelop
is now able to infer that the variable has the type IEnumerable&lt;return type of
the lambda expression&gt;.
</p>
        <p>
Unlike all other expressions in C#, the type of a lambda expression cannot be inferred
just from by at the expression itself (and the variables used by the expression).
To resolve lambda type parameters, we also need to look at the <strong>context</strong> where
the lambda is used. Currently, not all contexts are supported by code-completion,
you can find the <a href="http://bugtracker.sharpdevelop.net/Issues.aspx?m=1&amp;c=1&amp;v=53">list
of known problems</a> in our bugtracker (Component: DOM / Resolver). Should you find
anything where code-completion does not work correctly which is not in that list,
please file a bug report in our forum.
</p>
        <p>
The most commonly used context for lambda expressions is method calls, and this is
also the most difficult thing to support. It's easy when the method has a clear
signature like "void M(Func&lt;int, string&gt; f)", since then SharpDevelop can <strong>infer
the lambda parameter types</strong> directly from the delegate type. But most of the
time, things aren't that easy. For example, the signature of the Select method is
"IEnumerable&lt;R&gt; Select&lt;T, R&gt;(this IEnumerable&lt;T&gt; input, Func&lt;T,
R&gt; f)". Here, SharpDevelop needs to first infer what T is, then it can know what
the lambda parameter types are, and only after that it can resolve the lambda expression
to infer what R is.
</p>
        <p>
But when the method has multiple overloads, things can get even more messy:<br />
When a method has to overloads "<font face="Courier New">void M(Func&lt;string, int&gt;
f)</font>" and "<font face="Courier New">void M(Func&lt;int, int&gt; f)</font>", it
is valid to call them like this: "<font face="Courier New">F(i=&gt;i.Length)</font>",
"<font face="Courier New">F(i=&gt;i+i)</font>". In the first call, <font face="Courier New">i</font> is
a string; in the second, it is int. What SharpDevelop needs to do here is to infer
the lambda parameter types for each overload separately, infer the lambda's return
type; and then check that against the delegate's signature to see which overload was
the correct one.
</p>
        <p>
          <font face="Courier New">i=&gt;i.Length</font> is a resolve error if <font face="Courier New">i</font> would
be int, but returns the expected int if <font face="Courier New">i</font> is
string; so <font face="Courier New">i</font> must resolve to string.<br /><font face="Courier New">i=&gt;i+i</font> returns a string if <font face="Courier New">i</font> would
be string, but returns the expected int if <font face="Courier New">i</font> is
int; so <font face="Courier New">i</font> must resolve to int.
</p>
        <p>
Note that because there's no way to tell the type of <font face="Courier New">i</font> before
the lambda expression is completed, you cannot expect that SharpDevelop gives you
correct code completion for it. "Length" will not be included in the code-completion
list for <font face="Courier New">i</font> when you type ".", because at that
point, the method call is "F(i=&gt;i)", and <font face="Courier New">i</font> is
thus an int. But after the expression is written, SharpDevelop will show a tooltip
for "Length", and features like "Go to definiton" and "Find references" will work.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=f1145c1c-3278-4d96-8cf3-539ed0cdc2a5" />
      </body>
      <title>Implicit lambda parameter type inference</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,f1145c1c-3278-4d96-8cf3-539ed0cdc2a5.aspx</guid>
      <link>http://laputa.sharpdevelop.net/ImplicitLambdaParameterTypeInference.aspx</link>
      <pubDate>Tue, 01 Apr 2008 07:13:48 GMT</pubDate>
      <description>&lt;p&gt;
Starting with version 3.0.0.3010, the C# code completion in SharpDevelop has support
for implicitly typed lambda expressions.
&lt;/p&gt;
&lt;p&gt;
Given a variable "IEnumerable&amp;lt;MyClass&amp;gt; items" and the "Select" extension method
from LINQ, typing "items.Select(i =&amp;gt; i." now shows the members of MyClass. And
if the result of the Select call is assigned to an implicitly typed variable, SharpDevelop
is now able to infer that the variable has the type IEnumerable&amp;lt;return type of
the lambda expression&amp;gt;.
&lt;/p&gt;
&lt;p&gt;
Unlike all other expressions in C#, the type of a lambda expression cannot be inferred
just from by at the expression itself (and the variables used by the expression).
To resolve lambda type parameters, we also need to look at the &lt;strong&gt;context&lt;/strong&gt; where
the lambda is used. Currently, not all contexts are supported by code-completion,
you can find the &lt;a href="http://bugtracker.sharpdevelop.net/Issues.aspx?m=1&amp;amp;c=1&amp;amp;v=53"&gt;list
of known problems&lt;/a&gt; in our bugtracker (Component: DOM / Resolver). Should you find
anything&amp;nbsp;where code-completion does not work correctly which is not in that list,
please file a bug report in our forum.
&lt;/p&gt;
&lt;p&gt;
The most commonly used context for lambda expressions is method calls, and this is
also the most difficult thing to support. It's easy when the&amp;nbsp;method has a clear
signature like "void M(Func&amp;lt;int, string&amp;gt; f)", since then SharpDevelop can &lt;strong&gt;infer
the lambda parameter types&lt;/strong&gt; directly from the delegate type. But most of the
time, things aren't that easy. For example, the signature of the Select method is
"IEnumerable&amp;lt;R&amp;gt; Select&amp;lt;T, R&amp;gt;(this IEnumerable&amp;lt;T&amp;gt; input, Func&amp;lt;T,
R&amp;gt; f)". Here, SharpDevelop needs to first infer what T is, then it can know what
the lambda parameter types are, and only after that it can resolve the lambda expression
to infer what R is.
&lt;/p&gt;
&lt;p&gt;
But when the method has multiple overloads, things can get even more messy:&lt;br&gt;
When a method has to overloads "&lt;font face="Courier New"&gt;void M(Func&amp;lt;string, int&amp;gt;
f)&lt;/font&gt;" and "&lt;font face="Courier New"&gt;void M(Func&amp;lt;int, int&amp;gt; f)&lt;/font&gt;", it
is valid to call them like this: "&lt;font face="Courier New"&gt;F(i=&amp;gt;i.Length)&lt;/font&gt;",
"&lt;font face="Courier New"&gt;F(i=&amp;gt;i+i)&lt;/font&gt;". In the first call, &lt;font face="Courier New"&gt;i&lt;/font&gt; is
a string; in the second, it is int. What SharpDevelop needs to do here is to infer
the lambda parameter types for each overload separately, infer the lambda's return
type; and then check that against the delegate's signature to see which overload was
the correct one.
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;i=&amp;gt;i.Length&lt;/font&gt; is a&amp;nbsp;resolve&amp;nbsp;error if &lt;font face="Courier New"&gt;i&lt;/font&gt;&amp;nbsp;would
be int,&amp;nbsp;but&amp;nbsp;returns the expected int if &lt;font face="Courier New"&gt;i&lt;/font&gt; is
string; so &lt;font face="Courier New"&gt;i&lt;/font&gt; must resolve to string.&lt;br&gt;
&lt;font face="Courier New"&gt;i=&amp;gt;i+i&lt;/font&gt; returns a string if &lt;font face="Courier New"&gt;i&lt;/font&gt; would
be string, but&amp;nbsp;returns the expected int if &lt;font face="Courier New"&gt;i&lt;/font&gt; is
int; so &lt;font face="Courier New"&gt;i&lt;/font&gt; must resolve to int.
&lt;/p&gt;
&lt;p&gt;
Note that because there's no way to tell the type of&amp;nbsp;&lt;font face="Courier New"&gt;i&lt;/font&gt; before
the lambda expression is completed, you cannot expect that SharpDevelop gives you
correct code completion for it.&amp;nbsp;"Length" will not be included in the code-completion
list for&amp;nbsp;&lt;font face="Courier New"&gt;i&lt;/font&gt; when you type ".", because at that
point, the method call is "F(i=&amp;gt;i)", and&amp;nbsp;&lt;font face="Courier New"&gt;i&lt;/font&gt; is
thus an int. But after the expression is written, SharpDevelop will show a tooltip
for "Length", and features like "Go to definiton" and "Find references" will work.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=f1145c1c-3278-4d96-8cf3-539ed0cdc2a5" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,f1145c1c-3278-4d96-8cf3-539ed0cdc2a5.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=fd64e057-133f-4b64-89ce-8f26d8cc8633</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,fd64e057-133f-4b64-89ce-8f26d8cc8633.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,fd64e057-133f-4b64-89ce-8f26d8cc8633.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=fd64e057-133f-4b64-89ce-8f26d8cc8633</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In SharpDevelop 1.1, the IClass interface had a property that was used in several
places in the code:<br />
Once added to a project content, it was <strong>immutable</strong>. This was not enforced,
not even documented. It just happened that no one changed IClass objects except for
the code constructing them. After being added to a project content, a class could
be removed or replaced by a new version, but if some code still held a reference to
an old instance, it could safely access the members without worrying that an update
to the class on another thread changed something.
</p>
        <p>
IClass objects are accessed without locks all over the place on the main thread during
code completion, and updates on the parser thread should not interfere with that.
</p>
        <p>
However, because I didn't understand this, I broke it in SharpDevelop 2.0. My implementation
of <strong>partial classes</strong> works as following: each file (compilation unit)
contributes a part of the class as IClass object representing that part of the class.<br />
Once multiple files register a part of the class in the project content, the project
content creates a <strong>compound class</strong>. This compound class combines the
members of all the parts. When updating a part, only the IClass for that part was
recreated, and the existing CompoundClass was updated.
</p>
        <img src="http://laputa.sharpdevelop.net/content/binary/mutation.jpg" align="right" border="0" />
        <p>
The CompoundClass, which could be in use by multiple threads, changed values. To quote <a href="http://blogs.msdn.com/wesdyer/archive/2007/03/01/immutability-purity-and-referential-transparency.aspx">Wes
Dyer</a>: "Mutation often seems to just cause problems."
</p>
        <p>
Now, that happened to work correctly for quite some time. Most code iterating through
a class' members did this with<br /><font face="Courier New">foreach (IMethod method in c.Methods) {<br />
}</font><br />
where c is an IClass (possibly a CompoundClass). An update of the compound class happened
to recreate the List&lt;IMethod&gt; behind the c.Methods property, so this code continued
to work as expected.
</p>
        <p>
However, in the quick class browser (the two combo boxes above the code window), there
was code similar to this:<br /><font face="Courier New">list.AddRange(c.Methods);<br />
list.Sort();<br />
list.AddRange(c.Properties);<br />
list.Sort(c.Methods.Count, c.Properties.Count); // sort the properties without mixing
them up with the methods</font></p>
        <p>
Suddenly, due to the addition of partial classes, this became a <strong>race condition</strong> waiting
to happen. But it was found in time for the SharpDevelop 2.0 release, and I fixed
the crash.<br />
But I didn't know much about immutability back then, so what I did was the worst fix
possible:<br /><font face="Courier New">lock (c) { ... }</font><br />
And in CompoundClass, during update of the parts: <font face="Courier New">lock (this)
{ ... }</font></p>
        <p>
Now, this is not only bad because it's fixing the symptom instead of the problem and
it leaves the possibility for similar problems elsewhere in the code - though it might
have been the only instance of the problem, since no other crashes due to this have
been found while SharpDevelop was using the fix (all 2.x releases use it, including
the current stable release, SharpDevelop 2.2.1).
</p>
        <p>
But multi-threading (without immutability) is not hard, it's <strong>really, really
hard</strong>. So it's not really surprising that some day, I found this code to <strong>deadlock</strong>.
</p>
        <p>
So where's the deadlock?<br />
First I must tell you the other lock we're colliding with: every project content has
a lock that it uses to ensure that GetClass() calls are not happening concurrently
when the list of classes is updated. So the parser thread acquires the project content
lock and then the CompoundClass lock to update the CompoundClass.
</p>
        <p>
But why would the AddRange / Sort code deadlock with this? The comparer used for list.Sort()
sorts the members alphabetically using their language-specific conversion to string.
In the case of methods, this includes the parameter list, including the parameter
types.
</p>
        <p>
What you need to know here is that type references (IReturnType objects) are not immutable
- they need to always reference the newest version of the class, as we cannot afford
rebuilding all IReturnType objects from all classes in the solution whenever any class
changes. Now remember that C# allows code like "<font face="Courier New">using
Alias = System.String; class Test { void Method(Alias parameter) {} }</font>".
</p>
        <p>
In this case, the quick class browser correctly resolves the alias and reports "Method(string
parameter)". This means that our Sort() call actually sometimes needs to resolve types!
And resolving types works using IProjectContent.SearchType, which locks on the project
contents' class list lock. And that's our deadlock.
</p>
        <p>
I think it's near impossible to find this kind of deadlock until it occurs and you
can see the call stacks of the two blocked threads.<br />
Remember that the actual Method-&gt;string conversion and the type resolving is language-specific;
it may or may not happen to take a lock for other language binding AddIns.
</p>
        <p>
I fixed the deadlock on trunk (SharpDevelop 3.0) a few months ago by removing the
lock on CompoundClass and instead doing this: 
<br /><font face="Courier New">list.AddRange(c.Methods);<br />
list.Sort();<br />
int count = list.Count;<br />
list.AddRange(c.Properties);<br />
list.Sort(count, list.Count - count);</font></p>
        <p>
It's still a hack, but this doesn't have any side effects (like taking a lock). And
it works correctly under our (new) rule (undocumented rule, aka. <em>assumption</em>)
that multiple c.get_Methods calls may return different collections, but the collection's
contents don't change.
</p>
        <p>
"<font face="Courier New">foreach (IMethod method in c.Methods) { ... }</font>" is
safe, but "<font face="Courier New">for (int i = 0; i &lt; c.Methods.Count; i++) {
IMethod method = c.Methods[i]; ... }</font>" can crash.
</p>
        <p>
But that's quite a difficult rule compared to "IClass never changes". So after reading
Erip Lippert's <a href="http://blogs.msdn.com/ericlippert/archive/2007/11/13/immutability-in-c-part-one-kinds-of-immutability.aspx">series
on immutability</a>, I finally decided to <strong>make IClass immutable again</strong>.
</p>
        <p>
It's "popsicle immutability", that means IClass instances are mutable, but when the
Freeze() method is called, they become immutable. And this time, immutability is <strong>enforced</strong>,
trying to change a property of a frozen IClass will cause an exception. Adding
an IClass to a project content will cause it to freeze if it isn’t already frozen,
so it's guaranteed that IClass objects returned by GetClass or by some type reference
are immutable.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=fd64e057-133f-4b64-89ce-8f26d8cc8633" />
      </body>
      <title>IClass Immutability</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,fd64e057-133f-4b64-89ce-8f26d8cc8633.aspx</guid>
      <link>http://laputa.sharpdevelop.net/IClassImmutability.aspx</link>
      <pubDate>Sat, 26 Jan 2008 23:30:59 GMT</pubDate>
      <description>&lt;p&gt;
In SharpDevelop 1.1, the IClass interface had a property that was used in several
places in the code:&lt;br&gt;
Once added to a project content, it was &lt;strong&gt;immutable&lt;/strong&gt;. This was not enforced,
not even documented. It just happened that no one changed IClass objects except for
the code constructing them. After being added to a project content, a class could
be removed or replaced by a new version, but if some code still held a reference to
an old instance, it could safely access the members without worrying that an update
to the class on another thread changed something.
&lt;/p&gt;
&lt;p&gt;
IClass objects are accessed without locks all over the place on the main thread during
code completion, and updates on the parser thread should not interfere with that.
&lt;/p&gt;
&lt;p&gt;
However, because I didn't understand this, I broke it in SharpDevelop 2.0. My implementation
of &lt;strong&gt;partial classes&lt;/strong&gt; works as following: each file (compilation unit)
contributes a part of the class as IClass object representing that part of the class.&lt;br&gt;
Once multiple files register a part of the class in the project content, the project
content creates a &lt;strong&gt;compound class&lt;/strong&gt;. This compound class combines the
members of all the parts. When updating a part, only the IClass for that part was
recreated, and the existing CompoundClass was updated.
&lt;/p&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/mutation.jpg" align=right border=0&gt; 
&lt;p&gt;
The CompoundClass, which could be in use by multiple threads, changed values. To quote &lt;a href="http://blogs.msdn.com/wesdyer/archive/2007/03/01/immutability-purity-and-referential-transparency.aspx"&gt;Wes
Dyer&lt;/a&gt;: "Mutation often seems to just cause problems."
&lt;/p&gt;
&lt;p&gt;
Now, that happened to work correctly for quite some time. Most code iterating through
a class' members did this with&lt;br&gt;
&lt;font face="Courier New"&gt;foreach (IMethod method in c.Methods) {&lt;br&gt;
}&lt;/font&gt;
&lt;br&gt;
where c is an IClass (possibly a CompoundClass). An update of the compound class happened
to recreate the List&amp;lt;IMethod&amp;gt; behind the c.Methods property, so this code continued
to work as expected.
&lt;/p&gt;
&lt;p&gt;
However, in the quick class browser (the two combo boxes above the code window), there
was code similar to this:&lt;br&gt;
&lt;font face="Courier New"&gt;list.AddRange(c.Methods);&lt;br&gt;
list.Sort();&lt;br&gt;
list.AddRange(c.Properties);&lt;br&gt;
list.Sort(c.Methods.Count, c.Properties.Count); // sort the properties without mixing
them up with the methods&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Suddenly, due to the addition of partial classes, this became a &lt;strong&gt;race condition&lt;/strong&gt; waiting
to happen. But it was found in time for the SharpDevelop 2.0 release, and I fixed
the crash.&lt;br&gt;
But I didn't know much about immutability back then, so what I did was the worst fix
possible:&lt;br&gt;
&lt;font face="Courier New"&gt;lock (c) { ... }&lt;/font&gt;
&lt;br&gt;
And in CompoundClass, during update of the parts: &lt;font face="Courier New"&gt;lock (this)
{ ... }&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Now, this is not only bad because it's fixing the symptom instead of the problem and
it leaves the possibility for similar problems elsewhere in the code - though it might
have been the only instance of the problem, since no other crashes due to this have
been found while SharpDevelop was using the fix (all 2.x releases use it, including
the current stable release, SharpDevelop 2.2.1).
&lt;/p&gt;
&lt;p&gt;
But multi-threading (without immutability) is not hard, it's &lt;strong&gt;really, really
hard&lt;/strong&gt;. So it's not really surprising that some day, I found this code to &lt;strong&gt;deadlock&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
So where's the deadlock?&lt;br&gt;
First I must tell you the other lock we're colliding with: every project content has
a lock that it uses to ensure that GetClass() calls are not happening concurrently
when the list of classes is updated. So the parser thread acquires the project content
lock and then the CompoundClass lock to update the CompoundClass.
&lt;/p&gt;
&lt;p&gt;
But why would the AddRange / Sort code deadlock with this? The comparer used for list.Sort()
sorts the members alphabetically using their language-specific conversion to string.
In the case of methods, this includes the parameter list, including the parameter
types.
&lt;/p&gt;
&lt;p&gt;
What you need to know here is that type references (IReturnType objects) are not immutable
- they need to always reference the newest version of the class, as we cannot afford
rebuilding all IReturnType objects from all classes in the solution whenever any class
changes. Now remember that C# allows code&amp;nbsp;like "&lt;font face="Courier New"&gt;using
Alias = System.String; class Test { void Method(Alias parameter) {} }&lt;/font&gt;".
&lt;/p&gt;
&lt;p&gt;
In this case, the quick class browser correctly resolves the alias and reports "Method(string
parameter)". This means that our Sort() call actually sometimes needs to resolve types!
And resolving types works using IProjectContent.SearchType, which locks on the project
contents' class list lock. And that's our deadlock.
&lt;/p&gt;
&lt;p&gt;
I think it's near impossible to find this kind of deadlock until it occurs and you
can see the call stacks of the two blocked threads.&lt;br&gt;
Remember that the actual Method-&amp;gt;string conversion and the type resolving is language-specific;
it may or may not happen to take a lock for other language binding AddIns.
&lt;/p&gt;
&lt;p&gt;
I fixed the deadlock on trunk (SharpDevelop 3.0) a few months ago by removing the
lock on CompoundClass and instead doing this: 
&lt;br&gt;
&lt;font face="Courier New"&gt;list.AddRange(c.Methods);&lt;br&gt;
list.Sort();&lt;br&gt;
int count = list.Count;&lt;br&gt;
list.AddRange(c.Properties);&lt;br&gt;
list.Sort(count, list.Count - count);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
It's still a hack, but this doesn't have any side effects (like taking a lock). And
it works correctly under our (new) rule (undocumented rule, aka. &lt;em&gt;assumption&lt;/em&gt;)
that multiple c.get_Methods calls may return different collections, but the collection's
contents don't change.
&lt;/p&gt;
&lt;p&gt;
"&lt;font face="Courier New"&gt;foreach (IMethod method in c.Methods) { ... }&lt;/font&gt;" is
safe, but "&lt;font face="Courier New"&gt;for (int i = 0; i &amp;lt; c.Methods.Count; i++) {
IMethod method = c.Methods[i]; ... }&lt;/font&gt;" can crash.
&lt;/p&gt;
&lt;p&gt;
But that's quite a difficult rule compared to "IClass never changes". So after reading
Erip Lippert's &lt;a href="http://blogs.msdn.com/ericlippert/archive/2007/11/13/immutability-in-c-part-one-kinds-of-immutability.aspx"&gt;series
on immutability&lt;/a&gt;, I finally decided to &lt;strong&gt;make IClass immutable again&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
It's "popsicle immutability", that means IClass instances are mutable, but when the
Freeze() method is called, they become immutable. And this time, immutability is &lt;strong&gt;enforced&lt;/strong&gt;,
trying to change&amp;nbsp;a property&amp;nbsp;of a&amp;nbsp;frozen IClass will cause an exception.&amp;nbsp;Adding
an IClass to a project content will cause it to freeze if it isn’t already frozen,
so it's guaranteed that IClass objects returned by GetClass or by some type reference
are immutable.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=fd64e057-133f-4b64-89ce-8f26d8cc8633" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,fd64e057-133f-4b64-89ce-8f26d8cc8633.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=1c4a3a6b-1a1a-4e3f-9cdf-f4909748c138</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,1c4a3a6b-1a1a-4e3f-9cdf-f4909748c138.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,1c4a3a6b-1a1a-4e3f-9cdf-f4909748c138.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=1c4a3a6b-1a1a-4e3f-9cdf-f4909748c138</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Microsoft just <a href="http://weblogs.asp.net/scottgu/archive/2007/11/19/visual-studio-2008-and-net-3-5-released.aspx">released
Visual Studio 2008</a> and the .NET Framework 3.5.
</p>
        <p>
          <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&amp;displaylang=en">Download
.NET Framework 3.5</a>
        </p>
        <p>
To develop applications for the .NET Framework 3.5, <a href="http://build.sharpdevelop.net/BuildArtefacts/">download
SharpDevelop 3.0 from the build server</a>.
</p>
        <p>
Note that SharpDevelop 3.0 are not release quality builds, especially the integrated
debugger is very unstable. As currently no one is working on the debugger (hint: you
can help!), I disabled it in SharpDevelop 3.0.0.2745 so that people trying SharpDevelop
3.0 do not immediately get exceptions when they try run their programs. To re-enable
the debugger, open C:\Program Files\SharpDevelop\3.0\AddIns\AddIns\Misc\Debugger\Debugger.AddIn.addin
in a text editor and remove the &lt;DisableAddIn .../&gt; node.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=1c4a3a6b-1a1a-4e3f-9cdf-f4909748c138" />
      </body>
      <title>.NET Framework 3.5 release</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,1c4a3a6b-1a1a-4e3f-9cdf-f4909748c138.aspx</guid>
      <link>http://laputa.sharpdevelop.net/NETFramework35Release.aspx</link>
      <pubDate>Mon, 19 Nov 2007 21:35:48 GMT</pubDate>
      <description>&lt;p&gt;
Microsoft just &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/11/19/visual-studio-2008-and-net-3-5-released.aspx"&gt;released
Visual Studio 2008&lt;/a&gt; and the .NET Framework 3.5.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&amp;amp;displaylang=en"&gt;Download
.NET Framework 3.5&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
To develop applications for the .NET Framework 3.5, &lt;a href="http://build.sharpdevelop.net/BuildArtefacts/"&gt;download
SharpDevelop 3.0 from the build server&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Note that SharpDevelop 3.0 are not release quality builds, especially the integrated
debugger is very unstable. As currently no one is working on the debugger (hint: you
can help!), I disabled it in SharpDevelop 3.0.0.2745 so that people trying SharpDevelop
3.0 do not immediately get exceptions when they try run their programs. To re-enable
the debugger, open C:\Program Files\SharpDevelop\3.0\AddIns\AddIns\Misc\Debugger\Debugger.AddIn.addin
in a text editor and remove the &amp;lt;DisableAddIn .../&amp;gt; node.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=1c4a3a6b-1a1a-4e3f-9cdf-f4909748c138" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,1c4a3a6b-1a1a-4e3f-9cdf-f4909748c138.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=58eae2c0-1c78-449e-b643-787868532b85</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,58eae2c0-1c78-449e-b643-787868532b85.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,58eae2c0-1c78-449e-b643-787868532b85.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=58eae2c0-1c78-449e-b643-787868532b85</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://bugtracker.sharpdevelop.net/Default.aspx?p=4&amp;i=1234">SD2-1234</a>,
titled "Create common way to handle in-memory representations of files that have multiple
views" is the issue tracker entry behind a major refactoring of the IViewContent interface.
</p>
        <p>
The major new feature introduced is that now it is possible to open a file in multiple
view contents at the same file (using "<a href="http://laputa.sharpdevelop.net/SharpDevelop30FeatureOpenWith.aspx">Open
with</a>"). Both IViewContent instances will edit the same underlying file - when
you switch between them, one view content will display the unsaved changes of
the other; pressing Ctrl+S in one of them will save both.
</p>
        <p>
Now how is this possible? There must be some data structure shared by both view contents.
Since the view contents might not know anything about each other (both could be independently
developed AddIns), this data structure must work on the lowest possible level: bytes. It's
simply a MemoryStream.
</p>
        <p>
Of course the view contents cannot serialize their content on every change; so a view
content may have local changes in a higher-level data structure (text editor buffer,
list of entries in resource file, etc). To ensure that such changes are correctly
synchronized between view contents showing the same file, I introduced the concept
of an <strong>active view content</strong>. The active view content is the only
view content that may have such local changes. Thus, the active view content always
has the most recent version of the file, and it is the only view content that is guaranteed
to have the most recent version.
</p>
        <p>
To represent files, I created the <strong>OpenedFile</strong> class. This class knows
which view contents have opened it and knows which of them is the active view content.
Usually every OpenedFile can have a different active view content; though it is possible
for multiple OpenedFiles to have the same active view content if that view content
opens multiple files - the refactoring also added support for view contents that are
editing multiple files at the same time.
</p>
        <p>
Now a quick overview of the SharpDevelop UI: The SharpDevelop main window is composed
of a main menu, a tool bar, and the DockPanel of Weifen Luo's <a href="http://sourceforge.net/projects/dockpanelsuite">DockPanel
Suite</a>. In the dockable area, there are <strong>pads</strong>, which can be docked
in groups at the sides of the SharpDevelop window; or can float somewhere (e.g. on
a second monitor).<br />
In the remaining space (not occupied by pads), <strong>workbench windows</strong> are
displayed. The active workbench window can be chosen using the tabs at the top. There
can be multiple visible workbench windows if a user drags a tab and docks it to the
side of the remaining space.<br />
Finally, each workbench window contains at least one <strong>view content</strong>.
The active view content can be chosen using the tabs at the bottom.
</p>
        <p>
So if you create a new Windows Application and open Program.cs and MainForm.cs, there
are two workbench windows titled "Program.cs" and "MainForm.cs", but three view contents
- "Program.cs - Source", "MainForm.cs - Source" and "MainForm.cs - Design".
</p>
        <p>
Note that in the new IViewContent architecture, there are no secondary view contents.
Now all view contents are equal, and they shouldn't care if they share a workbench
window or not. Whether they will share a workbench window or not depends on how the
view contents were created - there is still the difference between primary and secondary <strong>display
bindings</strong>, which are responsible for creating view contents.
</p>
        <p>
Now how do changes get from one view content to the other? It's quite simple: Whenever
the user activates a view content (by clicking a tab at the top, by clicking a tab
at the bottom, or by setting focus into another workbench window after the user docked
a window to the side), that view content becomes the active view content for all files
it has opened. The old active view content will be asked to save its content to a
MemoryStream and the new active view content will be asked to load from that MemoryStream.
This way, unsaved changes are transferred from one view content to another.
</p>
        <p>
When the active view content for a file is closed, but there are other open view contents
for that file, SharpDevelop will not ask the user to save the file. Instead, it will
save the data from the view content being closed into a MemoryStream. After that,
the OpenedFile has no active content. Only when one of the other view contents that
have opened that file get activated by the user, that view content will load from
the MemoryStream and thus will preserve unsaved changes from the closed view content.
However, if the user closes all other view contents for that file without making them
active (by middle-clicking, or using Window&gt;Close all), SharpDevelop will ask the
user if the file should be saved and write the MemoryStream content to disk if required.
</p>
        <p>
The system sounds simple for view contents: they just have to be able to load and
save; and it'll just work.
</p>
        <p>
But it isn't that easy. The view contents must be able to load and save <strong>reliably
at any time</strong>.
</p>
        <p>
The user just did something invalid which cannot be saved and then switches to another
view of the file? The view content is forced to save. It's not possible say "I don't
want to save".
</p>
        <p>
The user loads a .resx file in the text editor, changes something by hand that renders
the file invalid XML, opens it in the resource editor, gets an error message, switches
back to the text editor. Here the file is saved by the text editor, loaded in the
resource editor, the user gets the error and switches back, the resource editor <strong>must</strong> save
and the text editor will load again. The resource editor view content <strong>must
support</strong><strong>loading and saving invalid files</strong> unless you
want this kind of round-trip to result in loss of user data.
</p>
        <p>
If your view content is editing multiple files, it gets even more complicated: you
must support loading and saving individual files reliably at any time, in any order.
Sounds fun, right?
</p>
        <p>
Well, if you don't get this right, the user looses data only when editing a file in
multiple views simultaneously. In SharpDevelop 2.x, view contents were simply
overwriting each other's data; in SharpDevelop 3.0 there's at least a chance that
it works if all view contents are implemented correctly.
</p>
        <p>
However, be warned that I didn't have the time to update all view contents in SharpDevelop
to make use of the new model. There's still a class AbstractSecondaryViewContent that
implements Load and Save so that they run through an underlying "primary" view content,
so existing secondary view contents do not have to be completely rewritten (although
they still need several changes). The text and resource editors are fine; use them
to see how it should work. The forms designer does not yet use the new model, it uses
AbstractSecondaryViewContent and still touches the Designer.cs file directly,
resulting in bugs like <a href="http://bugtracker.sharpdevelop.net/Default.aspx?p=4&amp;i=1175">SD2-1175</a>. 
</p>
        <p>
But if you are writing a new view content, try to design it so that you can support
loading and saving at any time. The AbstractViewContentHandlingLoadErrors class (which
both the resource editor and the WPF designer use) can help you handling invalid files.
</p>
        <p>
If your view content edits multiple files, it can get tricky to support loading and
saving those independently. But if it is likely that a user will want to edit one
that files separately while also using your multi-file view content, you will have
to do it. It is possible in SharpDevelop 3.0, so that's an improvement over SharpDevelop
2.x.
</p>
        <p>
By the way: the reason for all this is the settings designer (still not implemented):
it edits both a .settings XML file and app.config, and it's very likely that the user
has opened the app.config at the same time.
</p>
        <p>
 
</p>
        <p>
Post by Daniel Grunwald (we use the category to mark the author on this blog, but
I'll repeat it from now on at the bottom of the post because some feed readers like
Google Reader don't show the category)
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=58eae2c0-1c78-449e-b643-787868532b85" />
      </body>
      <title>IViewContent refactoring explained (SD2-1234)</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,58eae2c0-1c78-449e-b643-787868532b85.aspx</guid>
      <link>http://laputa.sharpdevelop.net/IViewContentRefactoringExplainedSD21234.aspx</link>
      <pubDate>Mon, 01 Oct 2007 19:41:07 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://bugtracker.sharpdevelop.net/Default.aspx?p=4&amp;amp;i=1234"&gt;SD2-1234&lt;/a&gt;,
titled "Create common way to handle in-memory representations of files that have multiple
views" is the issue tracker entry behind a major refactoring of the IViewContent interface.
&lt;/p&gt;
&lt;p&gt;
The major new feature introduced is that now it is possible to open a file in multiple
view contents&amp;nbsp;at the same file&amp;nbsp;(using "&lt;a href="http://laputa.sharpdevelop.net/SharpDevelop30FeatureOpenWith.aspx"&gt;Open
with&lt;/a&gt;"). Both IViewContent instances will edit the same underlying file - when
you switch between them, one view content&amp;nbsp;will display the unsaved changes of
the other; pressing Ctrl+S in one of them will save both.
&lt;/p&gt;
&lt;p&gt;
Now how is this possible? There must be some data structure shared by both view contents.
Since the view contents might not know anything about each other (both could be independently
developed AddIns), this data structure must work on the lowest possible level: bytes.&amp;nbsp;It's
simply a MemoryStream.
&lt;/p&gt;
&lt;p&gt;
Of course the view contents cannot serialize their content on every change; so a view
content may have local changes in a higher-level data structure (text editor buffer,
list of entries in resource file, etc). To ensure that such changes are correctly
synchronized between view contents showing the same file, I introduced the concept
of an &lt;strong&gt;active view content&lt;/strong&gt;.&amp;nbsp;The active view content is the only
view content that may have such local changes. Thus, the active view content always
has the most recent version of the file, and it is the only view content that is guaranteed
to have the most recent version.
&lt;/p&gt;
&lt;p&gt;
To represent files, I created the &lt;strong&gt;OpenedFile&lt;/strong&gt; class. This class knows
which view contents have opened it and knows which of them is the active view content.
Usually every OpenedFile can have a different active view content; though it is possible
for multiple OpenedFiles to have the same active view content if that view content
opens multiple files - the refactoring also added support for view contents that are
editing multiple files at the same time.
&lt;/p&gt;
&lt;p&gt;
Now a quick overview of the SharpDevelop UI: The SharpDevelop main window is composed
of a main menu, a tool bar, and the DockPanel of Weifen Luo's &lt;a href="http://sourceforge.net/projects/dockpanelsuite"&gt;DockPanel
Suite&lt;/a&gt;. In the dockable area, there are &lt;strong&gt;pads&lt;/strong&gt;, which can be docked
in groups at the sides of the SharpDevelop window; or can float somewhere (e.g. on
a second monitor).&lt;br&gt;
In the remaining space (not occupied by pads), &lt;strong&gt;workbench windows&lt;/strong&gt; are
displayed. The active workbench window can be chosen using the tabs at the top. There
can be multiple visible workbench windows if a user drags a tab and docks it to the
side of the remaining space.&lt;br&gt;
Finally, each workbench window contains at least one &lt;strong&gt;view content&lt;/strong&gt;.
The active view content can be chosen using the tabs at the bottom.
&lt;/p&gt;
&lt;p&gt;
So if you create a new Windows Application and open Program.cs and MainForm.cs, there
are two workbench windows titled "Program.cs" and "MainForm.cs", but three view contents
- "Program.cs - Source", "MainForm.cs - Source" and "MainForm.cs - Design".
&lt;/p&gt;
&lt;p&gt;
Note that in the new IViewContent architecture, there are no secondary view contents.
Now all view contents are equal, and they shouldn't care if they share a workbench
window or not. Whether they will share a workbench window or not depends on how the
view contents were created - there is still the difference between primary and secondary &lt;strong&gt;display
bindings&lt;/strong&gt;, which are responsible for creating view contents.
&lt;/p&gt;
&lt;p&gt;
Now how do changes get from one view content to the other? It's quite simple: Whenever
the user activates a view content (by clicking a tab at the top, by clicking a tab
at the bottom, or by setting focus into another workbench window after the user docked
a window to the side), that view content becomes the active view content for all files
it has opened. The old active view content will be asked to save its content to a
MemoryStream and the new active view content will be asked to load from that MemoryStream.
This way, unsaved changes are transferred from one view content to another.
&lt;/p&gt;
&lt;p&gt;
When the active view content for a file is closed, but there are other open view contents
for that file, SharpDevelop will not ask the user to save the file. Instead, it will
save the data from the view content being closed into a MemoryStream. After that,
the OpenedFile has no active content. Only when one of the other view contents that
have opened that file get activated by the user, that view content will load from
the MemoryStream and thus will preserve unsaved changes from the closed view content.
However, if the user closes all other view contents for that file without making them
active (by middle-clicking, or using Window&amp;gt;Close all), SharpDevelop will ask the
user if the file should be saved and write the MemoryStream content to disk if required.
&lt;/p&gt;
&lt;p&gt;
The system sounds simple for view contents: they just have to be able to load and
save; and it'll just work.
&lt;/p&gt;
&lt;p&gt;
But it isn't that easy. The view contents must be able to load and save &lt;strong&gt;reliably
at any time&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
The user just did something invalid which cannot be saved and then switches to another
view of the file? The view content is forced to save. It's not possible say "I don't
want to save".
&lt;/p&gt;
&lt;p&gt;
The user loads a .resx file in the text editor, changes something by hand that renders
the file invalid XML, opens it in the resource editor, gets an error message, switches
back to the text editor. Here the file is saved by the text editor, loaded in the
resource editor, the user gets the error and&amp;nbsp;switches back, the resource editor &lt;strong&gt;must&lt;/strong&gt; save
and the text editor will load again. The resource editor view content &lt;strong&gt;must
support&lt;/strong&gt; &lt;strong&gt;loading and saving invalid files&lt;/strong&gt;&amp;nbsp;unless&amp;nbsp;you
want&amp;nbsp;this kind of round-trip to result in loss of user data.
&lt;/p&gt;
&lt;p&gt;
If your view content is editing multiple files, it gets even more complicated: you
must support loading and saving individual files reliably at any time, in any order.
Sounds fun, right?
&lt;/p&gt;
&lt;p&gt;
Well, if you don't get this right, the user looses data only when editing a file in
multiple views simultaneously. In SharpDevelop 2.x, view contents&amp;nbsp;were simply
overwriting each other's data; in SharpDevelop 3.0 there's at least a chance that
it works if all view contents are implemented correctly.
&lt;/p&gt;
&lt;p&gt;
However, be warned that I didn't have the time to update all view contents in SharpDevelop
to make use of the new model. There's still a class AbstractSecondaryViewContent that
implements Load and Save so that they run through an underlying "primary" view content,
so existing secondary view contents do not have to be completely rewritten (although
they still need several changes). The text and resource editors are fine; use them
to see how it should work. The forms designer does not yet use the new model, it uses
AbstractSecondaryViewContent&amp;nbsp;and still touches the Designer.cs file directly,
resulting in bugs like &lt;a href="http://bugtracker.sharpdevelop.net/Default.aspx?p=4&amp;amp;i=1175"&gt;SD2-1175&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
But if you are writing a new view content, try to design it so that you can support
loading and saving at any time. The AbstractViewContentHandlingLoadErrors class (which
both the resource editor and the WPF designer use) can help you handling invalid files.
&lt;/p&gt;
&lt;p&gt;
If your view content edits multiple files, it can get tricky to support loading and
saving those independently. But if it is likely that a user will want to edit one
that files separately while also using your multi-file view content, you will have
to do it. It is possible in SharpDevelop 3.0, so that's an improvement over SharpDevelop
2.x.
&lt;/p&gt;
&lt;p&gt;
By the way: the reason for all this is the settings designer (still not implemented):
it edits both a .settings XML file and app.config, and it's very likely that the user
has opened the app.config at the same time.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Post by Daniel Grunwald (we use the category to mark the author on this blog, but
I'll repeat it from now on at the bottom of the post because some feed readers like
Google Reader don't show the category)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=58eae2c0-1c78-449e-b643-787868532b85" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,58eae2c0-1c78-449e-b643-787868532b85.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=7aea4c39-6dd2-4598-8a4b-3244e724c416</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,7aea4c39-6dd2-4598-8a4b-3244e724c416.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,7aea4c39-6dd2-4598-8a4b-3244e724c416.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7aea4c39-6dd2-4598-8a4b-3244e724c416</wfw:commentRss>
      <slash:comments>9</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Visual Studio 2008 uses MSBuild 3.5 which supports multi-targeting: you can use it
to compile applications for .NET 2.0, .NET 3.0 and .NET 3.5.
</p>
        <p>
But what happens if you open an MSBuild 2.0 project (Visual Studio 2005 or SharpDevelop
2.x project) in Visual Studio 2008?<br />
Answer: The “Visual Studio Conversion Wizard” will pop up and “convert” the project
to MSBuild 3.5. Though it does generate a fancy upgrade report that looks like source
files have been converted, all it does for a normal Windows Application is the following:
</p>
        <ul>
          <li>
In the .sln file, the solution version is set from 9.00 to 10.00, and the “# Visual
Studio 2005” line is replaced with “# Visual Studio 2008”. This causes the Visual
Studio loader to run VS 2008 instead of VS 2005 when the .sln is double-clicked.</li>
          <li>
In the .csproj file, the attribute ToolsVersion=”3.5” is inserted. This causes MSBuild
to use the C# 3.0 compiler.</li>
          <li>
The property “&lt;OldToolsVersion&gt;2.0&lt;/OldToolsVersion&gt;” is inserted, and
two properties FileUpgradeFlags and UpgradeBackupLocation are introduced, but not
set to a value. This has no effect on compilation.</li>
          <li>
In the .csproj file, the Resources.Designer.cs file got marked as “&lt;DesignTime&gt;True&lt;/DesignTime&gt;”,
which has no effect on compilation.</li>
          <li>
All files generated by a custom tool (Resources.Designer.cs and Settings.Designer.cs)
get regenerated.</li>
          <li>
All other source files remain unchanged.</li>
        </ul>
        <p>
Note that even though the C# 3.0 compiler is used, the project is still <strong>compiled
for .NET 2.0</strong>. The new C# 3.0 languages features are available, but LINQ cannot
be used because it requires referencing System.Core.dll, which comes with the .NET
Framework 3.5.<br />
So the converter did only minor changes, but they prevent working with both VS 2005
and VS 2008 on the same project.
</p>
        <p>
Currently, SharpDevelop does not use the multi-targeting model of VS 2008, but continues
to use the model of SharpDevelop 2.x: The “Target Framework” setting in the project
options allows you to choose the compiler to work with. If you choose C# 2.0 / .NET
2.0, SharpDevelop will not use ToolsVersion=”3.5” on the project, and will create
a solution file version 9. Only if you choose the C# 3.0 compiler, it will make the
project an MSBuild 3.5 project and mark the solution as version 10.
</p>
        <p>
However, this introduces several problems:<br />
C# 2.0 does not support embedding manifest files in assemblies, but C# 3.5 embeds
a default manifest file automatically. Simply changing the target framework changes
the manifest behavior.
</p>
        <p>
MSBuild 2.0 does not check whether the assemblies you referenced are available in
the target framework you have chosen. SharpDevelop can fix this by doing the check
on its own.
</p>
        <p>
The target framework is an option that normally can be dependent on the chosen configuration/platform.
However the ToolsVersion attribute in MSBuild cannot be dependent on configuration/platform.
If one configuration uses C# 3.0, all configurations will; even if they are explicitly
set to C# 2.0.
</p>
        <p>
WPF Applications created in SharpDevelop 2.2 use a different way to support XAML and
resource compilation than MSBuild 3.5 uses. Such applications can be edited in SharpDevelop
3.0 and will continue to work even though they are set to C# 2.0 / .NET 2.0 in the
options.  Setting these projects to C# 3.0 causes problems that can only be fixed
by <strong>manually editing the .csproj file</strong>.
</p>
        <p>
So what should we do?
</p>
        <ol>
          <li>
Keep it as it is: works for usual projects, has the problems mentioned above</li>
          <li>
Do it like VS 2008, drop support for the C# 2.0 compiler and force conversion of the
project</li>
          <li>
Disable the “Target framework” combo box until the user runs a conversion tool for
that project (which could be a button next to the target framework combo box)</li>
        </ol>
        <p>
1. “Keep it broken” has the advantage that it’s zero work for us<br />
2. Would be the easy to implement, but means that you cannot use SharpDevelop 3.0
if your co-worker still uses SharpDevelop 2.x or Visual Studio 2005<br />
3. Would be more work than 2, but is the most flexible solution
</p>
        <p>
          <strong>So do you think the ability to edit VS 2005 projects is worth the effort of
implementing 3 instead of 2?</strong>
          <br />
        </p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=7aea4c39-6dd2-4598-8a4b-3244e724c416" />
      </body>
      <title>Choosing the target framework in SharpDevelop 3.0</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,7aea4c39-6dd2-4598-8a4b-3244e724c416.aspx</guid>
      <link>http://laputa.sharpdevelop.net/ChoosingTheTargetFrameworkInSharpDevelop30.aspx</link>
      <pubDate>Sun, 30 Sep 2007 16:26:53 GMT</pubDate>
      <description>&lt;p&gt;
Visual Studio 2008 uses MSBuild 3.5 which supports multi-targeting: you can use it
to compile applications for .NET 2.0, .NET 3.0 and .NET 3.5.
&lt;/p&gt;
&lt;p&gt;
But what happens if you open an MSBuild 2.0 project (Visual Studio 2005 or SharpDevelop
2.x project) in Visual Studio 2008?&lt;br&gt;
Answer: The “Visual Studio Conversion Wizard” will pop up and “convert” the project
to MSBuild 3.5. Though it does generate a fancy upgrade report that looks like source
files have been converted, all it does for a normal Windows Application is the following:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
In the .sln file, the solution version is set from 9.00 to 10.00, and the “# Visual
Studio 2005” line is replaced with “# Visual Studio 2008”. This causes the Visual
Studio loader to run VS 2008 instead of VS 2005 when the .sln is double-clicked.&lt;/li&gt;
&lt;li&gt;
In the .csproj file, the attribute ToolsVersion=”3.5” is inserted. This causes MSBuild
to use the C# 3.0 compiler.&lt;/li&gt;
&lt;li&gt;
The property “&amp;lt;OldToolsVersion&amp;gt;2.0&amp;lt;/OldToolsVersion&amp;gt;” is inserted, and
two properties FileUpgradeFlags and UpgradeBackupLocation are introduced, but not
set to a value. This has no effect on compilation.&lt;/li&gt;
&lt;li&gt;
In the .csproj file, the Resources.Designer.cs file got marked as “&amp;lt;DesignTime&amp;gt;True&amp;lt;/DesignTime&amp;gt;”,
which has no effect on compilation.&lt;/li&gt;
&lt;li&gt;
All files generated by a custom tool (Resources.Designer.cs and Settings.Designer.cs)
get regenerated.&lt;/li&gt;
&lt;li&gt;
All other source files remain unchanged.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Note that even though the C# 3.0 compiler is used, the project is still &lt;strong&gt;compiled
for .NET 2.0&lt;/strong&gt;. The new C# 3.0 languages features are available, but LINQ cannot
be used because it requires referencing System.Core.dll, which comes with the .NET
Framework 3.5.&lt;br&gt;
So the converter did only minor changes, but they prevent working with both VS 2005
and VS 2008 on the same project.
&lt;/p&gt;
&lt;p&gt;
Currently, SharpDevelop does not use the multi-targeting model of VS 2008, but continues
to use the model of SharpDevelop 2.x: The “Target Framework” setting in the project
options allows you to choose the compiler to work with. If you choose C# 2.0 / .NET
2.0, SharpDevelop will not use ToolsVersion=”3.5” on the project, and will create
a solution file version 9. Only if you choose the C# 3.0 compiler, it will make the
project an MSBuild 3.5 project and mark the solution as version 10.
&lt;/p&gt;
&lt;p&gt;
However, this introduces several problems:&lt;br&gt;
C# 2.0 does not support embedding manifest files in assemblies, but C# 3.5 embeds
a default manifest file automatically. Simply changing the target framework changes
the manifest behavior.
&lt;/p&gt;
&lt;p&gt;
MSBuild 2.0 does not check whether the assemblies you referenced are available in
the target framework you have chosen. SharpDevelop can fix this by doing the check
on its own.
&lt;/p&gt;
&lt;p&gt;
The target framework is an option that normally can be dependent on the chosen configuration/platform.
However the ToolsVersion attribute in MSBuild cannot be dependent on configuration/platform.
If one configuration uses C# 3.0, all configurations will; even if they are explicitly
set to C# 2.0.
&lt;/p&gt;
&lt;p&gt;
WPF Applications created in SharpDevelop 2.2 use a different way to support XAML and
resource compilation than MSBuild 3.5 uses. Such applications can be edited in SharpDevelop
3.0 and will continue to work even though they are set to C# 2.0 / .NET 2.0 in the
options.&amp;nbsp; Setting these projects to C# 3.0 causes problems that can only be fixed
by &lt;strong&gt;manually editing the .csproj file&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
So what should we do?
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Keep it as it is: works for usual projects, has the problems mentioned above&lt;/li&gt;
&lt;li&gt;
Do it like VS 2008, drop support for the C# 2.0 compiler and force conversion of the
project&lt;/li&gt;
&lt;li&gt;
Disable the “Target framework” combo box until the user runs a conversion tool for
that project (which could be a button next to the target framework combo box)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
1. “Keep it broken” has the advantage that it’s zero work for us&lt;br&gt;
2. Would be the easy to implement, but means that you cannot use SharpDevelop 3.0
if your co-worker still uses SharpDevelop 2.x or Visual Studio 2005&lt;br&gt;
3. Would be more work than 2, but is the most flexible solution
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;So do you think the ability to edit VS 2005 projects is worth the effort of
implementing 3 instead of 2?&lt;/strong&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=7aea4c39-6dd2-4598-8a4b-3244e724c416" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,7aea4c39-6dd2-4598-8a4b-3244e724c416.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=d84dca23-cc1d-4401-ac66-603c7c1ecb4f</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,d84dca23-cc1d-4401-ac66-603c7c1ecb4f.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,d84dca23-cc1d-4401-ac66-603c7c1ecb4f.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=d84dca23-cc1d-4401-ac66-603c7c1ecb4f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
From .NET 1.x times, you might remember .manifest files as the way to enable XP visual
styles support in your application.
</p>
        <p>
Application manifests are important in Vista. If your application does not have a
manifest, Vista will treat it as legacy application and enable file and registry virtualization.
This allows the program to write to its own application directory even if it does
not have write access to it - the writes are stored in some hidden folder in the user
profile. This redirection can cause a lot of confusions when users try to save files
using your program where they don't have write access, and instead of getting an error
message the files get saved somewhere else!
</p>
        <p>
Vista also has to determine if programs need administrative rights and should cause
a UAC prompt. To do that, it uses a heuristic that looks at the file name and string
resources to guess if it should elevate. Using a manifest, you can tell
Vista if your program needs elevation and avoid the risk of Vista guessing incorrectly.
</p>
        <p>
Previously, you had to distribute the .manifest file along with the .exe; or you had
to embed it in the .exe using a post-build action calling mt.exe.
</p>
        <p>
The C# 3.0 compiler has built-in support for embedding manifests, and actually creates
a default manifest that turns virtualization off and tells Vista not to elevate if
you don't explicitly tell the compiler not to embed a manifest.
</p>
        <p>
Support for embedding manifests is now available in the SharpDevelop project options:
</p>
        <p>
          <img src="http://laputa.sharpdevelop.net/content/binary/ManifestCreation.png" border="0" />
        </p>
        <p>
You can choose to embed the default manifest, not embed any manifest, or to embed
a custom manifest.<br />
If you select &lt;Create...&gt;, SharpDevelop will automatically create a file called
"app.manifest" in your project. The app.manifest created by SharpDevelop is similar
to the default manifest the C# compiler uses; it just adds some comments so you don't
have to look up how to control Vista's UAC.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=d84dca23-cc1d-4401-ac66-603c7c1ecb4f" />
      </body>
      <title>Embedding manifests</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,d84dca23-cc1d-4401-ac66-603c7c1ecb4f.aspx</guid>
      <link>http://laputa.sharpdevelop.net/EmbeddingManifests.aspx</link>
      <pubDate>Fri, 28 Sep 2007 22:08:15 GMT</pubDate>
      <description>&lt;p&gt;
From .NET 1.x times, you might remember .manifest files as the way to enable XP visual
styles support in your application.
&lt;/p&gt;
&lt;p&gt;
Application manifests are important in Vista. If your application does not have a
manifest, Vista will treat it as legacy application and enable file and registry virtualization.
This allows the program to write to its own application directory even if it does
not have write access to it - the writes are stored in some hidden folder in the user
profile. This redirection can cause a lot of confusions when users try to save files
using your program where they don't have write access, and instead of getting an error
message the files get saved somewhere else!
&lt;/p&gt;
&lt;p&gt;
Vista also has to determine if programs need administrative rights and should cause
a UAC prompt. To do that, it uses a heuristic that looks at the file name and string
resources to guess if it should elevate.&amp;nbsp;Using a&amp;nbsp;manifest, you can tell
Vista if your program needs elevation and avoid the risk of Vista guessing incorrectly.
&lt;/p&gt;
&lt;p&gt;
Previously, you had to distribute the .manifest file along with the .exe; or you had
to embed it in the .exe using a post-build&amp;nbsp;action calling mt.exe.
&lt;/p&gt;
&lt;p&gt;
The C# 3.0 compiler has built-in support for embedding manifests, and actually creates
a default manifest that turns virtualization off and tells Vista not to elevate if
you don't explicitly tell the compiler not to embed a manifest.
&lt;/p&gt;
&lt;p&gt;
Support for embedding manifests is now available in the SharpDevelop project options:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/ManifestCreation.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
You can choose to embed the default manifest, not embed any manifest, or to embed
a custom manifest.&lt;br&gt;
If you select &amp;lt;Create...&amp;gt;, SharpDevelop will automatically create a file called
"app.manifest" in your project. The app.manifest created by SharpDevelop&amp;nbsp;is similar
to the default manifest the C# compiler uses; it just adds some comments so you don't
have to look up how to control Vista's UAC.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=d84dca23-cc1d-4401-ac66-603c7c1ecb4f" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,d84dca23-cc1d-4401-ac66-603c7c1ecb4f.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=2c9784b0-dd77-4643-a6c3-8726c6855981</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,2c9784b0-dd77-4643-a6c3-8726c6855981.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,2c9784b0-dd77-4643-a6c3-8726c6855981.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=2c9784b0-dd77-4643-a6c3-8726c6855981</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday I wrote about <a href="http://laputa.sharpdevelop.net/CompilingInSharpDevelopJustGot30Faster.aspx">how
I made compiling 30% faster</a> by using multi-threading to let my dual-core CPU work
with both cores. A problem was that I had to use serialize build events to send them
back to the host process.
</p>
        <pre>
          <font face="Verdana">MSBuild provides these events to loggers (number of <span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #003300; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'; mso-fareast-language: DE; mso-bidi-language: AR-SA">occurrences</span> during
the test shown in parenthesis):</font>
          <br />
MessageRaised   (21156)<br />
ErrorRaised      (0)<br />
WarningRaised   (18)<br />
BuildStarted      (47)<br />
BuildFinished     (47)<br />
ProjectStarted  (449)<br />
ProjectFinished (449)<br />
TargetStarted (2910)<br />
TargetFinished (2910)<br />
TaskStarted (4308)<br />
TaskFinished (4308)<br />
CustomEventRaised (0)</pre>
        <p>
All these events must be send to the SharpDevelop process, where logger AddIns can
process them. Each one is serialized separately, and includes information about the
full name of the project file being build and some other highly redundant information.
Each event is about 1 KB in serialized form. Half of the events <span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #003300; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: DE; mso-bidi-language: AR-SA">occurred </span>in
the worker running in the SharpDevelop process, but the other half <span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #003300; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: DE; mso-bidi-language: AR-SA">occurred </span>in
the worker that ran in its own process; so half of the events had to be <span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #003300; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: DE; mso-bidi-language: AR-SA">transferred</span>,
so we tranferred a total of 18 MB during the 25-second build. Remember the main cost
is the serialization (.NET BinaryFormatter), not the data transfer itself.
</p>
        <p>
Obviously, most of these events are not interesting for SharpDevelop, and the best
way to improve performance is to ignore uninteresting events in the worker instead
of ignoring them in the host.<br />
So which events does SharpDevelop need? Potentially all, since AddIns can add loggers;
but if those AddIns tell SharpDevelop which<br />
events are required before the build starts, we can optimize for the common case that
all AddIns are only interested in specific events - usually only in errors and warnings.
Events that SharpDevelop currently does not use anywhere are MessageRaised, TargetStarted
and TargetFinished - all are called quite frequently.<br />
To our benchmark results from yesterday, I added an entry "Less events" where MessageRaised,
TargetStarted and TargetFinished are deactivated:
</p>
        <p>
Core Duo Notebook, 1 GB RAM, Vista Home Premium, Aero disabled:<br />
 Rebuild:<br />
   One worker:  35.2, 34.9, 35.2, 35.0, 34.3 : Average 35.1 seconds<br />
   Two workers: 25.6, 23.9, 24.2, 23.5, 23.8 : Average 24.2 seconds<br />
   Less events: 23.7, 23.5, 23.0, 22.4, 21.2 : Average 22.8 seconds
</p>
        <p>
 Build (no changes):<br />
   One worker:  7.4, 7.1, 7.2, 7.8, 7.1 : Average 7.3 seconds<br />
   Two workers: 6.9, 6.8, 6.7, 6.6, 6.2 : Average 6.6 seconds<br />
   Less events: 5.1, 5.0, 6.2, 5.6, 5.1 : Average 5.4 seconds
</p>
        <p>
More than 1 second saved! (see yesterdays' post for details about the benchmark)
</p>
        <p>
Now why does SharpDevelop need TaskStarted and TaskFinished? Take a look at the code:<br /><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> OnTaskStarted(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
TaskStartedEventArgs e)<br />
{<br />
  activeTaskName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> e.TaskName;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
if</span> (MSBuildEngine.CompileTaskNames.Contains(e.TaskName.ToLowerInvariant()))
{<br />
    AppendText(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"${res:MainWindow.CompilerMessages.CompileVerb}
"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> Path.GetFileNameWithoutExtension(e.ProjectFile));<br />
  }<br />
}</span></p>
        <p>
TaskStarted is just there to let the user know that building a project resulted in
a recompilation - when doing a Rebuild, SharpDevelop<br />
shows "Compiling ProjectName" for each project, whereas for a Build (no changes),
no such lines are shown in the Output view.<br />
But in fact, all consumers of TaskStarted probably look for specific task names.
And all consumers of TaskFinished are also listening to TaskStarted and are also only
interested in some specific types of tasks.<br />
If we pass the build worker a list of task names we are interested in, it can send
us only those events and we don't spend time serializing the tons of events about
the tasks &lt;Copy&gt;, &lt;Message&gt; etc.<br />
Together with the "Less events" changes, this decreases the event count from over
36000 to less than 1000.
</p>
        <p>
I implemented this in revision 2696.
</p>
        <p>
Now let's extend our benchmark:<br />
Core Duo Notebook, 1 GB RAM, Vista Home Premium, Aero disabled, two workers, new event
handling:<br />
 Rebuild: 20.3, 20.9, 19.9, 20.2, 20.0 : Average 20.3 seconds<br />
 Build (no changes): 4.3, 4.6, 5.0, 4.4, 4.2 : Average 4.5 seconds
</p>
        <p>
That's better than "Less events" because we're sending even less events now, but logger
AddIns can tell SharpDevelop that they need to receive additional events,
so AddIns did not lose any functionality (but if you install such an AddIn, of course
you would lose the performance benefits).<br />
So we're now down from formerly 35.1 seconds (using only one core) to 20.3 seconds
- that's 43% faster.<br />
For "Build (no changes)", the reduction of the event count now makes using two workers
efficient; from originally 7.3 seconds to 4.5 seconds is a 39% decrease in build time.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=2c9784b0-dd77-4643-a6c3-8726c6855981" />
      </body>
      <title>And now compiling in SharpDevelop is 40% faster</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,2c9784b0-dd77-4643-a6c3-8726c6855981.aspx</guid>
      <link>http://laputa.sharpdevelop.net/AndNowCompilingInSharpDevelopIs40Faster.aspx</link>
      <pubDate>Thu, 27 Sep 2007 13:31:07 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday I wrote about &lt;a href="http://laputa.sharpdevelop.net/CompilingInSharpDevelopJustGot30Faster.aspx"&gt;how
I made compiling 30% faster&lt;/a&gt; by using multi-threading to let my dual-core CPU work
with both cores. A problem was that I had to use serialize build events to send them
back to the host process.
&lt;/p&gt;
&lt;pre&gt;&lt;font face=Verdana&gt;MSBuild provides these events to loggers (number of &lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Courier New'; mso-fareast-language: DE; mso-bidi-language: AR-SA"&gt;occurrences&lt;/span&gt; during
the test shown in parenthesis):&lt;/font&gt;
&lt;br&gt;
MessageRaised&amp;nbsp;&amp;nbsp; (21156)&lt;br&gt;
ErrorRaised&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (0)&lt;br&gt;
WarningRaised&amp;nbsp;&amp;nbsp; (18)&lt;br&gt;
BuildStarted&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (47)&lt;br&gt;
BuildFinished&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (47)&lt;br&gt;
ProjectStarted&amp;nbsp; (449)&lt;br&gt;
ProjectFinished (449)&lt;br&gt;
TargetStarted (2910)&lt;br&gt;
TargetFinished (2910)&lt;br&gt;
TaskStarted (4308)&lt;br&gt;
TaskFinished (4308)&lt;br&gt;
CustomEventRaised (0)&lt;/pre&gt;
&lt;p&gt;
All these events must be send to the SharpDevelop process, where logger AddIns can
process them. Each one is serialized separately, and includes information about the
full name of the project file being build and some other highly redundant information.
Each event is about 1 KB in serialized form. Half of the events &lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: DE; mso-bidi-language: AR-SA"&gt;occurred &lt;/span&gt;in
the worker running in the SharpDevelop process, but the other half &lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: DE; mso-bidi-language: AR-SA"&gt;occurred &lt;/span&gt;in
the worker that ran in its own process;&amp;nbsp;so half of the events had to be &lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: DE; mso-bidi-language: AR-SA"&gt;transferred&lt;/span&gt;,
so we tranferred a total of 18 MB during the 25-second build. Remember the main cost
is the serialization (.NET BinaryFormatter), not the data transfer itself.
&lt;/p&gt;
&lt;p&gt;
Obviously, most of these events are not interesting for SharpDevelop, and the best
way to improve performance is to ignore uninteresting events in the worker instead
of ignoring them in the host.&lt;br&gt;
So which events does SharpDevelop need? Potentially all, since AddIns can add loggers;
but if those AddIns tell SharpDevelop which&lt;br&gt;
events are required before the build starts, we can optimize for the common case that
all AddIns are only interested in specific events - usually only in errors and warnings.
Events that SharpDevelop currently does not use anywhere are MessageRaised, TargetStarted
and TargetFinished - all are called quite frequently.&lt;br&gt;
To our benchmark results from yesterday, I added an entry "Less events" where MessageRaised,
TargetStarted and TargetFinished are deactivated:
&lt;/p&gt;
&lt;p&gt;
Core Duo Notebook, 1 GB RAM, Vista Home Premium, Aero disabled:&lt;br&gt;
&amp;nbsp;Rebuild:&lt;br&gt;
&amp;nbsp;&amp;nbsp; One worker:&amp;nbsp; 35.2, 34.9, 35.2, 35.0, 34.3 : Average 35.1 seconds&lt;br&gt;
&amp;nbsp;&amp;nbsp; Two workers: 25.6, 23.9, 24.2, 23.5, 23.8 : Average 24.2 seconds&lt;br&gt;
&amp;nbsp;&amp;nbsp; Less events: 23.7, 23.5, 23.0, 22.4, 21.2 : Average 22.8 seconds
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;Build (no changes):&lt;br&gt;
&amp;nbsp;&amp;nbsp; One worker:&amp;nbsp; 7.4, 7.1, 7.2, 7.8, 7.1 : Average 7.3 seconds&lt;br&gt;
&amp;nbsp;&amp;nbsp; Two workers: 6.9, 6.8, 6.7, 6.6, 6.2 : Average 6.6 seconds&lt;br&gt;
&amp;nbsp;&amp;nbsp; Less events: 5.1, 5.0, 6.2, 5.6, 5.1 : Average 5.4 seconds
&lt;/p&gt;
&lt;p&gt;
More than 1 second saved! (see yesterdays' post for details about the benchmark)
&lt;/p&gt;
&lt;p&gt;
Now why does SharpDevelop need TaskStarted and TaskFinished? Take a look at the code:&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; OnTaskStarted(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
TaskStartedEventArgs e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; activeTaskName &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; e.TaskName;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
if&lt;/span&gt; (MSBuildEngine.CompileTaskNames.Contains(e.TaskName.ToLowerInvariant()))
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; AppendText(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"${res:MainWindow.CompilerMessages.CompileVerb}
"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; Path.GetFileNameWithoutExtension(e.ProjectFile));&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
TaskStarted is just there to let the user know that building a project resulted in
a recompilation - when doing a Rebuild, SharpDevelop&lt;br&gt;
shows "Compiling ProjectName" for each project, whereas for a Build (no changes),
no such lines are shown in the Output view.&lt;br&gt;
But in fact, all&amp;nbsp;consumers of TaskStarted probably look for specific task names.
And all consumers of TaskFinished are also listening to TaskStarted and are also only
interested in some specific types of tasks.&lt;br&gt;
If we pass the build worker a list of task names we are interested in, it can send
us only those events and we don't spend time serializing the tons of events about
the tasks &amp;lt;Copy&amp;gt;, &amp;lt;Message&amp;gt; etc.&lt;br&gt;
Together with the "Less events" changes, this decreases the event count from over
36000 to less than 1000.
&lt;/p&gt;
&lt;p&gt;
I implemented this in revision 2696.
&lt;/p&gt;
&lt;p&gt;
Now let's extend our benchmark:&lt;br&gt;
Core Duo Notebook, 1 GB RAM, Vista Home Premium, Aero disabled, two workers, new event
handling:&lt;br&gt;
&amp;nbsp;Rebuild: 20.3, 20.9, 19.9, 20.2, 20.0 : Average 20.3 seconds&lt;br&gt;
&amp;nbsp;Build (no changes): 4.3, 4.6, 5.0, 4.4, 4.2 : Average 4.5 seconds
&lt;/p&gt;
&lt;p&gt;
That's better than "Less events" because we're sending even less events now, but logger
AddIns can&amp;nbsp;tell SharpDevelop&amp;nbsp;that they need to receive additional events,
so AddIns did not lose any functionality (but if you install such an AddIn, of course
you would lose the performance benefits).&lt;br&gt;
So we're now down from formerly 35.1 seconds (using only one core) to 20.3 seconds
- that's 43% faster.&lt;br&gt;
For "Build (no changes)", the reduction of the event count now makes using two workers
efficient; from originally 7.3 seconds to 4.5 seconds is a 39% decrease in build time.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=2c9784b0-dd77-4643-a6c3-8726c6855981" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,2c9784b0-dd77-4643-a6c3-8726c6855981.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=7a8b8be6-001b-486e-886a-aeeddc3f274e</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,7a8b8be6-001b-486e-886a-aeeddc3f274e.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,7a8b8be6-001b-486e-886a-aeeddc3f274e.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7a8b8be6-001b-486e-886a-aeeddc3f274e</wfw:commentRss>
      <title>Compiling in SharpDevelop just got 30% faster</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,7a8b8be6-001b-486e-886a-aeeddc3f274e.aspx</guid>
      <link>http://laputa.sharpdevelop.net/CompilingInSharpDevelopJustGot30Faster.aspx</link>
      <pubDate>Wed, 26 Sep 2007 20:05:40 GMT</pubDate>
      <description>&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;[Warning:
long post. Short&amp;nbsp;version: Building&amp;nbsp;in SharpDevelop goes multi-threaded,
scroll down for benchmark results]&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;SharpDevelop
3.0.0.2694 contains a rewritten build system. &lt;/span&gt;&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;It
has some new features that might be interesting for AddIn developers, but one new
feature&amp;nbsp;is directly useful for users, or more specifically, users with&amp;nbsp;multi-core
CPUs.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;Here
a quick history on build systems in SharpDevelop:&lt;br&gt;
&lt;/span&gt;&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;SharpDevelop
2.0 (the first version to use MSBuild), compiled solutions by telling MSBuild to build&amp;nbsp;the
.sln file.&lt;br&gt;
SharpDevelop 2.1 and 2.2 compile solutions by telling MSBuild to build the projects
individually.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;When
writing the build engine for SharpDevelop 2.1, I tried to make it multi-threaded so
that two projects that are not dependent on each other can be built in parallel. However,
this did not work: MSBuild makes use Environment.CurrentDirectory; and if two MSBuild
instances run in the same process at the same time, they overwrite the CurrentDirectory
and cause the other instance to search files in the wrong location.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;Now
I solved this problem by moving the build into worker processes. However, this means
that all MSBuild events&amp;nbsp;are serialized and remoted to the host process, where
SharpDevelop AddIns need to have access to them - e.g. the CodeAnalysis AddIn registers&amp;nbsp;itself
as MSBuild logger, waits for the TaskStarted, ErrorRaised, WarningRaised and TaskFinished
events and fixes certain FxCop error messages (some FxCop&amp;nbsp;errors are not associated
with a line number, but with a class/member name). Other SharpDevelop AddIns might
decide that certain MSBuild events should be displayed in some form, e.g. in the output
window. The only way to give AddIns access to all MSBuild events like they had before
is to serialize all events and send them to the SharpDevelop process. When doing a
build where there's relatively few work but lots of events (e.g. "Clean solution"),
the worker is sending&amp;nbsp;up to&amp;nbsp;1 MB/s of serialized&amp;nbsp;events&amp;nbsp;to the
host.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;This
had a noticeable impact on performance, so I've kept the first worker in the SharpDevelop
process, and only&amp;nbsp;additional workers get&amp;nbsp;their own&amp;nbsp;process. So if you
use only one worker, you won't see any worker process and should get the same build
performance as SharpDevelop 2.x.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;So
even though building a project has multiple parts, of which some are waiting for the
disk and others are waiting for the CPU; the overhead of using a&amp;nbsp;worker process&amp;nbsp;will
cause the build to get slower. (MSBuild has to check if input files changed, start
the compiler; the compiler will load input files, actually compile, write the output
assembly; and some other stuff happens in the obj\ directory that you probably don't
want to hear about)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;But
if you have a dual core processor, the CPU overhead doesn't hurt:&amp;nbsp;a little overhead
for one core is better than not using that core at all&amp;nbsp;(this is assuming the
compiler you use is not multithreaded).&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;But
enough talking, let's get some benchmark results:&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;I
used SharpDevelop 3.0.0.2694 to compile the source code for SharpDevelop 2.2.1:&lt;br&gt;
AMD 3500+ (single core), 2 GB RAM, Vista Ultimate (32 bit), Areo enabled:&lt;br&gt;
&amp;nbsp;Rebuild:&lt;br&gt;
&amp;nbsp;&amp;nbsp; One worker: 34.3, 34.1, 34.6, 34.7, 34.3 : Average 34.4 seconds&lt;br&gt;
&amp;nbsp;&amp;nbsp; Two workers: 39.6, 38.7, 38.1, 37.0, 36.6 : Average 38.0 seconds&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;&amp;nbsp;Build
(no changes, so it's not compiling, but just checking everything for changes):&lt;br&gt;
&amp;nbsp;&amp;nbsp; One worker:&amp;nbsp; 8.5,&amp;nbsp; 8.0,&amp;nbsp; 8.3,&amp;nbsp; 8.0,&amp;nbsp; 8.0 : Average&amp;nbsp;
8.2 seconds&lt;br&gt;
&amp;nbsp;&amp;nbsp; Two workers: 13.4, 13.9, 14.0, 12.8, 13.1 : Average 13.4 seconds&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;The
number of MSBuild events (Target started, Task started, Log Message...) is not much
different between Rebuild and Build (no changes), so we get a constant overhead of
about&amp;nbsp;5 seconds for the SharpDevelop solution on my desktop computer with a single
core processor.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;Here
finally is the interesting part: Test results from my dual core notebook:&lt;/span&gt;&lt;/strong&gt;&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;Core
Duo T2300, 1 GB RAM, Vista Home Premium (32 bit), Aero disabled:&lt;br&gt;
&amp;nbsp;Rebuild:&lt;br&gt;
&amp;nbsp;&amp;nbsp; One worker: 35.2, 34.9, 35.2, 35.0, 34.3 : Average 35.1 seconds&lt;br&gt;
&amp;nbsp;&amp;nbsp; Two workers: 25.6, 23.9, 24.2, 23.5, 23.8 : Average 24.2 seconds&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;&amp;nbsp;Build
(no changes):&lt;br&gt;
&amp;nbsp;&amp;nbsp; One worker: 7.4, 7.1, 7.2, 7.8, 7.1 : Average 7.3 seconds&lt;br&gt;
&amp;nbsp;&amp;nbsp; Two workers: 6.9, 6.8, 6.7, 6.6, 6.2 : Average 6.6 seconds&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;For&amp;nbsp;build
(no changes), the overhead plays a big role, but using two workers still made the
build a little faster.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;But
for the real job when there's something to compile, using two workers really rocks:
My build is now 30% faster.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;SharpDevelop
3.0 allows you to set the number of workers under Tools &amp;gt; Options &amp;gt; Project
and solution &amp;gt; Number of projects to build in parallel. The default value for single-core
processors is 1, for other processors it's 2. I don't know if going above 2 will have
benefits for quad-core users as the overhead (both CPU for sending events to the host
and memory because of the additional processes) increases with the number of workers.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;Please
leave a comment here with your test results - I'm looking for feedback from other
multi-core users.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span lang=EN-US style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-US"&gt;And
if you're doing your own benchmark, some notes on how I did my benchmark:&lt;br&gt;
- make sure enough RAM is free so that not only the system does not swap, but Windows
has enough room to keep the files you are compiling in memory (this is generally a
good idea if you want your system to be fast)&lt;br&gt;
- don't count the first test run as the files are not yet in memory there&lt;br&gt;
- reuse the same&amp;nbsp;SharpDevelop instance for all test runs&lt;br&gt;
- if you leave less than 60 seconds between test runs, SharpDevelop will re-use the
worker process, otherwise it is shut down and has to be restarted. I did my tests
re-using a single worker process. It might be interesting to&amp;nbsp;see if the overhead
of restarting the worker process is worth keeping it longer than 60 seconds.&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=7a8b8be6-001b-486e-886a-aeeddc3f274e" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,7a8b8be6-001b-486e-886a-aeeddc3f274e.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=88ce0c30-0625-4eb0-9846-68d31c646b6b</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,88ce0c30-0625-4eb0-9846-68d31c646b6b.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,88ce0c30-0625-4eb0-9846-68d31c646b6b.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=88ce0c30-0625-4eb0-9846-68d31c646b6b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When you double-click a file in SharpDevelop 2.x, it will get opened inside SharpDevelop.
AddIns can add display bindings opening for opening file types (e.g. ResourceEditor
for .resx files), but this has the effect of disabling the other display bindings
for that file type - In SharpDevelop 2.x, you cannot open a .resx file inside the
text editor (except if you disable the ResourceEditor AddIn).
</p>
        <p>
In SharpDevelop 3.0, you can now right-click a file in the project browser and select
"Open With...". A dialog will show the list of display bindings that can handle the
file type. There also is the entry "Use the default Windows application for this file"
which will open the file as if you double-clicked it in Windows Explorer.
</p>
        <p>
You can add new programs to the "Open With" list. SharpDevelop will store the list
programs for each file extension in the SharpDevelop settings.
</p>
        <p>
Here is a screenshot of the "Open With"/"Add program" dialog:<br /><img src="http://laputa.sharpdevelop.net/content/binary/SharpDevelop3OpenWith.png" border="0" /></p>
        <p>
A very useful feature of the "Open With" dialog is the "Set as Default"
button. This will mark an entry as the default program for opening files with the
same extension in SharpDevelop. Double-clicks in the project browser will run the
chosen default program. ("Set as Default" does not have any effect on double-clicks
in Windows Explorer)
</p>
        <p>
For example, SharpDevelop does not have a built-in image viewer/editor, so if you
don't want the text editor, which is the fall-back for unknown file types, to open
images, you can "Open With" a .png file in your project, enter your favorite
image editor and set it as default program for .png.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=88ce0c30-0625-4eb0-9846-68d31c646b6b" />
      </body>
      <title>SharpDevelop 3.0 Feature: Open With</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,88ce0c30-0625-4eb0-9846-68d31c646b6b.aspx</guid>
      <link>http://laputa.sharpdevelop.net/SharpDevelop30FeatureOpenWith.aspx</link>
      <pubDate>Fri, 10 Aug 2007 06:55:23 GMT</pubDate>
      <description>&lt;p&gt;
When you double-click a file in SharpDevelop 2.x, it will get opened inside SharpDevelop.
AddIns can add display bindings opening for opening file types&amp;nbsp;(e.g. ResourceEditor
for .resx files), but this has the effect of disabling the other display bindings
for that file type - In SharpDevelop 2.x, you cannot open a .resx file inside the
text editor (except if you disable the ResourceEditor AddIn).
&lt;/p&gt;
&lt;p&gt;
In SharpDevelop 3.0, you can now right-click a file in the project browser and select
"Open With...". A dialog will show the list of display bindings that can handle the
file type. There also is the entry "Use the default Windows application for this file"
which will open the file as if you double-clicked it in Windows Explorer.
&lt;/p&gt;
&lt;p&gt;
You can add new programs to the "Open With" list. SharpDevelop will store the list
programs for each file extension in the SharpDevelop settings.
&lt;/p&gt;
&lt;p&gt;
Here is a screenshot of the "Open With"/"Add program" dialog:&lt;br&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/SharpDevelop3OpenWith.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
A&amp;nbsp;very useful feature&amp;nbsp;of the "Open With" dialog&amp;nbsp;is the "Set as Default"
button. This will mark an entry as the default program for opening files with the
same extension in SharpDevelop. Double-clicks in the project browser will run the
chosen default program. ("Set as Default" does not have any effect on double-clicks
in Windows Explorer)
&lt;/p&gt;
&lt;p&gt;
For example, SharpDevelop does not have a built-in&amp;nbsp;image viewer/editor, so if&amp;nbsp;you
don't want the text editor, which is the fall-back for unknown file types, to open
images,&amp;nbsp;you can "Open With" a .png file&amp;nbsp;in your project, enter your favorite
image editor and set it as default program for .png.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=88ce0c30-0625-4eb0-9846-68d31c646b6b" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,88ce0c30-0625-4eb0-9846-68d31c646b6b.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=6d362fef-ef8e-4268-a589-c788c185fca5</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,6d362fef-ef8e-4268-a589-c788c185fca5.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,6d362fef-ef8e-4268-a589-c788c185fca5.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6d362fef-ef8e-4268-a589-c788c185fca5</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In revision 2583, I added the XamlBinding and WPF Designer to the setup of SharpDevelop
3.0.
</p>
        <p>
XamlBinding is a language binding that integrates .xaml files into SharpDevelop's
code-completion infrastructure.<br />
Here is an example of SharpDevelop showing a tool tip for a property in a .xaml file:<br /><img src="http://laputa.sharpdevelop.net/content/binary/WPFTest_XamlTooltips.jpg" border="0" /></p>
        <p>
A window in .xaml is a partial class: one part is generated from the .xaml file, the
other is the user code. If the xaml file specifies a name for an element, the compiler
will generate a field that can be used by the user code. XamlBinding adds code-completion
support for such fields:<br /><img src="http://laputa.sharpdevelop.net/content/binary/WPFTest_CodeCompletion.png" border="0" /></p>
        <p>
As you can see in the "Search Results" window, "Find references" now searches for
references in .xaml files. The "rename" refactoring will update both the XAML and
C# code.
</p>
        <p>
Finally, the WPF designer that I wrote earlier this year is now integrated in SharpDevelop.
Here is a screen shot:<br /><img src="http://laputa.sharpdevelop.net/content/binary/WPFTest_Designer.png" border="0" /></p>
        <p>
The designer replaces SharpDevelop's property grid with its own, WPF-based property
grid. This property grid will provide support for editing attached properties and data
binding in the future.
</p>
        <p>
Unlike the Windows Forms designer, which is included in the .NET Framework and merely
hosted by SharpDevelop (which isn't as easy as it sounds); the WPF designer
is written from scratch. Thankfully WPF makes this a lot easier than writing a Windows
Forms designer from scratch would be.
</p>
        <p>
The WPF designer is still missing lots of features; I would welcome any help.
</p>
        <p>
You can download preview builds of SharpDevelop 3.0 from our <a href="http://build.sharpdevelop.net/BuildArtefacts/">build
server</a>.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=6d362fef-ef8e-4268-a589-c788c185fca5" />
      </body>
      <title>XAML and WPF support in SharpDevelop 3.0</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,6d362fef-ef8e-4268-a589-c788c185fca5.aspx</guid>
      <link>http://laputa.sharpdevelop.net/XAMLAndWPFSupportInSharpDevelop30.aspx</link>
      <pubDate>Sun, 24 Jun 2007 15:23:00 GMT</pubDate>
      <description>&lt;p&gt;
In revision 2583, I added the XamlBinding and WPF Designer to the setup of SharpDevelop
3.0.
&lt;/p&gt;
&lt;p&gt;
XamlBinding is&amp;nbsp;a language binding that integrates .xaml files into SharpDevelop's
code-completion infrastructure.&lt;br&gt;
Here is an example of SharpDevelop showing a tool tip for a property in a .xaml file:&lt;br&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/WPFTest_XamlTooltips.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
A window in .xaml is a partial class: one part is generated from the .xaml file, the
other is the user code. If the xaml file specifies a name for an element, the compiler
will generate a field that can be used by the user code. XamlBinding adds code-completion
support for such fields:&lt;br&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/WPFTest_CodeCompletion.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
As you can see in the "Search Results" window, "Find references" now searches for
references in .xaml files. The "rename" refactoring will update both the XAML and
C# code.
&lt;/p&gt;
&lt;p&gt;
Finally, the WPF designer that I wrote earlier this year is now integrated in SharpDevelop.
Here is a screen shot:&lt;br&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/WPFTest_Designer.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
The designer replaces SharpDevelop's property grid with its own, WPF-based property
grid. This property grid will provide support for editing attached properties and&amp;nbsp;data
binding in the future.
&lt;/p&gt;
&lt;p&gt;
Unlike the Windows Forms designer, which is included in the .NET Framework and merely
hosted by SharpDevelop (which isn't as easy as it sounds);&amp;nbsp;the&amp;nbsp;WPF designer
is written from scratch. Thankfully WPF makes this a lot easier than writing a Windows
Forms designer from scratch would be.
&lt;/p&gt;
&lt;p&gt;
The WPF designer is still missing lots of&amp;nbsp;features; I would welcome any help.
&lt;/p&gt;
&lt;p&gt;
You can download preview builds of SharpDevelop 3.0 from our &lt;a href="http://build.sharpdevelop.net/BuildArtefacts/"&gt;build
server&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=6d362fef-ef8e-4268-a589-c788c185fca5" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,6d362fef-ef8e-4268-a589-c788c185fca5.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=7568067b-1dd2-4d81-afb7-06ffb2c7e44e</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,7568067b-1dd2-4d81-afb7-06ffb2c7e44e.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,7568067b-1dd2-4d81-afb7-06ffb2c7e44e.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7568067b-1dd2-4d81-afb7-06ffb2c7e44e</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday, I added a snippet parser to NRefactory. It tries to parse the input code
as a compilation unit (full file containing class definitions), class body (=list
of methods, properties, ...), statement list and expression. The result that produces
the least number of syntax errors gets chosen.
</p>
        <p>
This is useful for our <a href="http://codeconverter.sharpdevelop.net/">online code converter</a>,
because often one wants to convert a simple code snippet and not a full file.
</p>
        <p>
Here is the example code that converts the string "input" from C# to VB.NET:
</p>
        <font size="2">
          <font size="2">
            <p>
SnippetParser parser 
</p>
          </font>
          <font color="#006400" size="2">= </font>
          <b>
            <font color="#008b8b" size="2">new </font>
            <font color="#191970" size="2">SnippetParser
</font>
          </b>
        </font>
        <font color="#006400" size="2">(</font>
        <font size="2">SupportedLanguage</font>
        <font color="#006400" size="2">.</font>
        <font size="2">CSharp</font>
        <font color="#006400" size="2">);<br /></font>
        <font size="2">INode node </font>
        <font color="#006400" size="2">= </font>
        <font size="2">parser</font>
        <font color="#006400" size="2">.</font>
        <b>
          <font color="#191970" size="2">Parse
</font>
        </b>
        <font color="#006400" size="2">(</font>
        <font size="2">input</font>
        <font color="#006400" size="2">);<br /></font>
        <font color="#008000" size="2">// parser.Errors.ErrorOutput contains syntax
errors, if any<br /></font>
        <font color="#008000" size="2">// parser.Specials is the list of comments,
preprocessor directives etc.<br /></font>
        <font size="2">PreprocessingDirective</font>
        <font color="#006400" size="2">.</font>
        <b>
          <font color="#191970" size="2">CSharpToVB
</font>
        </b>
        <font color="#006400" size="2">(</font>
        <font size="2">parser</font>
        <font color="#006400" size="2">.</font>
        <font size="2">Specials</font>
        <font color="#006400" size="2">);<br /></font>
        <font color="#008000" size="2">// Convert C# constructs to VB.NET:<br /></font>
        <font size="2">node</font>
        <font color="#006400" size="2">.</font>
        <b>
          <font color="#191970" size="2">AcceptVisitor
</font>
        </b>
        <font color="#006400" size="2">(</font>
        <b>
          <font color="#008b8b" size="2">new </font>
          <font color="#191970" size="2">CSharpConstructsVisitor
</font>
        </b>
        <font color="#006400" size="2">(), </font>
        <b>
          <font size="2">null
</font>
        </b>
        <font color="#006400" size="2">);<br /></font>
        <font size="2">node</font>
        <font color="#006400" size="2">.</font>
        <b>
          <font color="#191970" size="2">AcceptVisitor
</font>
        </b>
        <font color="#006400" size="2">(</font>
        <b>
          <font color="#008b8b" size="2">new </font>
          <font color="#191970" size="2">ToVBNetConvertVisitor
</font>
        </b>
        <font color="#006400" size="2">(), </font>
        <b>
          <font size="2">null
</font>
        </b>
        <font color="#006400" size="2">);<br /></font>
        <font size="2">VBNetOutputVisitor output </font>
        <font color="#006400" size="2">= </font>
        <b>
          <font color="#008b8b" size="2">new </font>
          <font color="#191970" size="2">VBNetOutputVisitor
</font>
        </b>
        <font color="#006400" size="2">();<br /></font>
        <b>
          <font color="#008000" size="2">using 
</font>
        </b>
        <font color="#006400" size="2">(</font>
        <font color="#000000" size="2">SpecialNodesInserter</font>
        <font color="#006400" size="2">.</font>
        <b>
          <font color="#191970" size="2">Install
</font>
        </b>
        <font color="#006400" size="2">(</font>
        <font color="#000000" size="2">parser</font>
        <font color="#006400" size="2">.</font>
        <font color="#000000" size="2">Specials</font>
        <font color="#006400" size="2">, </font>
        <font color="#000000" size="2">output</font>
        <font color="#006400" size="2">))
{<br /></font>
        <font color="#000000" size="2">  node</font>
        <font color="#006400" size="2">.</font>
        <b>
          <font color="#191970" size="2">AcceptVisitor
</font>
        </b>
        <font color="#006400" size="2">(</font>
        <font color="#000000" size="2">output</font>
        <font color="#006400" size="2">, </font>
        <b>
          <font size="2">
            <font color="#000000">null</font>
          </font>
        </b>
        <font color="#006400" size="2">);<br />
}<br /></font>
        <font color="#008000" size="2">// output.Errors.ErrorOutput contains conversion
errors, if any<br />
// output.Text contains the converted code
</font>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=7568067b-1dd2-4d81-afb7-06ffb2c7e44e" />
      </body>
      <title>NRefactory - Snippet parser</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,7568067b-1dd2-4d81-afb7-06ffb2c7e44e.aspx</guid>
      <link>http://laputa.sharpdevelop.net/NRefactorySnippetParser.aspx</link>
      <pubDate>Mon, 14 May 2007 14:38:49 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday, I added a snippet parser to NRefactory. It tries to parse the input code
as&amp;nbsp;a compilation unit (full file containing class definitions), class body (=list
of methods, properties, ...), statement list and expression. The result that produces
the least number of syntax errors gets chosen.
&lt;/p&gt;
&lt;p&gt;
This is useful for our &lt;a href="http://codeconverter.sharpdevelop.net/"&gt;online code&amp;nbsp;converter&lt;/a&gt;,
because often one wants to convert a simple&amp;nbsp;code snippet and not a full file.
&lt;/p&gt;
&lt;p&gt;
Here is the example code that converts the string "input" from C# to VB.NET:
&lt;/p&gt;
&lt;font size=2&gt;&lt;font size=2&gt; 
&lt;p&gt;
SnippetParser parser 
&lt;/font&gt;&lt;font color=#006400 size=2&gt;= &lt;/font&gt;&lt;b&gt;&lt;font color=#008b8b size=2&gt;new &lt;/font&gt;&lt;font color=#191970 size=2&gt;SnippetParser
&lt;/b&gt;&lt;/font&gt;&lt;font color=#006400 size=2&gt;(&lt;/font&gt;&lt;font size=2&gt;SupportedLanguage&lt;/font&gt;&lt;font color=#006400 size=2&gt;.&lt;/font&gt;&lt;font size=2&gt;CSharp&lt;/font&gt;&lt;font color=#006400 size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;INode node &lt;/font&gt;&lt;font color=#006400 size=2&gt;= &lt;/font&gt;&lt;font size=2&gt;parser&lt;/font&gt;&lt;font color=#006400 size=2&gt;.&lt;/font&gt;&lt;b&gt;&lt;font color=#191970 size=2&gt;Parse
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;(&lt;/font&gt;&lt;font size=2&gt;input&lt;/font&gt;&lt;font color=#006400 size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;// parser.Errors.ErrorOutput contains syntax errors,
if any&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;// parser.Specials is the list of comments, preprocessor
directives etc.&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;PreprocessingDirective&lt;/font&gt;&lt;font color=#006400 size=2&gt;.&lt;/font&gt;&lt;b&gt;&lt;font color=#191970 size=2&gt;CSharpToVB
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;(&lt;/font&gt;&lt;font size=2&gt;parser&lt;/font&gt;&lt;font color=#006400 size=2&gt;.&lt;/font&gt;&lt;font size=2&gt;Specials&lt;/font&gt;&lt;font color=#006400 size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;// Convert C# constructs to VB.NET:&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;node&lt;/font&gt;&lt;font color=#006400 size=2&gt;.&lt;/font&gt;&lt;b&gt;&lt;font color=#191970 size=2&gt;AcceptVisitor
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;(&lt;/font&gt;&lt;b&gt;&lt;font color=#008b8b size=2&gt;new &lt;/font&gt;&lt;font color=#191970 size=2&gt;CSharpConstructsVisitor
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;(), &lt;/font&gt;&lt;b&gt;&lt;font size=2&gt;null
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;node&lt;/font&gt;&lt;font color=#006400 size=2&gt;.&lt;/font&gt;&lt;b&gt;&lt;font color=#191970 size=2&gt;AcceptVisitor
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;(&lt;/font&gt;&lt;b&gt;&lt;font color=#008b8b size=2&gt;new &lt;/font&gt;&lt;font color=#191970 size=2&gt;ToVBNetConvertVisitor
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;(), &lt;/font&gt;&lt;b&gt;&lt;font size=2&gt;null
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;);&lt;br&gt;
&lt;/font&gt;&lt;font size=2&gt;VBNetOutputVisitor output &lt;/font&gt;&lt;font color=#006400 size=2&gt;= &lt;/font&gt;&lt;b&gt;&lt;font color=#008b8b size=2&gt;new &lt;/font&gt;&lt;font color=#191970 size=2&gt;VBNetOutputVisitor
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;();&lt;br&gt;
&lt;/font&gt;&lt;b&gt;&lt;font color=#008000 size=2&gt;using 
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;(&lt;/font&gt;&lt;font color=#000000 size=2&gt;SpecialNodesInserter&lt;/font&gt;&lt;font color=#006400 size=2&gt;.&lt;/font&gt;&lt;b&gt;&lt;font color=#191970 size=2&gt;Install
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;(&lt;/font&gt;&lt;font color=#000000 size=2&gt;parser&lt;/font&gt;&lt;font color=#006400 size=2&gt;.&lt;/font&gt;&lt;font color=#000000 size=2&gt;Specials&lt;/font&gt;&lt;font color=#006400 size=2&gt;, &lt;/font&gt;&lt;font color=#000000 size=2&gt;output&lt;/font&gt;&lt;font color=#006400 size=2&gt;))
{&lt;br&gt;
&lt;/font&gt;&lt;font color=#000000 size=2&gt;&amp;nbsp; node&lt;/font&gt;&lt;font color=#006400 size=2&gt;.&lt;/font&gt;&lt;b&gt;&lt;font color=#191970 size=2&gt;AcceptVisitor
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;(&lt;/font&gt;&lt;font color=#000000 size=2&gt;output&lt;/font&gt;&lt;font color=#006400 size=2&gt;, &lt;/font&gt;&lt;b&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;null&lt;/font&gt;
&lt;/b&gt;&gt;&lt;font color=#006400 size=2&gt;);&lt;br&gt;
}&lt;br&gt;
&lt;/font&gt;&lt;font color=#008000 size=2&gt;// output.Errors.ErrorOutput contains conversion
errors, if any&lt;br&gt;
// output.Text contains the converted code&gt;
&lt;/font&gt;&gt;&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=7568067b-1dd2-4d81-afb7-06ffb2c7e44e" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,7568067b-1dd2-4d81-afb7-06ffb2c7e44e.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=571fa1ed-c8f3-4a71-8f90-2a043f30d16d</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,571fa1ed-c8f3-4a71-8f90-2a043f30d16d.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,571fa1ed-c8f3-4a71-8f90-2a043f30d16d.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=571fa1ed-c8f3-4a71-8f90-2a043f30d16d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
ohloh.net is a service that analyses the source code of open source projects and creates
statistics.
</p>
        <p>
Click on this button to see the statictics for the SharpDevelop repository: <a href="http://ohloh.net/projects/3544"><img src="http://ohloh.net/projects/3544;badge" /></a></p>
        <p>
All information on that page was automatically created by the service by looking at
the subversion repository. It is wrong on the following points:
</p>
        <ul>
          <li>
project age. Only the public repository of SharpDevelop 2.0 has been analysed. Earlier
work on SharpDevelop 2.0, and the whole work on SharpDevelop 1.x and earlier beta
versions is not included in the statistics. Old code taken over to the new repository was
attributed to Mike Krüger.</li>
          <li>
License. It has found license headers in the source code of log4net and other libraries/tools
included in the repository. That code is attributed to the person who added the library
to SharpDevelop. The real license for SharpDevelop code (LGPL) is not found at all
because we don't use the standard LGPL header.</li>
          <li>
The line count is slightly wrong for the same reason as above.</li>
          <li>
Only contributors having commit access are mentioned, patches are attributed to the
person who checked in the patch.</li>
        </ul>
        <p>
On the <a href="http://ohloh.net/projects/3544/contributors">contributors page</a>,
you can see activity graphs for the individual developers. And you can see the comment
ratio, which unfortunately is quite low (far below C# average according to the "Factoids"),
but other popular open source projects like Firefox, OpenOffice or MediaWiki
seem to have the same problem.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=571fa1ed-c8f3-4a71-8f90-2a043f30d16d" />
      </body>
      <title>Open Source Code Statistics</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,571fa1ed-c8f3-4a71-8f90-2a043f30d16d.aspx</guid>
      <link>http://laputa.sharpdevelop.net/OpenSourceCodeStatistics.aspx</link>
      <pubDate>Thu, 09 Nov 2006 21:38:22 GMT</pubDate>
      <description>&lt;p&gt;
ohloh.net is a service that analyses the source code of open source projects and creates
statistics.
&lt;/p&gt;
&lt;p&gt;
Click on this button to see the statictics for the SharpDevelop repository:&amp;nbsp;&lt;a href="http://ohloh.net/projects/3544"&gt;&lt;img src="http://ohloh.net/projects/3544;badge"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
All information on that page was automatically created by the service by looking at
the subversion repository. It is wrong on the following points:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
project age. Only the public repository of SharpDevelop 2.0 has been analysed. Earlier
work on SharpDevelop 2.0, and the whole work on SharpDevelop 1.x and earlier beta
versions is not included in the statistics. Old code taken over to the new repository&amp;nbsp;was
attributed to Mike Krüger.&lt;/li&gt;
&lt;li&gt;
License. It has found license headers in the source code of log4net and other libraries/tools
included in the repository. That code is attributed to the person who added the library
to SharpDevelop. The real license for SharpDevelop code (LGPL) is not found at all
because we don't use the standard LGPL header.&lt;/li&gt;
&lt;li&gt;
The line count&amp;nbsp;is slightly wrong for the same reason as above.&lt;/li&gt;
&lt;li&gt;
Only contributors having commit access are mentioned, patches are attributed to the
person who checked in the patch.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
On the &lt;a href="http://ohloh.net/projects/3544/contributors"&gt;contributors page&lt;/a&gt;,
you can see activity graphs for the individual developers. And you can see the comment
ratio, which unfortunately is quite low (far below C# average according to the "Factoids"),
but other popular open source projects like Firefox, OpenOffice&amp;nbsp;or MediaWiki
seem to have the same problem.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=571fa1ed-c8f3-4a71-8f90-2a043f30d16d" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,571fa1ed-c8f3-4a71-8f90-2a043f30d16d.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=31a89a22-5346-4e92-82fd-fbbb9b5c54ad</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,31a89a22-5346-4e92-82fd-fbbb9b5c54ad.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,31a89a22-5346-4e92-82fd-fbbb9b5c54ad.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=31a89a22-5346-4e92-82fd-fbbb9b5c54ad</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The SharpDevelop repository now contains a sample application that shows how to use
our libraries ICSharpCode.SharpDevelop.Dom and ICSharpCode.TextEditor to enable code-completion.
</p>
        <p>
You can find it in the folder SharpDevelop\samples\CSharpCodeCompletion. The expression
resolver is part of SharpDevelop.Dom, so the example supports complex generic types
etc. However it implements only code-completion when typing "." - no Ctrl+Space, keyword-completion
or method insight. The code was kept as simple as possible, so multiple overloads
are not filtered out, and there are no different icons for protected or internal members.
</p>
        <p>
          <img src="http://laputa.sharpdevelop.net/content/binary/completion.gif" border="0" />
        </p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=31a89a22-5346-4e92-82fd-fbbb9b5c54ad" />
      </body>
      <title>Completion demo</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,31a89a22-5346-4e92-82fd-fbbb9b5c54ad.aspx</guid>
      <link>http://laputa.sharpdevelop.net/CompletionDemo.aspx</link>
      <pubDate>Sat, 28 Oct 2006 13:14:13 GMT</pubDate>
      <description>&lt;p&gt;
The SharpDevelop repository now contains a sample application that shows how to use
our libraries ICSharpCode.SharpDevelop.Dom and ICSharpCode.TextEditor to enable code-completion.
&lt;/p&gt;
&lt;p&gt;
You can find it in the folder SharpDevelop\samples\CSharpCodeCompletion. The expression
resolver is part of SharpDevelop.Dom, so the example supports complex generic types
etc. However it implements only code-completion when typing "." - no Ctrl+Space, keyword-completion
or method insight. The code was kept as simple as possible, so multiple overloads
are not filtered out, and there are no different icons for protected or internal members.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/completion.gif" border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=31a89a22-5346-4e92-82fd-fbbb9b5c54ad" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,31a89a22-5346-4e92-82fd-fbbb9b5c54ad.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=ba134338-3ba8-469f-872c-76e61c1a8ade</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,ba134338-3ba8-469f-872c-76e61c1a8ade.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,ba134338-3ba8-469f-872c-76e61c1a8ade.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ba134338-3ba8-469f-872c-76e61c1a8ade</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
SharpDevelop 2.1 sports code-completion support for .NET 1.0, .NET 1.1 and the
Compact Framework 2.0. In the "Compiling" option page of the project, you can choose
the target framework:
</p>
        <p>
          <img src="http://laputa.sharpdevelop.net/content/binary/targetFx.PNG" border="0" />
        </p>
        <p>
Now code-completion is supported for all frameworks except the Compact Framework 1.0.
Note that choosing Compact Framework is a new option in SharpDevelop 2.1 - previously,
you had to modify your project file manually. If you did this, you had to change your
project file manually back into the default .NET 2.0 one and then choose "Compact
Framework 2.0" in the options - code-completion is available only this way. If you
want to create a new Compact Framework project, there now also is a Compact Framework
project template.
</p>
        <p>
Note that code-completion requires the target framework to be installed on your machine
- otherwise you'll get the default .NET 2.0 completion. For the Compact Framework,
the Compact Framework SDK must be installed.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=ba134338-3ba8-469f-872c-76e61c1a8ade" />
      </body>
      <title>Code Completion Support for .NET 1.0/1.1 and Compact Framework 2.0</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,ba134338-3ba8-469f-872c-76e61c1a8ade.aspx</guid>
      <link>http://laputa.sharpdevelop.net/CodeCompletionSupportForNET1011AndCompactFramework20.aspx</link>
      <pubDate>Tue, 05 Sep 2006 18:31:08 GMT</pubDate>
      <description>&lt;p&gt;
SharpDevelop 2.1&amp;nbsp;sports code-completion support for .NET 1.0, .NET 1.1 and the
Compact Framework 2.0. In the "Compiling" option page of the project, you can choose
the target framework:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/targetFx.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Now code-completion is supported for all frameworks except the Compact Framework 1.0.
Note that choosing Compact Framework is a new option in SharpDevelop 2.1 - previously,
you had to modify your project file manually. If you did this, you had to change your
project file manually back into the default .NET 2.0 one and then choose "Compact
Framework 2.0" in the options - code-completion is available only this way. If you
want to create a new Compact Framework project, there now also is a Compact Framework
project template.
&lt;/p&gt;
&lt;p&gt;
Note that code-completion requires the target framework to be installed on your machine
- otherwise you'll get the default .NET 2.0 completion. For the Compact Framework,
the Compact Framework SDK must be installed.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=ba134338-3ba8-469f-872c-76e61c1a8ade" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,ba134338-3ba8-469f-872c-76e61c1a8ade.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=108b14f8-56a4-4826-a715-a9cb28d51715</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,108b14f8-56a4-4826-a715-a9cb28d51715.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,108b14f8-56a4-4826-a715-a9cb28d51715.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=108b14f8-56a4-4826-a715-a9cb28d51715</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I know this isn't related to SharpDevelop; but I still wanted to let you know:
</p>
        <p>
The <a href="http://www.cs.helsinki.fi/group/boi2006/">Baltic Olympiad in Informatics</a> will
take place in Heinola, Finland, May 18th to 22nd. Look at the  <a href="http://www.cs.helsinki.fi/group/boi2006/teams.html">list
of participants</a> - I'm part of the German team!
</p>
        <p>
I'll have to learn algorithms for "usual" problems (geometrical algorithms, graph
algorithms; dynamic programming). If you know any interesting solutions (read:
non-standard, I already know the "classics" like Booyer Moore, MST, maximum flow) to
them (preferrably for C++/STL), please leave a comment!
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=108b14f8-56a4-4826-a715-a9cb28d51715" />
      </body>
      <title>Baltic Olympiad in Informatics</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,108b14f8-56a4-4826-a715-a9cb28d51715.aspx</guid>
      <link>http://laputa.sharpdevelop.net/BalticOlympiadInInformatics.aspx</link>
      <pubDate>Tue, 02 May 2006 17:51:19 GMT</pubDate>
      <description>&lt;p&gt;
I know this isn't related to SharpDevelop; but I still wanted to let you know:
&lt;/p&gt;
&lt;p&gt;
The&amp;nbsp;&lt;a href="http://www.cs.helsinki.fi/group/boi2006/"&gt;Baltic Olympiad in Informatics&lt;/a&gt;&amp;nbsp;will
take place in Heinola, Finland, May 18th to 22nd. Look at the&amp;nbsp;&amp;nbsp;&lt;a href="http://www.cs.helsinki.fi/group/boi2006/teams.html"&gt;list
of participants&lt;/a&gt; - I'm part of the German team!
&lt;/p&gt;
&lt;p&gt;
I'll have to learn algorithms for "usual" problems (geometrical algorithms, graph
algorithms; dynamic programming). If you know any interesting&amp;nbsp;solutions (read:
non-standard, I already know the "classics" like Booyer Moore, MST, maximum flow)&amp;nbsp;to
them (preferrably for&amp;nbsp;C++/STL), please leave a comment!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=108b14f8-56a4-4826-a715-a9cb28d51715" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,108b14f8-56a4-4826-a715-a9cb28d51715.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=6d9dc0d7-1077-41da-8f30-4a0df6c663df</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,6d9dc0d7-1077-41da-8f30-4a0df6c663df.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,6d9dc0d7-1077-41da-8f30-4a0df6c663df.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6d9dc0d7-1077-41da-8f30-4a0df6c663df</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I wrote a little program in Boo that can analyze the results of Subversion's
"blame" command. "blame" goes through the whole history of the subversion repository
and finds for each line of code the revision in which it was written.
</p>
        <p>
I analyzed the trunk of our current repository for SharpDevelop 2.1. The repository
was created on the 4th January of 2005 for SharpDevelop 2.0. Development on SharpDevelop
2.0 was already active before, but that old repository is not available anymore. That
means I could not find out who wrote code older than 2005 - most of the code marked
as "unknown old code" is probably from SharpDevelop 1.0, but all the changes done
by Mike Krüger to make SharpDevelop run on .NET 2.0 using MSBuild for the project
system are also "old code". Our parser library NRefactory was existant at that time,
too.
</p>
        <p>
My analyzer program gets the person who committed each line of code. Additionally,
it searches log messages for the term "patch by" and uses that name instead. And I
assigned some revisions manually, for example when I committed Peter Forstmeier's
SharpReport. Moreover, I excluded the docking library and log4net (the source code
for both is included in our repository).
</p>
        <p>
Now here is the image with the results:<br /><img src="http://laputa.sharpdevelop.net/content/binary/Blames1.PNG" border="0" /><br /></p>
        <p>
These results were pretty surprising for me. Considering that "unknown (old code)"
already ran on .NET 2.0 and already had the improved AddIn system and build system
in place (all those changes were done by Mike Krüger), pretty much all of SharpDevelop
has been rewritten. The area with the highest percentage of old code is the text editor
- 80 percent are unchanged. Most other parts are around 45% old code - the 33%
average is caused by the new AddIns.
</p>
        <p>
"unknown (merged code)" is code that has been committed to SharpDevelop 2.0 in the
last time and then was merged back into trunk (SharpDevelop 2.1). Most of it seems
to be David Srbecky's generated debugger interop code.
</p>
        <p>
Finally, sometimes I committed patches and my own modifications in the same commit;
everything was counted for the person providing the patch. For example, Christian
Hornung owes me 170 lines on the AddIn manager.
</p>
        <p>
So the whole thing isn't really accurate, but if you are interested in the source
code, you can download it here:<br /><a href="http://laputa.sharpdevelop.net/content/binary/BlameAnalyzer.zip">BlameAnalyzer.zip
(1,1 MB)</a>  Caution: contains hard-coded absolute paths to a temp directory
and the SD working copy
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=6d9dc0d7-1077-41da-8f30-4a0df6c663df" />
      </body>
      <title>Analyzing the code in SharpDevelop</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,6d9dc0d7-1077-41da-8f30-4a0df6c663df.aspx</guid>
      <link>http://laputa.sharpdevelop.net/AnalyzingTheCodeInSharpDevelop.aspx</link>
      <pubDate>Sat, 04 Mar 2006 21:21:13 GMT</pubDate>
      <description>&lt;p&gt;
Today I wrote a little program in Boo that can analyze the results of Subversion's
"blame" command. "blame" goes through the whole history of the subversion repository
and finds for each line of code&amp;nbsp;the revision in which it was written.
&lt;/p&gt;
&lt;p&gt;
I analyzed the trunk of our current repository for SharpDevelop 2.1. The repository
was created on the 4th January of 2005&amp;nbsp;for SharpDevelop 2.0. Development on SharpDevelop
2.0 was already active before, but that old repository is not available anymore. That
means I could not find out who wrote code older than 2005 - most of the code marked
as "unknown old code" is probably from SharpDevelop 1.0, but all the changes done
by Mike Krüger to make SharpDevelop run on .NET 2.0 using MSBuild for the project
system are also "old code". Our parser library NRefactory was existant at that time,
too.
&lt;/p&gt;
&lt;p&gt;
My analyzer program gets the person who committed each line of code. Additionally,
it searches log messages for the term "patch by" and uses that name instead. And I
assigned some revisions manually, for example when I committed Peter Forstmeier's
SharpReport. Moreover, I excluded the docking library and log4net (the source code
for both is included in our repository).
&lt;/p&gt;
&lt;p&gt;
Now here is the image with the results:&lt;br&gt;
&lt;img src="http://laputa.sharpdevelop.net/content/binary/Blames1.PNG" border=0&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
These results were pretty surprising for me.&amp;nbsp;Considering that "unknown (old code)"
already ran on .NET 2.0 and already had the improved AddIn system and build system
in place (all those changes were done by Mike Krüger), pretty much all of SharpDevelop
has been rewritten. The area with the highest percentage of old code is the text editor
- 80 percent are unchanged. Most other parts are around 45% old code&amp;nbsp;- the 33%
average is caused by&amp;nbsp;the new AddIns.
&lt;/p&gt;
&lt;p&gt;
"unknown (merged code)" is code that has been committed to SharpDevelop 2.0 in the
last time and then was merged back into trunk (SharpDevelop 2.1). Most of it seems
to be David Srbecky's generated debugger interop code.
&lt;/p&gt;
&lt;p&gt;
Finally, sometimes I committed patches and my own modifications in the same commit;
everything was counted for the person providing the patch. For example, Christian
Hornung owes me 170 lines on the AddIn manager.
&lt;/p&gt;
&lt;p&gt;
So the whole thing isn't really accurate, but if you are interested in the source
code, you can download it here:&lt;br&gt;
&lt;a href="http://laputa.sharpdevelop.net/content/binary/BlameAnalyzer.zip"&gt;BlameAnalyzer.zip
(1,1 MB)&lt;/a&gt;&amp;nbsp; Caution: contains hard-coded absolute paths to a temp directory
and the SD working copy
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=6d9dc0d7-1077-41da-8f30-4a0df6c663df" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,6d9dc0d7-1077-41da-8f30-4a0df6c663df.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=f62bb514-0ab5-4cb6-8ec9-bd953c1d4a25</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,f62bb514-0ab5-4cb6-8ec9-bd953c1d4a25.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,f62bb514-0ab5-4cb6-8ec9-bd953c1d4a25.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f62bb514-0ab5-4cb6-8ec9-bd953c1d4a25</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you're building SharpDevelop from our Subversion repository, you might already
have noticed it: The trunk of the repository now contains SharpDevelop 2.1 (Codename
"<a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.SharpDevelop2xRoadmap">Serralongue</a>").
</p>
        <p>
Changes in the 2.1 line so far: The Subversion AddIn was reactivated (note that it
does not work on x64), a Boo interpreter pad was added, the docking library was updated
and now supports VS2005-style "dock helpers", and you can now choose the target framework
version for VB projects.
</p>
        <p>
Our wiki gives <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.UsingTheRepository">more
information on how to get the code from the repository</a>; the <a href="http://build.sharpdevelop.net/">build
server</a> will build the 2.0 line only for the moment.
</p>
        <p>
If you are already using the repository but want to stay on the 2.0 line, you will
have to switch your working copy using this command:<br /><font face="Courier New">svn switch svn://sharpdevelop.net/sharpdevelop/branches/2.0/SharpDevelop</font></p>
        <p>
Bug fixes are committed to the 2.0 branch only and every week they will be merged
back to 2.1. New features will be added to 2.1 only.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=f62bb514-0ab5-4cb6-8ec9-bd953c1d4a25" />
      </body>
      <title>SharpDevelop 2.1 - Serralongue</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,f62bb514-0ab5-4cb6-8ec9-bd953c1d4a25.aspx</guid>
      <link>http://laputa.sharpdevelop.net/SharpDevelop21Serralongue.aspx</link>
      <pubDate>Wed, 15 Feb 2006 15:15:47 GMT</pubDate>
      <description>&lt;p&gt;
If you're building SharpDevelop from our Subversion repository, you might already
have noticed it: The trunk of the repository now contains SharpDevelop 2.1 (Codename
"&lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.SharpDevelop2xRoadmap"&gt;Serralongue&lt;/a&gt;").
&lt;/p&gt;
&lt;p&gt;
Changes in the 2.1 line so far: The Subversion AddIn was reactivated (note that it
does not work on x64), a Boo interpreter pad was added, the docking library was updated
and now supports VS2005-style "dock helpers", and you can now choose the target framework
version for VB projects.
&lt;/p&gt;
&lt;p&gt;
Our wiki gives &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.UsingTheRepository"&gt;more
information on how to get the code from the repository&lt;/a&gt;; the &lt;a href="http://build.sharpdevelop.net/"&gt;build
server&lt;/a&gt; will build the 2.0 line only for the moment.
&lt;/p&gt;
&lt;p&gt;
If you are already using the repository but want to stay on the 2.0 line, you will
have to switch your working copy using this command:&lt;br&gt;
&lt;font face="Courier New"&gt;svn switch svn://sharpdevelop.net/sharpdevelop/branches/2.0/SharpDevelop&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Bug fixes are committed to the 2.0 branch only and every week they will be merged
back to 2.1. New features will be added to 2.1 only.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=f62bb514-0ab5-4cb6-8ec9-bd953c1d4a25" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,f62bb514-0ab5-4cb6-8ec9-bd953c1d4a25.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=2c55322b-2cfc-418d-a16a-62406b0d63db</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,2c55322b-2cfc-418d-a16a-62406b0d63db.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,2c55322b-2cfc-418d-a16a-62406b0d63db.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=2c55322b-2cfc-418d-a16a-62406b0d63db</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've published a CodeProject article about ICSharpCode.Core. It demonstrates how you
can use the SharpDevelop Core to create your own applications. Link: <a href="http://www.codeproject.com/csharp/ICSharpCodeCore.asp">http://www.codeproject.com/csharp/ICSharpCodeCore.asp</a></p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=2c55322b-2cfc-418d-a16a-62406b0d63db" />
      </body>
      <title>Building Applications with the SharpDevelop Core</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,2c55322b-2cfc-418d-a16a-62406b0d63db.aspx</guid>
      <link>http://laputa.sharpdevelop.net/BuildingApplicationsWithTheSharpDevelopCore.aspx</link>
      <pubDate>Wed, 04 Jan 2006 13:17:22 GMT</pubDate>
      <description>&lt;p&gt;
I've published a CodeProject article about ICSharpCode.Core. It demonstrates how you
can use the SharpDevelop Core to create your own applications.&amp;nbsp;Link: &lt;a href="http://www.codeproject.com/csharp/ICSharpCodeCore.asp"&gt;http://www.codeproject.com/csharp/ICSharpCodeCore.asp&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=2c55322b-2cfc-418d-a16a-62406b0d63db" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,2c55322b-2cfc-418d-a16a-62406b0d63db.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=e164c858-db8f-4228-9036-abe8459d6bce</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,e164c858-db8f-4228-9036-abe8459d6bce.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,e164c858-db8f-4228-9036-abe8459d6bce.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e164c858-db8f-4228-9036-abe8459d6bce</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This video shows what you need to make your AddIns ready for the AddIn Manager and
package them as ".sdaddin"-files.
</p>
        <p>
          <a href="http://laputa.sharpdevelop.net/content/binary/AddInManager.wmv">AddInManager.wmv
(2,37 MB; 05:12 m)</a>
        </p>
        <p>
It uses the Image Viewer addin from the <a href="http://laputa.sharpdevelop.net/WritingASharpDevelopAddInImageViewer.aspx">third
AddIn-writing tutorial</a>.
</p>
        <p>
Additional downloads:<br /><a href="http://laputa.sharpdevelop.net/content/binary/MyTestAddIn.AddInManager.zip">MyTestAddIn.AddInManager.zip
(4,53 KB)</a> - source code of the test AddIn<br /><a href="http://laputa.sharpdevelop.net/content/binary/ImageViewer.sdaddin.zip">ImageViewer.sdaddin.zip
(2,92 KB)</a> - binary package of the test addin (remove the ".zip" extension,
it's just there because this blog doesn't accept ".sdaddin" files)
</p>
        <p>
There is a bug SharpDevelop 2 Beta 1 which causes the AddInManager to crash when opening
the .sdaddin-file created in this video. It has been fixed in build 940, so make sure
you get a recent build from the <a href="http://build.sharpdevelop.net/BuildArtefacts/">build
server</a>.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=e164c858-db8f-4228-9036-abe8459d6bce" />
      </body>
      <title>AddIn Manager Video Tutorial</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,e164c858-db8f-4228-9036-abe8459d6bce.aspx</guid>
      <link>http://laputa.sharpdevelop.net/AddInManagerVideoTutorial.aspx</link>
      <pubDate>Mon, 26 Dec 2005 20:18:32 GMT</pubDate>
      <description>&lt;p&gt;
This video shows what you need to make your AddIns ready for the AddIn Manager and
package them as ".sdaddin"-files.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://laputa.sharpdevelop.net/content/binary/AddInManager.wmv"&gt;AddInManager.wmv
(2,37 MB; 05:12 m)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
It uses the Image Viewer addin from the &lt;a href="http://laputa.sharpdevelop.net/WritingASharpDevelopAddInImageViewer.aspx"&gt;third
AddIn-writing tutorial&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Additional downloads:&lt;br&gt;
&lt;a href="http://laputa.sharpdevelop.net/content/binary/MyTestAddIn.AddInManager.zip"&gt;MyTestAddIn.AddInManager.zip
(4,53 KB)&lt;/a&gt;&amp;nbsp;- source code of the test AddIn&lt;br&gt;
&lt;a href="http://laputa.sharpdevelop.net/content/binary/ImageViewer.sdaddin.zip"&gt;ImageViewer.sdaddin.zip
(2,92 KB)&lt;/a&gt;&amp;nbsp;- binary package of the test addin (remove the ".zip" extension,
it's just there because this blog doesn't accept ".sdaddin" files)
&lt;/p&gt;
&lt;p&gt;
There is a bug SharpDevelop 2 Beta 1 which causes the AddInManager to crash when opening
the .sdaddin-file created in this video. It has been fixed in build 940, so make sure
you get a recent build from the &lt;a href="http://build.sharpdevelop.net/BuildArtefacts/"&gt;build
server&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=e164c858-db8f-4228-9036-abe8459d6bce" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,e164c858-db8f-4228-9036-abe8459d6bce.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=b346a7db-e731-493c-89e3-71bdefb35aab</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,b346a7db-e731-493c-89e3-71bdefb35aab.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,b346a7db-e731-493c-89e3-71bdefb35aab.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=b346a7db-e731-493c-89e3-71bdefb35aab</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This tutorial will show you how you can use NRefactory to parse C# code, modify the
abstract syntax tree and generate C# code.
</p>
        <p>
          <a href="/content/binary/NRefactory.wmv">NRefactory.wmv (5.8MB, 13:17 m)</a>
        </p>
        <p>
You can download the example code here: <a href="/content/binary/NRefactoryExample.zip">NRefactoryExample.zip
(7,15 KB)</a></p>
        <p>
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.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=b346a7db-e731-493c-89e3-71bdefb35aab" />
      </body>
      <title>NRefactory tutorial video</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,b346a7db-e731-493c-89e3-71bdefb35aab.aspx</guid>
      <link>http://laputa.sharpdevelop.net/NRefactoryTutorialVideo.aspx</link>
      <pubDate>Thu, 10 Nov 2005 16:47:14 GMT</pubDate>
      <description>&lt;p&gt;
This tutorial will show you how you can use NRefactory to parse C# code, modify the
abstract syntax tree and&amp;nbsp;generate C# code.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="/content/binary/NRefactory.wmv"&gt;NRefactory.wmv (5.8MB, 13:17 m)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You can download the example code here: &lt;a href="/content/binary/NRefactoryExample.zip"&gt;NRefactoryExample.zip
(7,15 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
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.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=b346a7db-e731-493c-89e3-71bdefb35aab" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,b346a7db-e731-493c-89e3-71bdefb35aab.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=092a1b37-c385-47bc-98e4-70e9ee5c8b74</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,092a1b37-c385-47bc-98e4-70e9ee5c8b74.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,092a1b37-c385-47bc-98e4-70e9ee5c8b74.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=092a1b37-c385-47bc-98e4-70e9ee5c8b74</wfw:commentRss>
      <slash:comments>7</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
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.
</p>
        <p>
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.
</p>
        <p>
Note: there are now <a href="http://build.sharpdevelop.net/BuildArtefacts/">newer
setup versions </a>available on the <a href="http://build.sharpdevelop.net/">build
server</a>.<br />
Old Download: <a href="http://laputa.sharpdevelop.net/content/binary/Corsavy%20654%20Setup.exe">Corsavy
654 Setup.exe (2,86 MB)</a></p>
        <p>
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 "...".
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=092a1b37-c385-47bc-98e4-70e9ee5c8b74" />
      </body>
      <title>Setup for SharpDevelop 2 on .NET 2.0</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,092a1b37-c385-47bc-98e4-70e9ee5c8b74.aspx</guid>
      <link>http://laputa.sharpdevelop.net/SetupForSharpDevelop2OnNET20.aspx</link>
      <pubDate>Sat, 29 Oct 2005 13:40:28 GMT</pubDate>
      <description>&lt;p&gt;
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.
&lt;/p&gt;
&lt;p&gt;
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&amp;nbsp;SubversionAddin is not included
in this setup.
&lt;/p&gt;
&lt;p&gt;
Note: there are now &lt;a href="http://build.sharpdevelop.net/BuildArtefacts/"&gt;newer
setup versions &lt;/a&gt;available on the &lt;a href="http://build.sharpdevelop.net/"&gt;build
server&lt;/a&gt;.&lt;br&gt;
Old Download:&amp;nbsp;&lt;a href="http://laputa.sharpdevelop.net/content/binary/Corsavy%20654%20Setup.exe"&gt;Corsavy
654 Setup.exe (2,86 MB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Changes to revision 593 (the last setup version) are: Many bugfixes, including critical
bugs with the new&amp;nbsp;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 "...".
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=092a1b37-c385-47bc-98e4-70e9ee5c8b74" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,092a1b37-c385-47bc-98e4-70e9ee5c8b74.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=95b2fb89-681f-49ad-b28e-06c63d2056d8</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,95b2fb89-681f-49ad-b28e-06c63d2056d8.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,95b2fb89-681f-49ad-b28e-06c63d2056d8.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=95b2fb89-681f-49ad-b28e-06c63d2056d8</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
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.
</p>
        <p>
.NET 2.0 download:<!--StartFragment --><font class="messagecontent"><a href="http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&amp;displaylang=en" rel="nofollow">The
Framework</a>[<a href="http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&amp;displaylang=en" target="_blank" rel="nofollow">^</a>]
and <a href="http://www.microsoft.com/downloads/details.aspx?familyid=FE6F2099-B7B4-4F47-A244-C96D69C35DEC&amp;displaylang=en" rel="nofollow">the
SDK</a>[<a href="http://www.microsoft.com/downloads/details.aspx?familyid=FE6F2099-B7B4-4F47-A244-C96D69C35DEC&amp;displaylang=en" target="_blank" rel="nofollow">^</a>]</font></p>
        <p>
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)
</p>
        <p>
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.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=95b2fb89-681f-49ad-b28e-06c63d2056d8" />
      </body>
      <title>SharpDevelop on .NET 2.0.50727.42</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,95b2fb89-681f-49ad-b28e-06c63d2056d8.aspx</guid>
      <link>http://laputa.sharpdevelop.net/SharpDevelopOnNET205072742.aspx</link>
      <pubDate>Fri, 28 Oct 2005 11:34:06 GMT</pubDate>
      <description>&lt;p&gt;
The final version of .NET 2.0 has been released and SharpDevelop in the&amp;nbsp;repository&amp;nbsp;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.
&lt;/p&gt;
&lt;p&gt;
.NET 2.0 download:&lt;!--StartFragment --&gt;
&lt;font class=messagecontent&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&amp;amp;displaylang=en" rel=nofollow&gt;The
Framework&lt;/a&gt;[&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&amp;amp;displaylang=en" target=_blank rel=nofollow&gt;^&lt;/a&gt;]
and &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=FE6F2099-B7B4-4F47-A244-C96D69C35DEC&amp;amp;displaylang=en" rel=nofollow&gt;the
SDK&lt;/a&gt;[&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=FE6F2099-B7B4-4F47-A244-C96D69C35DEC&amp;amp;displaylang=en" target=_blank rel=nofollow&gt;^&lt;/a&gt;]&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
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&amp;nbsp;behaviour)
&lt;/p&gt;
&lt;p&gt;
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.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=95b2fb89-681f-49ad-b28e-06c63d2056d8" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,95b2fb89-681f-49ad-b28e-06c63d2056d8.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=fdb55093-8b42-4790-a731-bdfcd635fc75</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,fdb55093-8b42-4790-a731-bdfcd635fc75.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,fdb55093-8b42-4790-a731-bdfcd635fc75.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=fdb55093-8b42-4790-a731-bdfcd635fc75</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The third video explains how to create a primary display binding that can view images:
</p>
        <p>
          <a href="/content/binary/Tutorial3.wmv">Tutorial3.wmv (3,78 MB, 07:38m)</a>
        </p>
        <p>
Again, this tutorial starts with opening the AddIn created in <a href="http://laputa.sharpdevelop.net/ct.ashx?id=8874bbf5-ce5b-487e-88f1-a02a14d2725f&amp;url=http%3a%2f%2flaputa.sharpdevelop.net%2fWritingASharpDevelopAddInTutorialVideo.aspx">tutorial
1</a>, so make sure you watch that first.
</p>
        <p>
          <a href="/content/binary/MyTestAddIn.3.zip">MyTestAddIn.3.zip (4,06 KB)</a> 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.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=fdb55093-8b42-4790-a731-bdfcd635fc75" />
      </body>
      <title>Writing a SharpDevelop AddIn - Image Viewer</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,fdb55093-8b42-4790-a731-bdfcd635fc75.aspx</guid>
      <link>http://laputa.sharpdevelop.net/WritingASharpDevelopAddInImageViewer.aspx</link>
      <pubDate>Fri, 21 Oct 2005 17:58:18 GMT</pubDate>
      <description>&lt;p&gt;
The third video explains how to create a primary display binding that can view images:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="/content/binary/Tutorial3.wmv"&gt;Tutorial3.wmv (3,78 MB, 07:38m)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Again, this tutorial starts with opening the AddIn created in &lt;a href="http://laputa.sharpdevelop.net/ct.ashx?id=8874bbf5-ce5b-487e-88f1-a02a14d2725f&amp;amp;url=http%3a%2f%2flaputa.sharpdevelop.net%2fWritingASharpDevelopAddInTutorialVideo.aspx"&gt;tutorial
1&lt;/a&gt;, so make sure you watch that first.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="/content/binary/MyTestAddIn.3.zip"&gt;MyTestAddIn.3.zip (4,06 KB)&lt;/a&gt;&amp;nbsp;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.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=fdb55093-8b42-4790-a731-bdfcd635fc75" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,fdb55093-8b42-4790-a731-bdfcd635fc75.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=8874bbf5-ce5b-487e-88f1-a02a14d2725f</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,8874bbf5-ce5b-487e-88f1-a02a14d2725f.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,8874bbf5-ce5b-487e-88f1-a02a14d2725f.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=8874bbf5-ce5b-487e-88f1-a02a14d2725f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This video explains how you can write a SharpDevelop addin that provides a tab page
"Preview" that displays .html files.
</p>
        <p>
          <a href="/content/binary/Tutorial2.wmv">Tutorial2.wmv (3.25 MB, 07:25 m)</a>
        </p>
        <p>
The video starts with opening the AddIn created in <a href="http://laputa.sharpdevelop.net/WritingASharpDevelopAddInTutorialVideo.aspx">tutorial
1</a>, so make sure you watch that first.
</p>
        <p>
I hope these tutorials will help some developers getting started with AddIn development
so SharpDevelop 2 will have a number of AddIns available.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=8874bbf5-ce5b-487e-88f1-a02a14d2725f" />
      </body>
      <title>Writing a SharpDevelop AddIn - Html Preview</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,8874bbf5-ce5b-487e-88f1-a02a14d2725f.aspx</guid>
      <link>http://laputa.sharpdevelop.net/WritingASharpDevelopAddInHtmlPreview.aspx</link>
      <pubDate>Wed, 19 Oct 2005 16:21:53 GMT</pubDate>
      <description>&lt;p&gt;
This video explains how you can write a SharpDevelop addin that provides a tab page
"Preview" that displays .html files.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="/content/binary/Tutorial2.wmv"&gt;Tutorial2.wmv (3.25 MB, 07:25 m)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The video starts with opening the AddIn created in &lt;a href="http://laputa.sharpdevelop.net/WritingASharpDevelopAddInTutorialVideo.aspx"&gt;tutorial
1&lt;/a&gt;, so make sure you watch that first.
&lt;/p&gt;
&lt;p&gt;
I hope these tutorials will help some developers getting started with AddIn development
so SharpDevelop 2 will have a number of AddIns available.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=8874bbf5-ce5b-487e-88f1-a02a14d2725f" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,8874bbf5-ce5b-487e-88f1-a02a14d2725f.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=f9f357ae-f8e9-476c-9ed9-424decb3a21b</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,f9f357ae-f8e9-476c-9ed9-424decb3a21b.aspx</pingback:target>
      <dc:creator>Daniel Grunwald</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,f9f357ae-f8e9-476c-9ed9-424decb3a21b.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f9f357ae-f8e9-476c-9ed9-424decb3a21b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This video explains how to create an AddIn for SharpDevelop 2.0:
</p>
        <p>
          <a href="/content/binary/Tutorial1.wmv">Tutorial1.wmv (5.2 MB, 05:19 m)</a>
        </p>
        <p>
It is the first part of a series that will demonstrate some example AddIns and how
to create them. The next parts will be based on the AddIn we set up in here, so make
sure you follow the steps!
</p>
        <p>
A <a href="http://wiki.sharpdevelop.net/ScreenRecordingsForDevelopers.ashx">page in
the wiki</a> contains the full list of the tutorials published so far.
</p>
        <p>
EDIT: Note that the repository URL has changed since the video has been recorded.
The new address is svn://sharpdevelop.net/sharpdevelop/trunk
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=f9f357ae-f8e9-476c-9ed9-424decb3a21b" />
      </body>
      <title>Writing a SharpDevelop AddIn - Tutorial Video</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,f9f357ae-f8e9-476c-9ed9-424decb3a21b.aspx</guid>
      <link>http://laputa.sharpdevelop.net/WritingASharpDevelopAddInTutorialVideo.aspx</link>
      <pubDate>Wed, 19 Oct 2005 10:38:51 GMT</pubDate>
      <description>&lt;p&gt;
This video explains how to create an AddIn for SharpDevelop 2.0:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="/content/binary/Tutorial1.wmv"&gt;Tutorial1.wmv (5.2 MB, 05:19 m)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
It is the first part of a series that will demonstrate some example AddIns and how
to create them. The next parts will be based on the AddIn we set up in here, so make
sure you&amp;nbsp;follow the steps!
&lt;/p&gt;
&lt;p&gt;
A &lt;a href="http://wiki.sharpdevelop.net/ScreenRecordingsForDevelopers.ashx"&gt;page in
the wiki&lt;/a&gt; contains the full list of the tutorials published so far.
&lt;/p&gt;
&lt;p&gt;
EDIT: Note that the repository URL has changed since the video&amp;nbsp;has been&amp;nbsp;recorded.
The new address is svn://sharpdevelop.net/sharpdevelop/trunk
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=f9f357ae-f8e9-476c-9ed9-424decb3a21b" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,f9f357ae-f8e9-476c-9ed9-424decb3a21b.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=e0d815a9-fdac-4d21-a43f-4ad51e85428e</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,e0d815a9-fdac-4d21-a43f-4ad51e85428e.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,e0d815a9-fdac-4d21-a43f-4ad51e85428e.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e0d815a9-fdac-4d21-a43f-4ad51e85428e</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
Revision 549 adds support to use older versions of the C# compiler with SharpDevelop
2.0.
</p>
        <p>
In the "Compiling" options page of the project, you can set the version you want to
use. If you use anything else than "Default (.NET 2.0)", SharpDevelop will modify
the project file to use a custom MsBuild target file from the SharpDevelop directory
that allows you to specify a different compiler version and reference older versions
of mscorlib and the System libraries.
</p>
        <p>
If you want to use MsBuild.exe in the command line to compile your projects, you will
now need to specify the directory where SharpDevelop is installed: 
</p>
        <p>
          <font face="Courier New">"MsBuild /property:SharpDevelopBinPath=C:\Programs\SharpDevelop\2.0\bin"</font>
        </p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=e0d815a9-fdac-4d21-a43f-4ad51e85428e" />
      </body>
      <title>SharpDevelop 2 and .NET 1.x</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,e0d815a9-fdac-4d21-a43f-4ad51e85428e.aspx</guid>
      <link>http://laputa.sharpdevelop.net/SharpDevelop2AndNET1x.aspx</link>
      <pubDate>Sat, 08 Oct 2005 16:32:52 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Revision 549 adds support to use older versions of the C# compiler with SharpDevelop
2.0.
&lt;/p&gt;
&lt;p&gt;
In the "Compiling" options page of the project, you can set the version you want to
use. If you use anything else than "Default (.NET 2.0)", SharpDevelop will modify
the project file to use a custom MsBuild target file from the SharpDevelop directory
that allows you to specify a different compiler version and reference older versions
of mscorlib and the System libraries.
&lt;/p&gt;
&lt;p&gt;
If you want to use MsBuild.exe in the command line to compile your projects, you will
now need to specify the directory where SharpDevelop is installed: 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;"MsBuild /property:SharpDevelopBinPath=C:\Programs\SharpDevelop\2.0\bin"&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=e0d815a9-fdac-4d21-a43f-4ad51e85428e" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,e0d815a9-fdac-4d21-a43f-4ad51e85428e.aspx</comments>
      <category>Daniel</category>
    </item>
    <item>
      <trackback:ping>http://laputa.sharpdevelop.net/Trackback.aspx?guid=6760e9f3-7eb8-4f37-a00f-a37d0330f40c</trackback:ping>
      <pingback:server>http://laputa.sharpdevelop.net/pingback.aspx</pingback:server>
      <pingback:target>http://laputa.sharpdevelop.net/PermaLink,guid,6760e9f3-7eb8-4f37-a00f-a37d0330f40c.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://laputa.sharpdevelop.net/CommentView,guid,6760e9f3-7eb8-4f37-a00f-a37d0330f40c.aspx</wfw:comment>
      <wfw:commentRss>http://laputa.sharpdevelop.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6760e9f3-7eb8-4f37-a00f-a37d0330f40c</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have now added a backend binding for the language <a href="http://boo.codehaus.org/">Boo</a> to
SharpDevelop 2.0.
</p>
        <p>
Boo is a new object-oriented statically typed programming language for the .NET Framework
with a Python-inspired syntax and a special focus on language and compiler extensibility.
</p>
        <p>
The most important feature - compiling - is not yet supported because currently there
is no MsBuild task for Boo. Code completion is already implemented using the parser
of the Boo compiler with a custom resolver using SharpDevelop's type system. Because
BooBinding is implementing SharpDevelop's parser and resolver interfaces, all the
new features like tooltips, find references etc. work for Boo, too.
</p>
        <p>
Code completion for Boo's type inference (a feature that <a href="http://msdn.microsoft.com/vcsharp/future/">C#
3.0</a> and VB 9 will get) is already implemented, at least for local variables. You
can expect that code completion support will be extended during the next weeks and
support for compiling Boo applications inside the IDE will be added.
</p>
        <p>
A Boo forms designer might be coming, too.
</p>
        <img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=6760e9f3-7eb8-4f37-a00f-a37d0330f40c" />
      </body>
      <title>BooBinding</title>
      <guid isPermaLink="false">http://laputa.sharpdevelop.net/PermaLink,guid,6760e9f3-7eb8-4f37-a00f-a37d0330f40c.aspx</guid>
      <link>http://laputa.sharpdevelop.net/BooBinding.aspx</link>
      <pubDate>Fri, 07 Oct 2005 21:59:45 GMT</pubDate>
      <description>&lt;p&gt;
I have now added a backend binding for the language &lt;a href="http://boo.codehaus.org/"&gt;Boo&lt;/a&gt; to
SharpDevelop 2.0.
&lt;/p&gt;
&lt;p&gt;
Boo is a new object-oriented statically typed programming language for the .NET Framework
with a Python-inspired syntax and a special focus on language and compiler extensibility.
&lt;/p&gt;
&lt;p&gt;
The most important feature - compiling - is not yet supported because currently there
is no MsBuild task for Boo. Code completion is already implemented using the parser
of the Boo compiler with a custom resolver using SharpDevelop's type system. Because
BooBinding is implementing SharpDevelop's parser and resolver interfaces, all the
new features like tooltips, find references etc. work for Boo, too.
&lt;/p&gt;
&lt;p&gt;
Code completion for Boo's type inference (a feature that &lt;a href="http://msdn.microsoft.com/vcsharp/future/"&gt;C#
3.0&lt;/a&gt; and VB 9 will get) is already implemented, at least for local variables. You
can expect that code completion support will be extended during the next weeks and
support for compiling Boo applications inside the IDE will be added.
&lt;/p&gt;
&lt;p&gt;
A Boo forms designer might be coming, too.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://laputa.sharpdevelop.net/aggbug.ashx?id=6760e9f3-7eb8-4f37-a00f-a37d0330f40c" /&gt;</description>
      <comments>http://laputa.sharpdevelop.net/CommentView,guid,6760e9f3-7eb8-4f37-a00f-a37d0330f40c.aspx</comments>
      <category>Daniel</category>
    </item>
  </channel>
</rss>