Print Page | Close Window

Questions about Cocktail 1.0

Printed From: IdeaBlade
Category: Cocktail
Forum Name: Community Forum
Forum Discription: A professional application framework using Caliburn.Micro and DevForce
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3586
Printed Date: 25-Apr-2024 at 7:32am


Topic: Questions about Cocktail 1.0
Posted By: Walid
Subject: Questions about Cocktail 1.0
Date Posted: 20-Aug-2012 at 9:20am
Hi Marcel,

Could you update Github and remove the Repository/UnitOfWork from the cocktail.Contrib ?

Actually I don't use cocktail from nuget but the sources in my project for a better understanding of the framework and being able to debug so I still link to it. 
I could remove all the references to Cocktail.Contrib (that's a lot) but I guess this project could be use again in a near future so I'd rather keep it (even if it's an empty DLL) than to add it again to my projects when it will come back alive.

Also, it seems that you deleted the reference to DesignTimeViewModelLocatorBase.cs in Cocktail.SL5.cproj




Replies:
Posted By: mgood
Date Posted: 20-Aug-2012 at 9:38am
Walid,
Chances are that Cocktail.Contrib will go away entirely. I haven't made up my mind yet. Codeplex now supports git repositories and I'm considering switching from svn to git to allow direct contributions to Cocktail itself. I was going to remove the UoW code from Cocktail.Contrib, but at that point I might as well delete the entire repository.

You can still debug Cocktail and drill into the source code if you add Cocktail via NuGet. See the last part in my most recent blog post about debugging Cocktail. Adding and removing third-party dependencies is much easier with NuGet, so should Cocktail.Contrib come back you can just add it back via NuGet in the places where you'll use the functionality.

http://cocktail.ideablade.com/debugging-cocktail-applications/ - http://cocktail.ideablade.com/debugging-cocktail-applications/


Posted By: Walid
Date Posted: 03-Sep-2012 at 3:13am
I can't compile ma SL5 solution with the binaries from nuget. The class DesignTimeViewModelLocatorBase is missing in the SL5 binaries.

Can you provide a patch  ?

Also, I am trying to debug with the symbol hosted on SymbolSource. I can't get it to work, I have the configuration done (at least I think) and it correctly download the pdb from the server. But the sources aren't there, so when I try to go in step by step on a Cocktail's method it tries to find the sources in your local location (D:\Workspace\Frameworks\Cocktail\trunk\Cocktail\).

Is there a parameter to set to force the download of the sources ?


Posted By: mgood
Date Posted: 03-Sep-2012 at 11:10am
Sorry, looks like I missed to respond to this point in your original post. DesignTimeViewModelLocatorBase is missing in the SL5 binaries, because design time data didn't work in SL5. Microsoft added methods in SL5 that don't exist in .NET 4, so when Blend or the Visual Studio designer tried to open the view we were getting MissingMethodException when an EntityManager tried to query it's cache for the sample data.

Now this issue should be fixed with .NET 4.5 and Visual Studio 2012, but I haven't tested it yet. Design time data support for SL5 should be available once we ship Cocktail v2, which will fully support Visual Studio 2012.

In order to build your solution for now, remove your ViewModelLocator from your solution.

BTW, this point is mentioned here in the documentation: http://drc.ideablade.com/xwiki/bin/view/Documentation/cocktail-entitymanager-provider#HProvidingconnectiondetails


Posted By: Walid
Date Posted: 03-Sep-2012 at 11:18am
Yes I know it wasn't working yet for SL5 but didn't expect to see the class diseapering from the binaries.
I can't remove the ViewModelLocator as I need it to provide the DataContext in BLEND (for the binding) but I will change it to not inherite anymore from DesignTimeViewModelLocatorBase.
 
Any idea why I can't debug with the symbols ? I checked many time, I did configure my VS like they say on SymbolSource.org.
Without debuging, nuget package are useless for me.
 
 
 
 


Posted By: mgood
Date Posted: 03-Sep-2012 at 11:44am
Not sure why you can't debug. If you open the Modules window in the debugger, what does it say in the symbols column for Cocktail? That should tell you if the symbols were loaded and if not, why.


Posted By: Walid
Date Posted: 03-Sep-2012 at 12:08pm
Well I think the symbols are loaded (see below) but it's just not possible to see the source because it tries to load them from the location specified in the .pdb : D:\workspace\Framework\cocktail\trunk\Cocktail
 
I though Symbolsource.org recompile the pdb in order to give a correct location for the source (source : https://groups.google.com/forum/?fromgroups=#!searchin/symbolsource/source/symbolsource/z1nEnKD9HDI/3xlca-riceYJ -


Posted By: mgood
Date Posted: 03-Sep-2012 at 1:23pm
This looks like you've overlooked Tip #1 in the instructions.

1.When using a symbol server for some of your dependencies be sure not to have any other PDB files of those libraries present in the same directory as the DLL files. When debugging code using Library.dll, Visual Studio will always first load Library.pdb from the same directory, which will disable symbol and source server usage.

You must have an old Cocktail.pdb file present in your bin folder from before you were using NuGet. Visual Studio always chooses the local pdb file over a symbol server. You must delete your local *.pdb files.


Posted By: Walid
Date Posted: 03-Sep-2012 at 1:51pm
No older .pdb file in my solution's folder. I did pay attention to this point and made a clean of the solution (using cocktail fluch.cmd) before the first compilation.
 
In order to be 100% sure I didn't clean the wrong branch, I just deleted my Symbols directory and cleaned the solution. problems is still there, trying to find the source in D:\Workspace ...
 
Could it be possible the push to symbolsource had an issue ? I found this post which seems related but no real solution https://groups.google.com/forum/#!topic/symbolsource/pn7aPCJU24U -


Posted By: mgood
Date Posted: 03-Sep-2012 at 2:03pm
I haven't run into any issues on different machines, but that doesn't mean there isn't an issue. Let me look into it and see if I can figure out what's going on.


Posted By: Walid
Date Posted: 03-Sep-2012 at 2:04pm
thanks I appreciate


Posted By: Walid
Date Posted: 03-Sep-2012 at 2:08pm
For info, where are the downloaded source supposed to be ? In the same folder as the pdb (like C:\Dev\Symbols\Cocktail.SL.pdb\5487A997D3924AB9B300FD9D514FA8771) ?
 
 


Posted By: mgood
Date Posted: 03-Sep-2012 at 5:33pm
Originally posted by Walid

For info, where are the downloaded source supposed to be ? In the same folder as the pdb (like C:\Dev\Symbols\Cocktail.SL.pdb\5487A997D3924AB9B300FD9D514FA8771) ?
 
 
 
Not sure actually. I never had to look for them.


Posted By: mgood
Date Posted: 03-Sep-2012 at 7:00pm
Ok, so I tried on a clean solution I created from scratch and added Cocktail via NuGet. I can debug just fine. The source code should get downloaded into the src folder in the same folder as the pdb files. In your case you should see C:\Dev\Symbols\src\...

If that's not happening for you, then you missed a configuration step somewhere along the way.


Posted By: Walid
Date Posted: 04-Sep-2012 at 12:32am
Well I cheked, recheked and I see no difference between my conf and what it should be. 

In yellow from top to bottom :
- Enable just my code 
- Enable .NET framework source stepping
- Enable Source support
- Requires source to be exactly lilke the original version



only the modules from cocktail/caliburn are specified (the pdb are acorrectly downloaded).




I will try on another computer, maybe it's a problem with the localized version of VS Ultimate.

One last thing.
Since I unchecked Enable just my code, I have a LOT of exception in the logs from MS and ideablade's libs during the launch of the application. 
Do you have those errors too or should I look in my code and fix "I don't know what"  ?

'iexplore.exe' (Silverlight) : 'c:\Program Files (x86)\Microsoft Silverlight\5.1.10411.0\fr\System.Xml.debug.resources.dll' chargé
Une exception de première chance de type 'System.Xml.XmlException' s'est produite dans System.Xml.dll
'iexplore.exe' (Silverlight) : 'c:\Program Files (x86)\Microsoft Silverlight\5.1.10411.0\System.ServiceModel.dll' chargé
'iexplore.exe' (Silverlight) : 'Anonymously Hosted DynamicMethods Assembly' chargé
'iexplore.exe' (Silverlight) : 'BindingDebugging' chargé
Le thread '<Sans nom>' (0x27e4) s'est arrêté avec le code 0 (0x0).
Une exception de première chance de type 'System.Web.HttpException' s'est produite dans System.Web.dll
Une exception de première chance de type 'System.Web.HttpException' s'est produite dans System.Web.dll
Le thread '<Sans nom>' (0x20f0) s'est arrêté avec le code 0 (0x0).
Une exception de première chance de type 'System.Xml.XmlException' s'est produite dans System.Xml.dll
'iexplore.exe' (Silverlight) : 'ProxyBuilder' chargé
'WebDev.WebServer40.EXE' (Managé (v4.0.30319)) : 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll' chargé
Le thread '<Sans nom>' (0x21d8) s'est arrêté avec le code 0 (0x0).
Une exception de première chance de type 'System.IO.FileNotFoundException' s'est produite dans mscorlib.dll
Une exception de première chance de type 'IdeaBlade.Core.IdeaBladeException' s'est produite dans IdeaBlade.EntityModel.dll
Une exception de première chance de type 'System.Exception' s'est produite dans IdeaBlade.EntityModel.Edm.dll


Posted By: mgood
Date Posted: 04-Sep-2012 at 1:01am
Why do you have two different locations for symbolsource.org?
 
There can be exceptions that are expected and handled. The CLR logs all exceptions that are thrown even if they are handled.


Posted By: Walid
Date Posted: 04-Sep-2012 at 1:15am
because it's like this in their Recommanded configuration ( http://www.symbolsource.org/Public/Home/VisualStudio - http://srv.symbolsource.org/pdb/Public - http://srv.symbolsource.org/pdb/Public
 
I just tested on another computer with VS Premium and I still don't download the sources. It still tries to find them on D:\Workspace ...
 
 


Posted By: Walid
Date Posted: 04-Sep-2012 at 1:54am
I am looking with the guys of symbolsource. Looks like they have some issue in a no partial trust environnement (seems to be my case)
"We have had some reports about this failing in partial trust environments ..."
I will let you know about since others custumers might have the same problem


Posted By: mgood
Date Posted: 04-Sep-2012 at 12:50pm
Originally posted by Walid

because it's like this in their Recommanded configuration ( http://www.symbolsource.org/Public/Home/VisualStudio - http://www.symbolsource.org/Public/Home/VisualStudio )
 
I tested with only this link (with and without authantication) and still the same issue  http://srv.symbolsource.org/pdb/Public - http://srv.symbolsource.org/pdb/Public
 
I just tested on another computer with VS Premium and I still don't download the sources. It still tries to find them on D:\Workspace ...
 
 
 
You only need one of the two. They recommend to use the personlized one. The public URL is if you don't have an account. If you have an account you should use the second one.
 


Posted By: mgood
Date Posted: 04-Sep-2012 at 12:54pm
Originally posted by mgood

Originally posted by Walid

because it's like this in their Recommanded configuration ( http://www.symbolsource.org/Public/Home/VisualStudio - http://www.symbolsource.org/Public/Home/VisualStudio )
 
I tested with only this link (with and without authantication) and still the same issue  http://srv.symbolsource.org/pdb/Public - http://srv.symbolsource.org/pdb/Public
 
I just tested on another computer with VS Premium and I still don't download the sources. It still tries to find them on D:\Workspace ...
 
 
 
You only need one of the two. They recommend to use the personlized one. The public URL is if you don't have an account. If you have an account you should use the second one.
 
 
Oh, I think the MyGet one is new. Don't remember that from when I set it up in the first place. I only have the authenticated public one.


Posted By: Walid
Date Posted: 06-Sep-2012 at 3:20am
Hi,

WPF application works fine, Silverlight aren't.

After contacting the guys from SymbolSource, here is their answer :

"I was still trying to figure this out in the meantime. So a blank Silverlight project that I created loads symbols for Cocktail.SL, but silently skip over calls. It doesn't user the source server to get actual sources, even though symbols get loaded just fine. The same code works from a console project, so only Silverlight seems affected.

This is what I referred to before with "partial trust problems". Indeed, Visual Studio 2012 has a new option under Debugger "Allow source server for patial trust assemblies". After enabling it I was able to step into Cocktail.SL code.

So there seems no other way but to upgrade :)"

Any ETA for a compatible version of Devforce/Cocktail with VS2012 ? :)




Posted By: mgood
Date Posted: 06-Sep-2012 at 9:28am
Sorry, I totally forgot about this. It's all coming back now. The solution is explained here:
 
http://stackoverflow.com/questions/3739079/vs2010-debugging-sl-4-cant-load-source-code-from-source-server -


Posted By: Walid
Date Posted: 06-Sep-2012 at 10:38am
Thanks for the link.

Cool, I can't wait to see the beta !
I hope you guys were able to fix the compilation issue in VS12 where the solution contains many Domain project.


Posted By: mgood
Date Posted: 06-Sep-2012 at 10:44am
Unfortunately, that's one of the outstanding issues and may not be fixed in the beta.



Print Page | Close Window