We have a .Net solutions which contains an Outlook Addin project and an installer project (vdproj). We have jenkins running as continuous integration/build tool.
The first challenge I had is to set assembly version from jenkins instead of setting from project. This is done by “echo” jenkins version info into project/properties/AssemblyInfo.cs file.
The second challenge I had is to build vdproj installer project. I was using MSBuild to build outlook addin project but unfortunately MSBuild cannot build vdproj file. After googling I have to use devenv.com command line to build the solution.
The third challenge is to set ApplicationVersion. The ApplicationVersion is used in manifest file and if that remains same, ClickOnce installer will complaint same manifest has already been installed. I only realised this problem recently. The first solution is to pass ApplicationVersion in MSBuild. But MSBuild cannot be used for vdproj. So I run MSBuild first then devenv. Unfortunately everytime devenv will rebuild my outlook addin project and thus reset ApplicationVersion. After a few trying I found the link: http://stackoverflow.com/questions/4192407/passing-msbuild-options-when-calling-devenv
All you need to do is just passing ApplicationVersion through environment variable before calling devenv.com. So below works:
devenv.com SolutionName /rebuild "Release|Any CPU"
Visual Studio 2012 seems tend to have many issues after various windows 7 auto update or some other changes. To fix them repair should work.
In Visual Studio Tools Command Prompt, put in
then start visual studio 2012 again. It works.
First thing first, don’t take the solution in this post serious.
I was working on a project where we want to make our web-based application perform some actions in Microsoft Outlook. It’s not a common behaviour but it is probably workable in a very controlled place like my firm, where almost all the users having same set of applications.
My architect is a genius, he suddenly suggested why not use mailto link, since all the users will use Outlook as their only E-mail tool.
I have to say before I started to work on it I felt it very hardly work. But after a few hours trying I found out it’s actually possible to let Outlook add-in to capture the special mailto and do some funny actions after that. The only problem I have is that if user’s Outlook is not opened first, then he will see a new mail window with special mailto address in. This is because Outlook start new mail window first and only load add-in after that.
MSDN has a good tutorial on Outlook plugin here.
So next thing is how to pass data in Outlook, and since I’m familiar with Web application and always work on web, JSON just comes to my mind. So in the end I embedded JSON string in mailto URL and created a new pattern which my colleague called “JSON-over-mailto”.
It’s a really fun experience to do such unusual practice, and also realize that Microsoft tools are really powerful.
Last thing, this is not a common practice and only work in a special close environment. But if you want to have something fun, just go ahead and try.