in

MCW Technologies' Community Server

Downloads, blogs, forums, and more

Adventures in Visual Studio Development

Making Visual Studio easier to use, one blog entry at a time

December 2006 - Posts

  • Visual Studio 2005 SP1 is here

    Download it from here. Read the Release notes here.

  • Moving Development Work to Vista, Part 3

    Well I tried. At the end of Part 2, I had put Vista on my desktop computer and installed Office 2007, SQL 2005 and VS 2005. So far so good.

    Then I installed Vista on my IBM/Lenovo T43p laptop. However, although my desktop could see the laptop on the network, the laptop could not see the desktop machine. Which meant I could not print from the laptop or share files. No good.

    Then I tried to synch my Pocket PC and Smartphone with the desktop computer using Windows Mobile Device Center, which is in Beta 3. Neither device synched. No good.

    So I have now decided to punt on Vista until more drivers come out and more of the add-on software is finished. The consumer launch of Vista is end of January I believe, so using it full time right now is a bit premature.

    I will continue to play with it, but it is just not ready for me to use full time. :(

  • Setting security for VSTO Addins as part of the install

    Last night I presented VSTO 2005 Second Edition to the Utah .NET User Group. I built a simple Word application level add-in and we then talked about deploying it. And that immediately led us to talking about security.

    VSTO overrides the default CLR security policy, which is that all code running in the My Computer zone has FullTrust. This is fine for a .exe. You double click on a .exe file and you are explicity granting permission for code to run. But if you open a Word doc or Excel workbook or mail message, you are not necessarily granting permission for code to run. Therefore, the VSTO runtime requires you to explicitly grant permission to a customization.

    In a demo, you can do this with caspol from the Command Prompt or you can do it with the graphical .NET Framework 2.0 Configuration tool. But when you deploy to users, you would like the security permissions to be added as part of the install.

    When you create a VSTO add-in, VS adds a Setup project. However, the install package you build does not add a security policy for the add-in. You can add a custom action to the Setup project to grant permission. To do that:

    1. Add a new Class Library project to the VSTO add-in solution.
    2. Add an Installer class to this project.
    3. In that class, add code to assign permissions. (Check out a very good example of this class code on Mads Nissen's blog - both VB and C# versions).
    4. Build that project.
    5. Use the Custom Action editor to add a custom action. In the Install node, add the primary output (the DLL) from the installer class library.
    6. Build the Setup project.
    7. Run the install and voila, your add-in is installed and has permission to run.

    The solution in the attached zip file is the VB version of the Word add-in, the installer project and the Setup project.

     

    Posted Dec 15 2006, 11:01 AM by RGreen with no comments
    Filed under:
  • Moving Development Work to Vista, Part 2

    Before moving on to SQL Express SP2, I decided to finish with VS by installing the Pocket PC and Smartphone 5.0 SDKs. On XP, you need to install ActiveSync first. So I started to install ActiveSync 4.2 and, what do you know, ActiveSync is blocked on Vista.

    I found the Windows Mobile Device Center here. It is the Beta 3 Release for Vista RC1. I installed it.

    I also notice that with this you can synch content with a Windows Mobile 2003 or 5.0 device. So, my Pocket PC running version 4.20.0 that syncs fine on XP won't synch on Vista, eh? Good to know.

    So then I started installing the Pocket PC SDK and it complained that ActiveSync 4.0 is not installed on the computer and is required. You can ignore that message, which I did. The install of that SDK, and the Smartphone as well, went fine and I could create a simple device application.

    Posted Dec 06 2006, 11:54 AM by RGreen with no comments
    Filed under:
  • Moving Development Work to Vista

    Now that it has shipped, it is time to move to Vista for my primary development work. My plan is to use Vista and Office 2007 on a daily basis on both my desktop and laptop, and to have secondary drives with XP and Office 2003. Yesterday, I started with the desktop.

    I installed Vista Ultimate on a clean drive. And of course, I once again forgot that IIS is not installed by default, even though I have installed Windows 10-15 times since this became the default. Happily, SQL Server and Visual Studio remind me of this when I install them.

    When you turn on the IIS feature in Vista (notice that you turn this feature on, you don't install it Smile), don't forget to also turn on the Web Management Tools feature. IIS 7 ships with Vista and has a snazzy new UI for IIS Manager. Also, check out www.iis.net, Microsoft's IIS site. Lots of good articles there.

    Next, I installed SQL Server 2005, which incorrectly informed me that IIS was not installed. Who are you going to believe, your own eyes or some dialog? Shortly thereafter, I got this message:

    It turns out that SQL 2005 is not supported on Vista without SQL SP2. That's fine. SQL shipped a year ago and I will happily install a Service Pack. However, SQL SP2 is not done yet. It is only available as a CTP (Community Technical Preview). I know that Vista just shipped, and I know that very few people are rushing to put it into production in the first month, but I would have thought that Microsoft's flagship database would be ready to go when Microsoft's flagship OS was done. Maybe I'm just being nit picky and impatient.

    Tossing aside my concerns about using CTPs and my desire to use only shipping software, I finished the SQL install and installed SP2 CTP. It too incorrectly told me IIS was not installed. It also displayed this message:

    Prior to Vista, if you were an admin on your computer, you could be an admin on SQL Server using Windows Authentication. However, in Vista, this only happens if you are running as an admin with elevated privileges, which is not the default and is discouraged. So when you install SP2, you should expliciltly add yourself as a SQL admin. Check out the SP2 readme for more info on this.  

    SQL is now installed. Next up is Visual Studio. Once again, there are compatibility issues.

    These issues are being addressed in VS 2005 SP1, which is in non-public beta right now.

    I will post an entry around VS 2005 and Vista soon, but for now, I'll wrap this up. VS installed and then I installed Visual Studio 2005 Tools for Office Second Edition. I still need to install SP2 for SQL Express, which I will do today.

    I'll keep you posted on what I find and how development life in Vista goes.

    Posted Dec 06 2006, 09:11 AM by RGreen with no comments
    Filed under:
  • VSTO 2005 Second Edition talk at Sydney .NET User Group

    This past Friday I spoke at the Sydney .NET Users Group. The topic was Developing Office 2007 Solutions with Visual Studio Tools for Office Second Edition. First, I would like to thank Adam Cogan for organizing this talk. Second, I would like to thank the folks that came out on a Friday night to hear me talk.

    Because my wife and I had jam packed our Australian vacation, we were only available to speak on a Friday night. From the user group's perspective, an attendance of about 40 people was very low. From my perspective, that was a pretty good sized crowd. I am used to speaking to way less than that.

    You can find the slides and demos for the talk here.

  • Me on Channel 9

    My wife and I just came back from a whirlwind tour of some of Australia (Sydney, Cairns, Gold Coast and HunterValley). While in the Gold Coast, we stayed with my good buddy Chuck Sterling. He taped a Screencast with me and posted it on Channel 9.

    The screencast was taped with my Sony DCS-P8 digital camera. Chuck then converted the mpeg to a wmv using Windows Media Encoder. It was shot in his dining room and I am in the shadows. Also, the sound isn't that good. I am listening to it now with full volume and can barely hear it. So far, 407 people have viewed it. No comments yet.

    Addendum: There is nothing wrong with the sound in the video. It was a hardware issue with my computer.

     

  • Let the blogging rebegin

    I, Robert Green, being of relatively sound mind and sound body, promise to start blogging on a regular basis and continue, starting right now.
© Copyright MCW Technologies, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems