CSLA Light v3.6.2 and Silverlight 3

CSLA Light v3.6.2 and Silverlight 3

Old forum URL: forums.lhotka.net/forums/t/6760.aspx


Brad posted on Tuesday, April 07, 2009

Greetings,

I am attempting to compile CSLA Light v3.6.2 under Silverlight 3 and am running into compile issues.

The build error I received is:

Error 16 Custom tool error: Failed to generate code for the service reference 'WcfPortal'.

To reproduce my steps, I did the following (on a machine with SL3 installed):

1) Download CSLA Light v3.6.2
2) Unpack to directory
3) Run the cslalightcs solution
4) Completed the Visual Studio Upgrade Wizard (with no errors)
5) Attempted to build the solution.

Any tips on getting this built for Silverlight 3?

Cheers,
-Brad

RockfordLhotka replied on Wednesday, April 08, 2009

I must confess that I've spent zero time getting CSLA to work on SL3. I'm buried in numerous projects and, while this is a high priority, it has to wait.

From what you are seeing, I suspect you'll need to re-reference the WCF data portal service from the CSLA .NET for Windows side. Odds are they changed the way WCF proxies are generated and were unable to auto-upgrade the existing proxy code.

That shouldn't be hard - just build CSLA .NET for Windows, then create a temporary web project and expose the Silverlight WcfHost class as a service. Then in the CSLA .NET for Silverlight project, remove the service reference and re-add it to reference this temporary host.

Obviously the resulting config file URL is useless - but the point is to regen the proxy code in the SL Csla project.

Shane replied on Saturday, April 18, 2009

Any luck on this? I just attempted to build this today and received the same error.

Re-adding the reference to the WcfPortal doesn't seem to help.

skagen00 replied on Monday, April 27, 2009

Hi guys - I was curious as to if either of you or anyone reading this has been able to get past any issue in this area.

I am turning towards working on a second, more involved showcase application for my company and will be using Silverlight 3 -- so I haven't gotten to the point where I would run into this issue yet but assuming I do, just want to understand what the workaround was (if there was one).

Thanks!
Chris

skagen00 replied on Monday, April 27, 2009

FWIW, I decided to take the leap - I've gone ahead and upgraded my software to use Silverlight 3.

After conversion, I have a slight issue with the data grid reference I was using but other than that everything works a-ok. That is, I'm not encountering the error mentioned above.

Just thought I'd mention it in case others were holding back.

Chris replied on Wednesday, April 29, 2009

I'm on SL3 and I am having trouble with the DataGrid and "csla:ValidatedDataGridTextColumn" ... I found an very interesting link that I'm exploring about how to toggle between SL2 and SL3. 

http://blogs.msdn.com/amyd/archive/2009/03/18/switching-from-silverlight-3-tools-to-silverlight-2-tools.aspx

Chris

Shane replied on Thursday, April 30, 2009

I haven't been spending a lot of time with this since posting initially, but I'm experiencing the error on two different machines.

I'll take a deeper dive this weekend and post again if I come up with something.

Shane replied on Thursday, April 30, 2009

Ok, so I've made a little more progress on this, but I'm not sure what the implications are.

I can get cslalightcs to build now if I go to "Configure Service Reference" on the context menu of WcfPortal in the solution and change the Reuse options from "Reuse types in all..." to "Reuse types in specified..." and check all items -except- System.Data.Services.Client.

Adding System.Data.Services.Client back into the mix will cause the build to fail.

Again, not sure of the implications of changing this option yet so if anyone can offer some advice, it would be appreciated.

Shane replied on Thursday, April 30, 2009

Maybe I should have saved this up for a single post, but anyway, I was finally able to get this to build.

As I said in my previous post, removing System.Data.Services.Client from the list of types to reuse allowed me to build but re-selecting it would go back to failing.

I wound up removing the reference from the solution and building without it. As expected, I received an error about the 'type or namespace Data' not existing. After re-adding the reference and setting the reuse options back to 'Reuse types in all assemblies', I can build successfully.

Hope this helps.

pondosinat replied on Thursday, May 21, 2009

Shane,

I'm not having any luck getting this to build by following these steps. Are you using CSLA v 3.6.2? I just installed SL3 but CSLA is can no longer talk to the db. When I try to compile CslaLight now I get those same WcfPortal missing reference errors...

Thanks,

Brian

Phil Cockfield replied on Monday, June 15, 2009

I wonder if anyone who's successfully navigated through getting CSLA to build successfully against SL3 could post the DLL somewhere please?

I've been following these guides, but I'm getting nowhere, and would really love to get up and running.

If you have the DLL, that would be most appreciated...thank you so much.

---
Phil

skagen00 replied on Monday, June 15, 2009

I've been actively using this combination without any problem.

In upgrading from SL2 to SL3 I had to make sure I updated all my references to the newest versions & such... but once that was squared away I was rolling.

I think Sergey or Nermin posted a thread guiding on this, too.

More details as to what your error is might help.

bdbrodie replied on Thursday, June 18, 2009

Hi fellow CSLA + Silverlight 3 Beta newbies...

Thought I'd save everyone else a few hours of hair pulling to get the Cslalight project compiling.

I don't totally understand everything that is going on behind the scenes here yet, but a comment on this other thread helped me out right away.

http://forums.lhotka.net/forums/thread/30799.aspx

Here are the steps I followed:

  1. Copy the "WcfHostWeb" project and then adding that to the Csla_build solution
    1. Redo the reference to Csla if necessary. Be sure to use the .NET version, not the Silverlight version (right, you don't have the yet because its not compiling...)
    2. Remove the unnecessary reference to the Rolodex project.
    3. Compile (should work)
  2. Delete "WcfPortal" reference under Service References in the CslaLight project.
  3. Add a new reference to the WcfHostWeb service (Click "Discover")
  4. Compile!

Some of the samples have an error in the ServiceConfig file. The ServiceConfig file should look something like this:

<configuration>

   <system.serviceModel>

      <bindings>

         <basicHttpBinding>

            <binding name="BasicHttpBinding_IWcfPortal" maxBufferSize="65536"

                  maxReceivedMessageSize="65536" receiveTimeout="10" sendTimeout="10">

            </binding>

         </basicHttpBinding>

      </bindings>

<client>

<endpoint address="http://localhost:1993/WcfPortal.svc"

binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWcfPortal"

contract="WcfPortal.IWcfPortal" name="BasicHttpBinding_IWcfPortal" />

</client>

</system.serviceModel>

</configuration>

 

Hope this helps!

 

Ben

RockfordLhotka replied on Saturday, June 20, 2009

FYI, I have branched the 3.6.x code in svn, so trunk will now become 3.7. My plan is for 3.7 to support Silverlight 3, and 3.6 to support Silverlight 2.

Beyond fixing the project issues so 3.7 builds for SL3, there's the bigger matter of taking advantage of element binding (which means all the Csla.Silverlight UI controls will change), and possibly (hopefully) getting rid of Navigator in favor of using SL3's deep linking support.

I suspect there may be some changes in WcfProxy too - to enable some of the new WCF features. Maybe not - maybe the current model will work - but I wouldn't be surprised if some changes aren't required.

wjcomeaux replied on Monday, June 22, 2009

Hey guys:

Does there happen to be a consolidated/definitive set of steps one should take to get this all to compile and work for Silverlight 3? It seems some people get it and some don't using a mixture of ideas. I've tried the various things mentioned here and in other threads and I keep running into the same various errors mentioned by other users. I'm presume I'm missing a critical step, doing something out of order or completely doing something wrong...

My SL2 environment is gone and we are only using SL3 Preview stuff. Thankfully this is all new development so we aren't locked out from an existing code base. However, we are definitely itching to get some of this stuff working before the "powers that be" deem it "too soon" or "not worth the effort".

Assume I've got a fresh set of the csla projects (light and win) and a fairly fresh install of the SL3 files. Where to?

Thanks,
Will

RockfordLhotka replied on Monday, June 22, 2009

There's a link off the FAQ to a forum post with a list of steps

http://www.lhotka.net/cslanet/faq/SilverlightFaq.ashx

wjcomeaux replied on Tuesday, June 23, 2009

Edit** Question regarding Tortoise moved to thos thread. http://forums.lhotka.net/forums/34200/ShowThread.aspx#34200

Thanks,
Will

RockfordLhotka replied on Tuesday, June 23, 2009

Please split the svn question into its own thread.

wjcomeaux replied on Wednesday, June 24, 2009

Well, I've made some progress. I follows the steps linked in the Silverlight FAQ.
After I get all steps completed I am able to get a Rebuild All succeeded message when I build the CslaLight project. However, there is still an error:
Custom tool error: Failed to generate code for the service reference 'WcfPortal'. Please check other error and warning messages for details.
File referenced is Reference.svcmap in the CslaLight project. Does the Rebuild All succeeded really mean that or is this error going to bite us in the rear soon?

Thanks, Will
Compiler warnings follow:

There are 403 warnings, these few seem to be of interest.

Warning 3 Custom tool warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://ws.lhotka.net/WcfDataPortal']/wsdl:portType[@name='IWcfPortal']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IWcfPortal'] C:\SourceCode\Servicing\Hps.Framework.Servicing\Development\Csla\CslaLight\cslalightcs\Csla\Service References\WcfPortal\Reference.svcmap 1 1 CslaLight

Warning 4 Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IWcfPortal']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='WcfPortal']/wsdl:port[@name='BasicHttpBinding_IWcfPortal'] C:\SourceCode\Servicing\Hps.Framework.Servicing\Development\Csla\CslaLight\cslalightcs\Csla\Service References\WcfPortal\Reference.svcmap 1 1 CslaLight

Warning 2 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Exception has been thrown by the target of an invocation.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://ws.lhotka.net/WcfDataPortal']/wsdl:portType[@name='IWcfPortal'] C:\SourceCode\Servicing\Hps.Framework.Servicing\Development\Csla\CslaLight\cslalightcs\Csla\Service References\WcfPortal\Reference.svcmap 1 1 CslaLight

Warning 5 Custom tool warning: No endpoints compatible with Silverlight 2 were found. Please note that only Basic Profile / SOAP 1.1 services are supported. If you are attempting to use a Windows Communication Foundation service, make sure you are using the BasicHttpBinding.A client proxy class was generated but it will not be usable unless endpoint information compatible with Silverlight 2 is provided via the constructor. C:\SourceCode\Servicing\Hps.Framework.Servicing\Development\Csla\CslaLight\cslalightcs\Csla\Service References\WcfPortal\Reference.svcmap 1 1 CslaLight

Warning 1 Custom tool warning: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. C:\SourceCode\Servicing\Hps.Framework.Servicing\Development\Csla\CslaLight\cslalightcs\Csla\Service References\WcfPortal\Reference.svcmap 1 1 CslaLight



StuartBale replied on Saturday, June 27, 2009

Hi,
Any chance you can zip v3.7 and make available for download?
Regards,
Stuart

RockfordLhotka replied on Sunday, June 28, 2009

Yes, look for it in the near future.

Copyright (c) Marimer LLC