MSDN Blog Postings

via RSS Feed

Archive for May, 2008

Windows HPC @ TechEd 2008

Posted by on 31st May 2008

clip_image001

 

Heading to TechEd 2008?  Discover some of the exciting technologies the HPC Server 2008 team is working on.

Developer Week Sessions

INF301 Application Development for High Performance Computing on the Windows Platform, June 5, 10:15AM - 11:30AM, S230A    

INF302 Parallel Computing and HPC Technologies @ Microsoft, Wednesday, June 4 10:15AM - 11:30AM, S220A

ITPro Week Sessions

SVR57-TLC Introducing Windows HPC Server 2008, June 11, 12:00PM-12:45PM

SPC451 Black Belt in Optimizing High Performance Computing Applications for Windows HPC Server 2008, June 12, 1:00PM-2:15PM, N310E

SPC351 Advanced Management and Deployment, June 13, 10:15AM-11:30AM     

SPC450 Advanced SOA-Based Scheduling with Windows High Performance Computing Server 2008, June 13, 4:30PM-5:45PM, S310C


This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off

How To: Use Macros to Configure Publish Settings

Posted by on 31st May 2008

There are all sorts of publishing properties available to the Visual Studio developer. Visual Studio tries to set the properties to reasonable default values. But with all things that are defaulted, the values are right for some people, but wrong for others. In my day-to-day work, where I run through publishing quite a bit, there are quite a few values I want to reset. Its possible to click through the UI to change the values, but who has a couple of seconds to spare to open dialogs and click on stuff? Not I; every second lost is a second I could spend writing a blog entry. Fortunately, its easy to create a macro that will set these values for you. In this post, I’ll write about you can use a macro to set these default values through the DTE.

Displaying publish properties and values

Let’s start by viewing all available publishing properties. Before going too far, let’s show some helper functions to accomplish our tasks. Here is some code I copied from my macro explorer:

Function GetPublishProperties() As EnvDTE.Properties
    Dim proj As Project = DTE.Solution.Projects.Item(1)
    If proj Is Nothing Then
        ShowError("Unable to retrieve a project", "GetPublishProperties")
        Return Nothing
    End If

    Dim publishProperty As EnvDTE.Property = proj.Properties.Item("Publish")
    If publishProperty IsNot Nothing Then
        Dim publishProperties As EnvDTE.Properties = TryCast(publishProperty.Value, EnvDTE.Properties)
        Return publishProperties
    End If

    ShowError("Unable to get publish properties of project " & proj.Name, "GetPublishProperties")
    Return Nothing
End Function

Sub ShowError(ByVal message As String, ByVal title As String)
    MsgBox(message, MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly, title)
End Sub

Sub ShowException(ByVal ex As Exception, ByVal methodName As String)
    Dim message As String = ex.Message
    If ex.InnerException IsNot Nothing Then
        message = ex.InnerException.Message
    End If
    ShowError(message, methodName)
End Sub

GetPublishProperties is a function to retrieve the object which contains the publish properties. It grabs the first project in the solution, and selects the "Publish" property from there. Next, the resultant property value is converted to another properties container. Some error handling is also included (although probably not enough).

With that as a baseline, this macro will show all of the publish properties, types, and values:

Sub ShowPublishProperties()
    Dim publishProperties As EnvDTE.Properties = GetPublishProperties()
    If publishProperties IsNot Nothing Then
        Dim sb As New System.Text.StringBuilder()
        For Each prop As EnvDTE.Property In publishProperties
            sb.Append(String.Format("{0} [{1}]: {2}", prop.Name, prop.Value.GetType().ToString(), prop.Value.ToString()))
            sb.Append(vbCrLf)
        Next
        MsgBox(sb.ToString())
    End If
End Sub

This macro simply iterates through all of the publish properties, gathers the property names, types, and values and show them all in a message box. Here is a subset of the output:

PublisherName [System.String]:
OpenBrowserOnPublish [System.Boolean]: True
BootstrapperComponentsLocation [System.Int32]: 0
PublishFiles [System.__ComObject]: System.__ComObject

