Lync Add-in

Goyo
Member Posts: 36
Hi. I'm trying to make a Lync add-in with the PresenceIndicator control but it has been impossible. The point is i've made a windows form application with the WPF control and it works fine, but when i make the add-in exactly the same way and i open the page with Dynamics Nav, it shows the "Microsoft.Dynamcis.Nav.Client dejó de funcionar" error and Nav is closed. If i use another control, for example a Combo in the WPF UserControl instead of the PresenceIndicator Control, it works fine for Navision.
The error appears in the instantiation of the WPF UserControl:
"persona contacto = new persona();"
persona is the name of the UserControl
That's the XAML code for the UserControl:
<UserControl x:Class="AddInSamples.persona"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:control="clr-namespace:Microsoft.Lync.Controls;assembly=Microsoft.Lync.Controls"
mc:Ignorable="d"
d:DesignHeight="40" d:DesignWidth="132">
<Grid>
<control:PresenceIndicator Source="yo@correo.es" />
</Grid>
</UserControl>
I don't know what am i doing wrong. Why does it work in the Windows Forms application and it fails in the Add-In? Why does it work with a combo and fails with de Lync Control? I've also tried with other Lync Controls and it fails too.
Does anyone have an example that actually works with Lync Controls?
Thanks, and i'm sorry for my english.
The error appears in the instantiation of the WPF UserControl:
"persona contacto = new persona();"
persona is the name of the UserControl
That's the XAML code for the UserControl:
<UserControl x:Class="AddInSamples.persona"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:control="clr-namespace:Microsoft.Lync.Controls;assembly=Microsoft.Lync.Controls"
mc:Ignorable="d"
d:DesignHeight="40" d:DesignWidth="132">
<Grid>
<control:PresenceIndicator Source="yo@correo.es" />
</Grid>
</UserControl>
I don't know what am i doing wrong. Why does it work in the Windows Forms application and it fails in the Add-In? Why does it work with a combo and fails with de Lync Control? I've also tried with other Lync Controls and it fails too.
Does anyone have an example that actually works with Lync Controls?
Thanks, and i'm sorry for my english.
0
Comments
-
I am not sure, but aren't Lync Control based on .net 4? Addins are .NET 3.5... may be the problem is there. When I try to use PresenceIndicator in my UniWPFAddin, it ends withThe tag 'PresenceIndicator' does not exist in XML namespace 'clr-namespace:Microsoft.Lync.Controls;assembly=Microsoft.Lync.Controls'.
Which should be because .NET versions incompatibility.0 -
Hi kine.
I've been trying to follow the example in http://blogs.msdn.com/b/nav/archive/2011/06/17/presence-control-add-in-in-microsoft-dynamics-nav-with-lync.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+MicrosoftDynamicsNavTeamBlog+%28Microsoft+Dynamics+NAV+Team+Blog%29
There is a video showing the funcionality working. I've tried to contact the author but i haven't get an answer so far. Any ideas on how is it done? Maybe with another components?0 -
I think that the example is using OCS 2007 assembly and components, which would be .NET 3.x. You are using Lync 2010 assembly, which could be .NET 4.0.0
-
You can use the Newer (and better looking with toast for Snap pinning and everything) Lync WPF Controls from the Lync SDK.
NAV Add-Ins have to be WinForm Controls. The Contorl in the SDK is a WPF Control.
one way of doing it is to first to Make a WPFUserControl and drag the actual Lync WPF Control on it. Then embedd this New Control in your WinForm UserControl Form(System.Windows.Forms.UserControl) using the WPF ElementHost Container Control in the Toolbar (System.Windows.Forms.Integration.ElementHost).
Hope it helps!0 -
My UniWPFAddin is working in this way, but the result... :whistle:
Ad if you read Goyo post, he is working in same way - WPF control hosted in WinApp...
I am not sure, if additional enveloping the control into user control will help...0 -
It helped Me0
-
-
When I read the requirements for the Lync SDK it says either .NET 3.5 or 4.0. As NAV 2009 R2 does not support .NET 4.0 Add-ins it is necessasy that the you have set the Add-in project to compile to .NET 3.5.
Are your Add-in project targetting .NET 3.5?
As stated above hosting of WPF controls must be done using an ElementHost.
Thanks,
/henrik“This posting is provided "AS IS" with no warranties, and confers no rights.”
Henrik Metzger, Software Development Engineer, Dynamics NAV
MSFT0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions