<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: .NET Type Forwarding &#8211; Moving Types Between Assemblies</title>
	<atom:link href="http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rss</link>
	<description>A very lazy but meticulous blogger</description>
	<lastBuildDate>Mon, 06 Sep 2010 08:23:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: Zuhaib</title>
		<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/comment-page-1#comment-40062</link>
		<dc:creator>Zuhaib</dc:creator>
		<pubDate>Wed, 17 Mar 2010 07:44:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies#comment-40062</guid>
		<description>Glad that it helped.</description>
		<content:encoded><![CDATA[<p>Glad that it helped.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valentina</title>
		<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/comment-page-1#comment-40014</link>
		<dc:creator>Valentina</dc:creator>
		<pubDate>Tue, 09 Mar 2010 15:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies#comment-40014</guid>
		<description>Thank you, really helpful!
Valentina</description>
		<content:encoded><![CDATA[<p>Thank you, really helpful!<br />
Valentina</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zuhaib</title>
		<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/comment-page-1#comment-40012</link>
		<dc:creator>Zuhaib</dc:creator>
		<pubDate>Mon, 08 Mar 2010 19:23:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies#comment-40012</guid>
		<description>As per the example .. The Dog class is no more in the Animal library .. as you can see from the source the Dog class has been commented.

The whole point of type forwarding is to move the type from one assembly to another without having to recompile the assemblies that consume the type that is being moved.

In this example, the Consumer1.exe was compiled against Animal library when the definition of Dog class was present in Animal library.

We then moved the Dog class to Canine library and added TypeForwardedTo attribute to the Animal library for the Dog class.

The old Consumer1.exe (in the Build folder) that was compiled against the old Animal library would still search for Dog class in Animal library. 

Now if we would not have specified the library containing the Dog class using TypeForwardedTo attribute, the old Consumer1.exe would crash.

But because we have done the required changes in Animal library, we do not have to compile the Consumer1.exe again.

I you would want to recompile the Consumer1 project, then obviously you need to add reference to the library containing the Dog class in the Consumer1 project. 

TypeForwardedToAttribute is used to move types from one assembly to another without disrupting callers (which is compiled against the old assembly) at runtime, not compile time.

Hope this clears ur doubt.</description>
		<content:encoded><![CDATA[<p>As per the example .. The Dog class is no more in the Animal library .. as you can see from the source the Dog class has been commented.</p>
<p>The whole point of type forwarding is to move the type from one assembly to another without having to recompile the assemblies that consume the type that is being moved.</p>
<p>In this example, the Consumer1.exe was compiled against Animal library when the definition of Dog class was present in Animal library.</p>
<p>We then moved the Dog class to Canine library and added TypeForwardedTo attribute to the Animal library for the Dog class.</p>
<p>The old Consumer1.exe (in the Build folder) that was compiled against the old Animal library would still search for Dog class in Animal library. </p>
<p>Now if we would not have specified the library containing the Dog class using TypeForwardedTo attribute, the old Consumer1.exe would crash.</p>
<p>But because we have done the required changes in Animal library, we do not have to compile the Consumer1.exe again.</p>
<p>I you would want to recompile the Consumer1 project, then obviously you need to add reference to the library containing the Dog class in the Consumer1 project. </p>
<p>TypeForwardedToAttribute is used to move types from one assembly to another without disrupting callers (which is compiled against the old assembly) at runtime, not compile time.</p>
<p>Hope this clears ur doubt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valentina</title>
		<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/comment-page-1#comment-40010</link>
		<dc:creator>Valentina</dc:creator>
		<pubDate>Mon, 08 Mar 2010 16:00:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies#comment-40010</guid>
		<description>Hello,
I have some problem with type forwarding. 
I have downloaded your source code, but it doesn&#039;t compile! It gives me a reference error. I could solve it by adding a reference to the new dll, but doing this I lose the whole point of interest of Type Forwarding. Could you help me?</description>
		<content:encoded><![CDATA[<p>Hello,<br />
I have some problem with type forwarding.<br />
I have downloaded your source code, but it doesn&#8217;t compile! It gives me a reference error. I could solve it by adding a reference to the new dll, but doing this I lose the whole point of interest of Type Forwarding. Could you help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zuhaib</title>
		<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/comment-page-1#comment-39157</link>
		<dc:creator>Zuhaib</dc:creator>
		<pubDate>Sat, 09 Jan 2010 16:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies#comment-39157</guid>
		<description>&lt;strong&gt;@Sai&lt;/strong&gt;
The class name cannot be different and the namespaces should be the same.

The sample that I have uploaded is written in .NET 3.5. Could you upload your sample and post the link here?

I am going to add source highlighting in comments, then you can directly paste your code here.</description>
		<content:encoded><![CDATA[<p><strong>@Sai</strong><br />
The class name cannot be different and the namespaces should be the same.</p>
<p>The sample that I have uploaded is written in .NET 3.5. Could you upload your sample and post the link here?</p>
<p>I am going to add source highlighting in comments, then you can directly paste your code here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tajdar</title>
		<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/comment-page-1#comment-39156</link>
		<dc:creator>Tajdar</dc:creator>
		<pubDate>Sat, 09 Jan 2010 16:03:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies#comment-39156</guid>
		<description>Very well explained.</description>
		<content:encoded><![CDATA[<p>Very well explained.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sai viswanath</title>
		<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/comment-page-1#comment-39148</link>
		<dc:creator>sai viswanath</dc:creator>
		<pubDate>Thu, 07 Jan 2010 18:10:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies#comment-39148</guid>
		<description>ok fine, i understood that class names can be different. But my doubt was that whether this type forwading is supported in .NET 3.5 or not. Because i am getting the error as &quot;	Type &#039;check1.Hello1&#039; is defined in this assembly, but a type forwarder is specified for it	&quot;

where in your application the same type is Animal.Dog</description>
		<content:encoded><![CDATA[<p>ok fine, i understood that class names can be different. But my doubt was that whether this type forwading is supported in .NET 3.5 or not. Because i am getting the error as &#8221;	Type &#8216;check1.Hello1&#8242; is defined in this assembly, but a type forwarder is specified for it	&#8221;</p>
<p>where in your application the same type is Animal.Dog</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zuhaib</title>
		<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/comment-page-1#comment-39143</link>
		<dc:creator>Zuhaib</dc:creator>
		<pubDate>Thu, 07 Jan 2010 06:17:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies#comment-39143</guid>
		<description>&lt;strong&gt;@Sai&lt;/strong&gt;
The app has reference to two namespaces with same named class? This example doesn&#039;t say that.

As said type forwarding is used to move one type from assembly to another. So the type which is used by old applications is no more inside the old assembly. It is moved to the new assembly.

The old application doesn&#039;t need to recompiled, thats the whole point of Type Forwarding.

Please check the attached sample source code. The dog class is not present (commented) in the Animal assembly. The Consumer1 application has reference to the Animal assembly alone. Still because we have used type forwarding in Animal assembly, Consumer1 application is able to find the type from the Canine assembly, without having any direct reference to it.</description>
		<content:encoded><![CDATA[<p><strong>@Sai</strong><br />
The app has reference to two namespaces with same named class? This example doesn&#8217;t say that.</p>
<p>As said type forwarding is used to move one type from assembly to another. So the type which is used by old applications is no more inside the old assembly. It is moved to the new assembly.</p>
<p>The old application doesn&#8217;t need to recompiled, thats the whole point of Type Forwarding.</p>
<p>Please check the attached sample source code. The dog class is not present (commented) in the Animal assembly. The Consumer1 application has reference to the Animal assembly alone. Still because we have used type forwarding in Animal assembly, Consumer1 application is able to find the type from the Canine assembly, without having any direct reference to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sai viswanath</title>
		<link>http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies/comment-page-1#comment-39138</link>
		<dc:creator>sai viswanath</dc:creator>
		<pubDate>Wed, 06 Jan 2010 19:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.nerdpad.com/how-to/net-type-forwarding-moving-types-between-assemblies#comment-39138</guid>
		<description>Will this of type type forwarding supported in .NET 3.5?
Because i got an error will bulding the app that has a reference of two namespaces (with same named classes)with same names but each of them are in assemblies with different names.. as you said..
please reply me...via email</description>
		<content:encoded><![CDATA[<p>Will this of type type forwarding supported in .NET 3.5?<br />
Because i got an error will bulding the app that has a reference of two namespaces (with same named classes)with same names but each of them are in assemblies with different names.. as you said..<br />
please reply me&#8230;via email</p>
]]></content:encoded>
	</item>
</channel>
</rss>
