 |
BOOK: Professional C# 4.0 and .NET 4
 | This is the forum to discuss the Wrox book Professional C# 4.0 and .NET 4 by Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner; ISBN: 9780470502259 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional C# 4.0 and .NET 4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

June 20th, 2012, 02:30 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Chapter 28 Sample Code
I'm looking at Chapter 28 code samples, and cannot reconcile the printed book with the downloaded code sample. Specifically, (using kindle, so please excuse the lack of page numbers!) just after snippet SimpleCalculator/Calculator.cs, the book contains "The hosting application is a simple console application". In the code I downloaded the host is a wpf app, and the code snippets that follow refer to the console app I can't seem to find. So, I tried to add my own...using Wrox.ProCSharp.MEF.Properties does not recognize properties namespace, nor does the import of the ICalculator interface work. What am I missing here? Is there any update to the code download?
Thanks for any help
|
|

June 20th, 2012, 03:27 PM
|
|
Wrox Author
|
|
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
|
|
Quote:
Originally Posted by randaljay
I'm looking at Chapter 28 code samples, and cannot reconcile the printed book with the downloaded code sample. Specifically, (using kindle, so please excuse the lack of page numbers!) just after snippet SimpleCalculator/Calculator.cs, the book contains "The hosting application is a simple console application". In the code I downloaded the host is a wpf app, and the code snippets that follow refer to the console app I can't seem to find. So, I tried to add my own...using Wrox.ProCSharp.MEF.Properties does not recognize properties namespace, nor does the import of the ICalculator interface work. What am I missing here? Is there any update to the code download?
Thanks for any help
|
The Properties namespace is coming from the normal Console app template. Did you change the default namespace to Wrox.ProCSharp.MEF? Then you should have the namespace Wrox.ProCharp.MEF.Properties. For the ICalculator interface, did you add a reference to the contracts-assembly?
Hope this helps
|
|
The Following User Says Thank You to ChristianNagel For This Useful Post:
|
|
|

June 20th, 2012, 05:08 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi, thanks for the quick response.
I botched the reference for ICalculator, quick fix, but I had to add a string property using the project properties page for AddInDirectory to force the update to app.config which was required for the properties namespace to be recoginzed.
I'm still wondering why the console host referred to in the text was not included in the sample solution I downloaded for this chapter however. The other projects I've reviewed from the downloads (though only a few to this point) fit the text in the book verbatim!
Thanks again, out of the woods here for the moment! Really getting good use out of the book too, nice job.
|
|

July 31st, 2013, 05:38 AM
|
|
Registered User
|
|
Join Date: Jul 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Your given reply is helps me lots to solve my problem. Thank you for this reply.
|
|
 |
|