Most of the values are strings, ints, or booleans. If you were to look in the project file, you would see that these values correspond to properties within the file. The exception are PublishFiles and BootstrapperPackages, which correspond to the Items in the project file, as well as the the lists within the Application Files dialog and Prerequisites dialog. These will be explored further in a bit. But first, let’s try setting some easy values.

Setting Property values

Setting a value is as easy as reading a value. For example, to set the PublisherName property, one could write a macro like this:

Sub SetPublisherName()
    Dim publishProperties As EnvDTE.Properties = GetPublishProperties()
    If publishProperties IsNot Nothing Then
        Dim publisherNameProperty As EnvDTE.Property = publishProperties.Item("PublisherName")
        publisherNameProperty.Value = "Test Value"
    End If
End Sub

Some properties perform validation when the values are set. For example, the PublishUrl:

Sub SetPublishUrl()
    Dim publishProperties As EnvDTE.Properties = GetPublishProperties()
    If publishProperties IsNot Nothing Then
        Try
            publishProperties.Item("PublishUrl").Value = ""
        Catch ex As Exception
            ShowException(ex, "SetPublishUrl")
        End Try
    End If
End Sub

In the above example, an attempt is made to blank out the PublishUrl property. However, the PublishUrl can not be set to an empty string, as the thrown exception indicates:

An empty string is not allowed for property 'Publish Location'.

The thrown message uses "Publish Location" because that is what the label for the text box which corresponds to this property uses. In fact, the property page is pretty much setting this property in the exact same manner as the macro.

Modifying Items

There are 2 different types of Items exposed by the Publish

Properties: PublishFiles and BootstrapperPackages. Here is a macro that does something with PublishFiles:

Sub ListFiles()
    Dim publishProperties As EnvDTE.Properties = GetPublishProperties()
    If publishProperties IsNot Nothing Then

        Dim filesObject As Object = publishProperties.Item("PublishFiles")
        If filesObject Is Nothing Then
             ShowError("Could not get PublishFiles object", "ListFiles")
            Return
        End If

        Try
            Dim numFiles As Integer
            numFiles = filesObject.Value.Item("Count").Value
            Dim sb As New System.Text.StringBuilder()
            For i = 0 To numFiles - 1
                ‘display file name and publish status.
                sb.AppendLine("File Name=" & filesObject.Object.Item(i).Name & ", Status=" & filesObject.Object.Item(i).PublishStatus)
            Next
            MsgBox(sb.ToString(), MsgBoxStyle.DefaultButton1, "Application Files")
        Catch ex As Exception
            ShowException(ex, "ListFiles")
        End Try
    End If
End Sub

This macro relies on latebinding in doing its work: filesObject is declared as Object, yet it uses properties from that object. The filesObject.Object contains an accessor to a collection; there are actually 2 ways to get a value out of the collection: one could use either a string to get a file by name, or an index, like what was done above. Here is some sample output from running this macro:

File Name=WindowsApplication2.exe, Status=0
File Name=WindowsApplication2.pdb, Status=0
File Name=WindowsApplication2.xml, Status=0 

The "Status" of the file corresponds to the Publish Status column in the Application Files dialog. 0 corresponds to the "(Auto)" value.

Accessing the bootstrapper packages is similar:

Sub IncludeAllPrerequisites()
    Dim publishProperties As EnvDTE.Properties = GetPublishProperties()
    Dim bootstrapperPackages As Object = publishProperties.Item("BootstrapperPackages")
    If bootstrapperPackages IsNot Nothing Then
        Dim numPackages As Integer = bootstrapperPackages.Value.Item("Count").Value
        For i As Integer = 0 To numPackages - 1
            bootstrapperPackages.Object.Item(i).Install = True
        Next
    End If
End Sub

Sub ExcludeWindowsInstaller31()
    Dim publishProperties As EnvDTE.Properties = GetPublishProperties()
    Dim bootstrapperPackages As Object = publishProperties.Item("BootstrapperPackages")
    If bootstrapperPackages IsNot Nothing Then
        Dim windowsInstaller31Package As Object = bootstrapperPackages.Object.Item("Microsoft.Windows.Installer.3.1")
        If windowsInstaller31Package IsNot Nothing Then
            windowsInstaller31Package.Install = False
        End If
    End If
End Sub

