New Posts New Posts RSS Feed: Questions about Cocktail 1.0
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Questions about Cocktail 1.0

 Post Reply Post Reply Page  12>
Author
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post Topic: Questions about Cocktail 1.0
    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



Edited by Walid - 20-Aug-2012 at 9:21am
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post 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 ?


Edited by Walid - 03-Sep-2012 at 7:16am
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post 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.
 
 
 
 
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post 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)
 
Now I am not sure if the window you call Modules is the one below this screenshot as I have a french version of VS.
 
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post 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.

Edited by mgood - 03-Sep-2012 at 1:24pm
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post 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
I didn't try yet the tools on the last post.
 
 
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post Posted: 03-Sep-2012 at 2:04pm
thanks I appreciate
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post 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) ?
 
 
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Walid View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Nov-2010
Posts: 161
Post Options Post Options   Quote Walid Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down