none
Getting ProjectStart in C# always returns null RRS feed

  • Question

  • I'm relatively new to C# and VSTO, so I'm hoping this is an easy question, but I just haven't been able to figure out an answer.

    I've got a Project Add-In that is a C# project.  I'm trying to base some calculations off of the ProjectStart date (known to be filled out and valid), which seems like it should be an easy thing, but the ProjectStart property of this.Application.ActiveProject always returns null.  The odd thing is that if I add a watch to the project and drill down in Visual Studio, I do see that the dynamic property has a Date value and the value is valid.  Anybody know how my code can see what the debugger sees?

    This is in Project 2010, Visual Studio 2010 Ultimate, Windows 7.

    Thanks in advance for the help!

    -Rob Blau

    Thursday, April 5, 2012 5:05 PM

Answers

  • I hope all software has the latest Service Packs? If not you need them.I found a number of small annoying bugs when trying to use C# and VSTO, including some fields not returning the data I expected.

    As a work around you can try instead looking at the Start date of Task 0 for that project. This should be the same value.


    Rod Gill

    The one and only Project VBA Book Rod Gill Project Management

    • Marked as answer by Rob Blau Friday, April 6, 2012 4:47 PM
    Friday, April 6, 2012 6:23 AM
    Moderator

All replies