The first macro includes all available prerequisites when publishing. In the first example, the packages are accessed by index. The second example gets a bootstrapper package by using a specific product code.

Publishing via a macro

Finally, just like it is possible to build from a macro, it is possible to publish as well. Here is an example that does something similar to what the Publish Now button does on the Publish property page:

Sub Publish()
    Dim proj As Project = DTE.Solution.Projects.Item(1)
    Dim sb2 As EnvDTE80.SolutionBuild2 = CType(DTE.Solution.SolutionBuild, EnvDTE80.SolutionBuild2)
    Dim config2 = CType(sb2.ActiveConfiguration, EnvDTE80.SolutionConfiguration2)
    Dim configName = String.Format("{0}|{1}", config2.Name, config2.PlatformName)
    sb2.BuildProject(configName, proj.UniqueName, True)
    sb2.PublishProject(configName, proj.UniqueName, True)
End Sub

Ideally, the macro should verify that the build succeeded before publishing, but that has been left as an exercise for the reader.
This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off

Posted by on 31st May 2008


This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off

Looking for SP1 Beta document?

Posted by on 31st May 2008

I got couple of questions about the MSDN Library for Visual Studio 2008 Service Pack 1 Beta from users.
MSDN Offline Library is not included in the VS2008 SP1. The Beta doc is available online only.


VS2008 SP1 Beta documentation
http://vs2008sp1docs.msdn.microsoft.com/en-us/default.aspx


 


This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off

Certification Wars

Posted by on 31st May 2008

I started diving in the late 70’s, and in1985 I became a PADI certified open water scuba instructor. In those days, scuba instruction involved a lot of classroom time discussing various concepts that impacted human physiology such as Boyle’s Law, Dalton’s Law, Haldane’s Princple, and also immediate responder first aid for scuba diving related maladies (most doctors are not trained in hyperbaric medicine and divers were generally more aware of potential symptoms of DCS as compared to most doctors). The training at the time emphasized in-depth knowledge of the theory of diving as well as repetitive practicing of fundamental and critical skills in controlled environments (usually a swimming pool) and ‘real-world’ environments (the open water). Certification entailed successfully completing multiple written examinations as well as demonstrated competence in the water.

I remember those early days when PADI and NAUI instructors would compete for students, and many instructors would ridicule other certification agencies while claiming the agency they supported to be superior as compared to the others. Some instructors would completely denounce other certifications as inadequate or claim that those certifications were not accepted worldwide, or make some other malicious attacks based on ignorance and their own personal motives.

Of course, we know that some people are incapable of thinking on their own, or they are easily persuaded with scare tactics, and some simply blindly follow the bloviatied jabberwocky of  charismatic people. But, most intelligent people who are capable of processing cognitive rational thoughts are able to see through the prevarication and realize the hypocrisy of people who lambaste some certifications while selflessly pander their own certification.

My personal views on certifications in software testing haven’t changed. I can see both the perceived benefits of certifications by employers as well as the limitations of certifications. For example, certifications in software testing or other professional disciplines are generally based on knowledge of the discipline rather than on the ability of a person to perform a particular task.

But this is really no different than other professional organizations. For example, it is possible to get a certification (Juris Doctor) to practice law in California without ever having gone to law school or presenting a case before a judge under the tutelage of a mentor. And a person only has to drive Interstate 5 through Seattle to know that the Washington state certified engineers who completed their requirements for certification succeeded in concocting a major transportation boondoggle. Perhaps the hundreds of successful major corporations in Europe and elsewhere around the world see the value of a well-established testing certifications such as the ISTQB and ASQ for their ability to help professional testers effectively communicate using a common discipline jargon rather then constantly coming up with confusing neologisms. (Of course, all these successful organizations could be wrong…but I tend to think they are successful because the  influential decision makers in those companies make the right decisions most of the time regardless of what some external person with a limited perspective or an idealistic neophyte thinks. Perhaps that’s why they are successful!)

Of course, it would be ideal for certifications in our industry to also include practical skill-building exercises that taught testers how to test a product using various techniques and approaches, and certification required both practical demonstration and in-depth knowledge of the discipline. This doesn’t simply mean that we teach people to find bugs by banging on the GUI, or asking ‘probing’ questions such as should a button control enlarge when a user mouse’s over it. (Please…finding bugs is really not that hard, and if I wanted to know if a button control should enlarge or can enlarge I would look at the button properties for that control rather than sit there and ponder the question for 5 minutes.)

