Pages

Friday, April 29, 2011

The 'My' Namespace in a VB.NET Application is Missing Members

OK I ran across this little snag in a VB.NET application, and thought I might share an easy solution to the problem. If you ever have a .NET solution that originated in a previous version other than 2010 and has been upgraded, you might have some difficulty accessing members of the 'My' namespace. Specifically I was missing the auto generated 'MyWebExtensions.vb' code file displayed below:


This resulted in the "'Application' is not a member of 'My'" error:


There are probably a few tricks you could make to the solution (.sln) file by opening it in Notepad and fixing the appropriate settings, but the easiest way to fix the error is to remove the 'My' extension and add it back into the project. To do this open the project's properties of the project where the error is occurring, and click on the "My Extensions" tab.


The 'My' extension you need for your project is dependent on the type of project you have created (Web, WPF, etc.), so make sure to select the proper one when re-adding. First though, right-click the current extension already added and select “Remove Extension”


Then press the "Add Extension" button in the bottom right-hand corner, and add the appropriate extension back into your project. This should auto-generate the 'MyWebExtensions.vb' code file and fix any previously non-accessible members in the 'My' namespace.


For more information on the 'My' namespace, check out the (2) MSDN links below:

My Namespace

How My Depends on Project Type (Visual Basic)

Thursday, April 28, 2011

Honored to Receive the "Microsoft Community Contributor Award"

I received a wonderful email today that I have been recognized with the 2011 "Microsoft Community Contributor Award"! This entry is not to toot my own horn, but rather to say thank you to Microsoft for the recognition. I have used Microsoft products and software almost my entire life, and now am very proud to make my career and hobby in software engineering revolve around Microsoft and the .NET Framework technologies. As I continue to hone and grow my own skills, I will continue to share and contribute that knowledge to help others in our community in whatever way I can. It might be a small token of recognition, but one that I am proud and happy about. Thank you Microsoft.