<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: error when publishing form with code (sgen.exe missing)</title><link>https://www.infopathdev.com:443/forums/thread/75288.aspx</link><pubDate>Wed, 15 Feb 2012 10:35:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75288</guid><dc:creator>paolo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75288.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=75288</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;As usual one gets the illumination after posting.&lt;/p&gt;&lt;p&gt;It turns out in an earlier version of the form I had a web service running&lt;/p&gt;&lt;p&gt; which I then removed the code in the form. &lt;/p&gt;&lt;p&gt;But, I didn&amp;#39;t remove the web service reference in the project. After I did that, it compiled just fine.&lt;/p&gt;&lt;p&gt;Ciao,&lt;/p&gt;&lt;p&gt;Paolo&lt;br /&gt;&lt;/p&gt;</description></item><item><title>error when publishing form with code (sgen.exe missing)</title><link>https://www.infopathdev.com:443/forums/thread/75287.aspx</link><pubDate>Wed, 15 Feb 2012 10:28:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75287</guid><dc:creator>paolo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75287.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=75287</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;by publishing a form with code I get the following error (see below).&lt;/p&gt;&lt;p&gt;Why does it suddenly need the sgen.exe file when it never asked for&lt;/p&gt;&lt;p&gt;that before? other forms with code publish &amp;amp; compile just fine...&lt;/p&gt;&lt;p&gt;&amp;nbsp;Ciao,&lt;/p&gt;&lt;p&gt;Paolo &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Error 2 Task failed because &amp;quot;sgen.exe&amp;quot; was not found, or the .NET&lt;br /&gt;Framework SDK v2.0 is not installed.&amp;nbsp; The task is looking for&lt;br /&gt;&amp;quot;sgen.exe&amp;quot; in the &amp;quot;bin&amp;quot; subdirectory beneath the location specified in&lt;br /&gt;the SDKInstallRootv2.0 value of the registry key&lt;br /&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. You may be able&lt;br /&gt;to solve the problem by doing one of the following: 1.) Install the&lt;br /&gt;.NET Framework SDK v2.0.&amp;nbsp; 2.) Manually set the above registry key to&lt;br /&gt;the correct location.&amp;nbsp; 3.) Pass the correct location into the&lt;br /&gt;&amp;quot;ToolPath&amp;quot; parameter of the task.&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>