While I would like to see certifications include skill based learning along with teaching in-depth knowledge, we should also realize there are potential limitations with practical skill-building exercises. For example, in our own training we can assess if an individual learns to correctly apply a systematic procedure to design effective tests after in-depth analysis and logically decomposing a feature area or data set for a simulation used in our training. The concepts and application of some approaches and techniques such as combinatorial analysis are applicable across multiple software projects within appropriate contexts. So, we  instruct our SDETs to identify the well-defined contexts in which certain approaches or techniques are appropriate and when they are not, and we also explain how they are sometimes misused so they don’t also fall into the same traps that untrained people fall into. However, current certification schemas can not yet accurately assess how well a person will perform on a real project until that person is put into that situation. This is true of software testing just as much as it is true of scuba diving.

Fortunately in scuba diving the certification wars are mostly in the past. But, it seems the testing certification wars are heating up. Today, certifications are valued in some business sectors for various reasons. I suspect some new certifications will come along and claim some great benefit beyond the others. And perhaps they will, or perhaps they will be isolated communities of zealots who want to simply be different. I just find it rather Pecksniffish for any person to claim all certifications are bogus; of course except for the one in which he or she has some personal vested interest.


This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off

Highlander to be re-made

Posted by on 31st May 2008

Slightly off topic but sci-fi enthusiasts, like myself, will be pleased to read the following Scotsman report:

“the original film is to be remade, featuring a £25m budget, stars of the calibre of Ewan McGregor and James McAvoy, Scottish locations and a screenplay from the writers of current superhero hit Iron Man”

Awesome!

image

Hopefully we will see some new technology innovations….


This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off

Tech Ed Booth Duty Schedule

Posted by on 31st May 2008

Our booth duty schedule has been finalized for Tech Ed next week.


If you’re coming to Tech Ed and want to chat with one of us, here are the times we’ll be manning the Visual Studio Extensibility booth.












































Timeslot


Tuesday, June 3


Wednesday, June 4


Thursday, June 5


Friday, June 6


8:30 AM - 12:00 PM


Mariano Blanco


Gearard Boland


Gearard Boland


Gearard Boland


Quan To


Mariano Blanco


 


Mariano Blanco


11:45 AM - 2:45 PM


Gearard Boland


Quan To


Mariano Blanco


Quan To


Terry Clancy


 


Quan To


Terry Clancy


2:30 PM - 6:00 PM


Mariano Blanco


Mariano Blanco


Gearard Boland 


Gearard Boland


Quan To


Terry Clancy


 


Quan To


You’re welcome to talk to Mariano, Gearard, Terry, or myself about anything.  In case you have specific things in mind to ask us and want to talk to a particular person, here are our roles:



  • Quan - Program Manager

  • Mariano - Developer

  • Gearard - Developer in Test

  • Terry - Business Development Manager

*Times and people are subject to change.


This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off

Testing

Posted by on 31st May 2008


This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off

Microsoft innovation center opened in Hanoi

Posted by on 31st May 2008

Phòng học của trung tâm

Chụp ảnh cùng TGĐ MSVN, GS Huy, trung tướng Đỗ Xuân Thọ  và Anh Thi Viện trưởng viện CNTT

 

Microsoft innovation center là nơi phục vụ công tác nghien cứu sáng tạo các giải pháp công nghệ của Microsoft , trung tâm là sản phẩm hợp tác giữa Microsoft và viện CNTT , địa chỉ 18 Hoàng Quốc Việt Hà nội. Tham dự lễ khai trương có đông đảo đại biểu đến từ các bộ nghành, cơ quan, doanh nghiệp và các trường đại học ở Hà nội


This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off

Going to TechEd

Posted by on 31st May 2008

I’ll be in TechEd at the Visual Studio Team Architect demo station.


See you there.


 


This post originated from and is provided by the MSDN Blogs RSS feed. The original post of the article can be found here.

Posted in MSDN Blogs | Comments Off