<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>C# 3.0 and CodeDOM</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx</link><description>The CodeDOM is a very handy .NET API which allows you to programatically compile code using the .NET compilers and programatically construct code without just pasting together strings. With the new version of the language, we've heard a numer of questions</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: C# 3.0 and CodeDOM</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#4294928</link><pubDate>Wed, 08 Aug 2007 19:26:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4294928</guid><dc:creator>MatthieuMEZIL</dc:creator><description>&lt;p&gt;I start a POC of a compiler for C# 3.0 extended (with CodeDom).&lt;/p&gt;
&lt;p&gt;I want to do a lot of things (&lt;a rel="nofollow" target="_new" href="http://blog.developpez.com/index.php?blog=121&amp;amp;title=mmcs31&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1"&gt;http://blog.developpez.com/index.php?blog=121&amp;amp;title=mmcs31&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1&lt;/a&gt;) but I only start. You can find my project in codeplex (&lt;a rel="nofollow" target="_new" href="http://www.codeplex.com/mmcs31"&gt;http://www.codeplex.com/mmcs31&lt;/a&gt;).&lt;/p&gt;</description></item><item><title>Compiling C# 3.0 during runtime</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#4324538</link><pubDate>Fri, 10 Aug 2007 23:08:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4324538</guid><dc:creator>Ken Brubaker</dc:creator><description>&lt;p&gt;This post explains how to get the CSharpCodeProvider compile C# 3.0 code. Here's the magic line:...&lt;/p&gt;
</description></item><item><title>Community Convergence XXIX</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#4364121</link><pubDate>Mon, 13 Aug 2007 09:39:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4364121</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;There are several good new blogs from members of the Microsoft C# team. Nevertheless, the most important&lt;/p&gt;
</description></item><item><title>CodeDOM na vers</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#4745495</link><pubDate>Tue, 04 Sep 2007 21:02:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4745495</guid><dc:creator>Nuno Filipe Godinho</dc:creator><description /></item><item><title>re: C# 3.0 and CodeDOM</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#6672873</link><pubDate>Thu, 06 Dec 2007 04:06:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6672873</guid><dc:creator>marcod</dc:creator><description>&lt;p&gt;Thank you very much, using the alternative of specifying CompilerVersion with value v3.5 on the referred class constructor worked very well.&lt;/p&gt;
&lt;p&gt;Unfortunately, the other alternative is needed for another application and specifying the same data on its application config file does not work the same.&lt;/p&gt;
&lt;p&gt;In order to paste the exact config section, I copied it from a just created Visual Studio 2008 ASP.NET Web site’s web.config file:&lt;/p&gt;
&lt;p&gt;&amp;lt;system.codedom&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;compilers&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;compiler language=&amp;quot;c#;cs;csharp&amp;quot; extension=&amp;quot;.cs&amp;quot; warningLevel=&amp;quot;4&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type=&amp;quot;Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providerOption name=&amp;quot;CompilerVersion&amp;quot; value=&amp;quot;v3.5&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providerOption name=&amp;quot;WarnAsError&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/compiler&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;compiler language=&amp;quot;vb;vbs;visualbasic;vbscript&amp;quot; extension=&amp;quot;.vb&amp;quot; warningLevel=&amp;quot;4&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type=&amp;quot;Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providerOption name=&amp;quot;CompilerVersion&amp;quot; value=&amp;quot;v3.5&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providerOption name=&amp;quot;OptionInfer&amp;quot; value=&amp;quot;true&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providerOption name=&amp;quot;WarnAsError&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/compiler&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/compilers&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/system.codedom&amp;gt;&lt;/p&gt;
&lt;p&gt;I tried also with the sample on Compiler and Language Provider Settings Schema &amp;lt;providerOption&amp;gt; Element (no difference):&lt;/p&gt;
&lt;p&gt;&amp;lt;system.codedom&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;compilers&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;!-- zero or more compiler elements --&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;compiler&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;language=&amp;quot;c#;cs;csharp&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;extension=&amp;quot;.cs&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;type=&amp;quot;Microsoft.CSharp.CSharpCodeProvider, System, &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Version=2.0.3600.0, Culture=neutral, &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PublicKeyToken=b77a5c561934e089&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;compilerOptions=&amp;quot;/optimize&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;warningLevel=&amp;quot;1&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providerOption &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name=&amp;quot;CompilerVersion&amp;quot; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value=&amp;quot;3.5&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/compilers&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/system.codedom&amp;gt;&lt;/p&gt;
&lt;p&gt;What I am missing?&lt;/p&gt;
&lt;p&gt;Thank you very much in advance for your help.&lt;/p&gt;
</description></item><item><title>re: C# 3.0 and CodeDOM</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#6683869</link><pubDate>Thu, 06 Dec 2007 22:44:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6683869</guid><dc:creator>LukeH</dc:creator><description>&lt;p&gt;Marco - &lt;/p&gt;
&lt;p&gt;To pick up the .config settings for CodeDOM, you need to create your CodeDOM provider via:&lt;/p&gt;
&lt;p&gt;var csc = CodeDomProvider.CreateProvider(&amp;quot;csharp&amp;quot;);&lt;/p&gt;
&lt;p&gt;instead of the method used above which directly creates a CSharpCodeProvider.&lt;/p&gt;
</description></item><item><title>re: C# 3.0 and CodeDOM</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#8169642</link><pubDate>Wed, 12 Mar 2008 16:21:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8169642</guid><dc:creator>Dude76</dc:creator><description>&lt;p&gt;THANKS ! You saved me after 3 days of looking for what's going wrong !&lt;/p&gt;
&lt;p&gt;If you don't use specific version 3.5 for compiler, System.Core.dll causes many difficulties and compilation failed !&lt;/p&gt;
&lt;p&gt;thx so much !&lt;/p&gt;</description></item><item><title>re: C# 3.0 and CodeDOM</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#8616038</link><pubDate>Wed, 18 Jun 2008 14:55:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8616038</guid><dc:creator>RunningMile</dc:creator><description>&lt;p&gt;Looking for a way to generate IL for dynamic methods without creating DynamicAssemblies - need to incorporate high performance scripting capability into our 3D application without having to load new dynamic assembly on every change... we do not need to create new classes, just a rapid way to compile C# script...&lt;/p&gt;</description></item><item><title>re: C# 3.0 and CodeDOM</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#8959127</link><pubDate>Fri, 19 Sep 2008 20:21:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8959127</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Echoing what Dude76 said, have been trying this all day. Was missing the compiler version&lt;/p&gt;
&lt;p&gt;(my error was saying 'From' undefined, just in case someone else has same error).&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</description></item><item><title>re: C# 3.0 and CodeDOM</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#9008139</link><pubDate>Tue, 21 Oct 2008 00:01:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9008139</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Thanks Luke - this tip saved my bacon!&lt;/p&gt;</description></item><item><title>The source code IS the executable [Releasing CSI, a C# interpreter (with source and tests) for .NET]</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#9287022</link><pubDate>Wed, 07 Jan 2009 11:29:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9287022</guid><dc:creator>Delay's Blog</dc:creator><description>&lt;p&gt;A few years ago I found myself spending a lot of time writing batch files to perform a variety of relatively&lt;/p&gt;
</description></item><item><title>re: C# 3.0 and CodeDOM</title><link>http://blogs.msdn.com/lukeh/archive/2007/07/11/c-3-0-and-codedom.aspx#9847932</link><pubDate>Sat, 25 Jul 2009 01:32:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9847932</guid><dc:creator>Nir</dc:creator><description>&lt;p&gt;Wow, I was searching for hours how I can use collection initializers in code dom. Thank you so much!&lt;/p&gt;</description></item></channel></rss>