<?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>Ali Pasha's WebLog... : WCF</title><link>http://blogs.msdn.com/a_pasha/archive/tags/WCF/default.aspx</link><description>Tags: WCF</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Supporting Visual Studio 2005 extensions for .NET Framework 3.0 (WCF)...</title><link>http://blogs.msdn.com/a_pasha/archive/2006/12/28/supporting-visual-studio-2005-extensions-for-net-framework-3-0-wcf.aspx</link><pubDate>Fri, 29 Dec 2006 02:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1377506</guid><dc:creator>a_pasha</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/a_pasha/comments/1377506.aspx</comments><wfw:commentRss>http://blogs.msdn.com/a_pasha/commentrss.aspx?PostID=1377506</wfw:commentRss><description>&lt;P&gt;I don't think that 'support' should block anyone from using the extensions to adopt WCF, as any projects created using the extensions will continue to work with Orcas. The only difference is that Service references created using the extensions will be treated as normal folders that can no longer be updated. The project should compile and continue to work. The proxy class will be treated as any other code file. This should work because the .NET Framework 3.0 has been released and is &lt;A class="" href="http://blogs.msdn.com/msbuild/archive/2006/11/03/msbuild-orcas-and-multi-targeting.aspx" mce_href="http://blogs.msdn.com/msbuild/archive/2006/11/03/msbuild-orcas-and-multi-targeting.aspx"&gt;fully supported in Orcas&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;Only if the service is being modifed, would I recommend re-creating a Service reference in Orcas. This will help in managing the proxy class, as well as the configuration, as the service is updated.&lt;/P&gt;
&lt;P&gt;To do this you should:&lt;BR&gt;1. Delete the proxy code file for the Fidalgo Service Reference - OPTIONAL&lt;BR&gt;2. Update the App.config file by removing the relevant ServiceModel sections - OPTIONAL&lt;BR&gt;3. Add a Service reference to the service. If you didn't delete the proxy class/config, the conflicts should be resolved automatically.&lt;/P&gt;
&lt;P&gt;Note:&lt;BR&gt;- We cannot support the Visual Studio 2005 Extensions as they were only meant to be an early technology preview. They were our means to get tools out to the community quickly to help early adoption of the product. Therefore, longer term concerns were shelved in favor of getting the tools up to quality and out the door as fast as possible. They, consequently, do not meet the bar required for products that we plan to support longer term. The code, nevertheless,&amp;nbsp;that the extensions generate for WCF on the 3.0 framework will definitely work on Orcas and is fully supported, as Orcas fully supports targeting the .NET Framework 3.0.&lt;/P&gt;
&lt;P&gt;- We evaluated the costs of automatically migrating Fidalgo Service references (as a part of the upgrade wizard) in the Orcas timeframe against other features and decided that the costs/benefit vis-à-vis other features did not make the bar.&lt;/P&gt;
&lt;P&gt;- Feb CTP will have the first drop of the new Orcas Service Reference features. The planned feature set in Feb CTP is far superior (quality-wise) to the features released in Fidalgo. I plan on releasing a list of the CTP features once we ship the Feb CTP. Unfortunately, I can’t recommend relying on the Feb CTP for production as we plan on changing .svcmap file (contains the information about the Service reference) in the future to accommodate new features planned in the following months. Therefore, it is not guaranteed that the Service reference (or even the project) can be upgraded between CTP, Betas, and RTM.&lt;/P&gt;
&lt;P&gt;Ali&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1377506" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/a_pasha/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/a_pasha/archive/tags/Fidalgo/default.aspx">Fidalgo</category></item><item><title>Visual Basic Issue with Types that are generated using svcutil.exe (WCF)</title><link>http://blogs.msdn.com/a_pasha/archive/2006/12/21/types-are-unitialized-if-using-visual-basic-wcf.aspx</link><pubDate>Thu, 21 Dec 2006 22:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1341933</guid><dc:creator>a_pasha</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/a_pasha/comments/1341933.aspx</comments><wfw:commentRss>http://blogs.msdn.com/a_pasha/commentrss.aspx?PostID=1341933</wfw:commentRss><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-bidi-language: AR-SA; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin"&gt;If you generate a WCF VB proxy that contains a DataContract type using &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms717328.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms717328.aspx"&gt;svcutil.exe&lt;/A&gt;, calling a method that returns the type will always incorrectly return an uninitialized type. This works correctly for C#.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-bidi-language: AR-SA; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-bidi-language: AR-SA; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin"&gt;John Stallo, a peer of mine,&amp;nbsp;spent some time investigating this issue. Here's the resolution:&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-bidi-language: AR-SA; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;The problem is a &lt;/SPAN&gt;namespace mismatch issue that involves the /Rootnamespace compiler switch (on by default in VB projects).&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;The important line of code that svcutil generates with this switch is an explicit namespace argument for DataContractAttribute. (This information is usually pulled from the service’s WSDL – the namespace below is the default one that’s generated if a namespace isn’t explicitly specified on the data contract on the server side):&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;FONT color=#000000&gt;System.Runtime.Serialization.DataContractAttribute(&lt;/FONT&gt;&lt;SPAN style="BACKGROUND: yellow; mso-highlight: yellow"&gt;&lt;FONT color=#000000&gt;[Namespace]:=&lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;"&lt;A href="http://schemas.datacontract.org/2004/07/" mce_href="http://schemas.datacontract.org/2004/07/"&gt;&lt;FONT color=#0000ff&gt;http://schemas.datacontract.org/2004/07/&lt;/FONT&gt;&lt;/A&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT color=#000000&gt;)&amp;gt;&amp;nbsp; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;Partial&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;Public&lt;/SPAN&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;Class&lt;/SPAN&gt;&lt;FONT color=#000000&gt; DataContract1&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Apparently svcutil.exe doesn’t generate the explicit namespace argument by default.&amp;nbsp; So when the generated proxy is added to a VB project, the Data Contract type now falls under the VB project’s root namespace (e.g. &lt;B&gt;ConsoleApplication1.&lt;/B&gt;DataContract1).&amp;nbsp; Without the explicit namespace argument, WCF has trouble finding the Data Contract type at runtime because the project’s root namespace throws a spanner in the works, which is why you then end up with uninitialized fields.&amp;nbsp; This doesn’t repro with C# because C# projects don’t have an implied root namespace.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt; 
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Workaround&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;Run svcutil with the following switch: &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: 'Courier New'"&gt;/namespace:*,MyNamespace&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #00b050; FONT-FAMILY: 'Calibri','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"&gt;…where “MyNamespace” is the namespace of your choosing that you want the proxy to be generated in.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-bidi-language: AR-SA; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin"&gt;Note that this will not be an issue with the Service Reference feature that will be available in the Feburary CTP of Visual Studio Orcas.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-bidi-language: AR-SA; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-bidi-language: AR-SA; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin"&gt;Ali&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-bidi-language: AR-SA; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1341933" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/a_pasha/archive/tags/default/default.aspx">default</category><category domain="http://blogs.msdn.com/a_pasha/archive/tags/initialize/default.aspx">initialize</category><category domain="http://blogs.msdn.com/a_pasha/archive/tags/types/default.aspx">types</category><category domain="http://blogs.msdn.com/a_pasha/archive/tags/WCF/default.aspx">WCF</category></item></channel></rss>