-
Reflection on .Net objects is done through System.Type and is very easy. For instance, "Dim type = GetType(System.String)" and now you can look at all the members and inheritance hierarchy of the System.String class.
Reflection on COM types is also easy if they have an interop assembly. For instance, add a project reference to the COM Microsoft Speech Library and again do "GetType(SpeechLib.SpVoice)". This lets you reflect on the .Net "Runtime Callable Wrapper" that's in the interop assembly, that was generated from the COM type's type library, and that contains all information that the type library had.
But sometimes you'll be given COM objects that don't have .Net interop assemblies in your code. I ran into this when I wrote a managed plugin for Visual Studio. For reflection here you have to use ITypeInfo instead of System.Type. Here's code to get that ITypeInfo, then dig through it and print out all the members. I'm a novice at COM programming, so I'd welcome suggestions and improvements.
....
[ the rest of this post is on my new vblog, http://blogs.msdn.com/lucian ]
-
Bill Burrows, VB MVP, has released some great videos on the ASP.Net Dynamic Data features that were added in VS2008 SP1. What is Dynamic Data?
"ASP.Net Dynamic Data provides a framework that enables you to quickly build a functional data-driven application, based on a LINQ to SQL or Entity Framework data model. It also adds great flexibility and functionality to the DetailsView, FormView, GridView, and ListView controls in the form of smart validaton and the ability to easily change the display of these controls using templates."
Bill's videos demonstrate the variety of tasks and customizations that you can do using this framework.
http://www.myvbprof.com/2007_Version/Dynamic_Data_Tutorial.aspx
-
Continuing the community interviews from our Italian Visual Basic MVP Alessandro Del Sole, this time we interview Jonathan Aneja, VB Compiler Program Manager.
Remember that you can take a look at the Visual Basic Team page for pictures and bios and visit the home page of the Visual Basic Developer Center for a link to all these interviews as well.
Here's the interview with Jonathan:
1. Nice to meet you Jonathan Aneja! Let’s begin by asking a simple question: where are you from?
Toronto, Ontario – one of the few places in Canada that’s actually *south* of Seattle :-)
2. We all know that you’re a Visual Basic Team member, but could we know something more about your role inside the Team?
I work on the compiler/runtime as a “Program Manager” (yeah, I don’t know what that means either :-)). Every week’s different, but typical stuff would include writing specs and taking notes in our language design meetings, dogfooding the product a lot to find bugs, prototyping features, and working with teams like ASP/MSBuild on how the compiler integrates with them. Even did some test automation back in Orcas!
I think the most important part of the PM role is understanding the customer and being able to “think like a VB developer”. Thankfully I’ve always been one – used every version of the product other than VB2 and VB5!
3. What’s your favorite Visual Basic feature regarding the language and/or the IDE?
Probably the background compiler. Case insensitivity too :-)
4. How long have you been working for Microsoft and what was your occupation before joining the VB Team?
Graduated in June 2005 and started as a contractor working in ISV Advisory Services. After about 9 months of that I moved out here to Redmond to join the VB team – 2.5 years and counting so far…
5. Why do you think VB is such a great language?
I think it’s really approachable and readable. It uses simple English terms like “Or” rather than requiring a beginner to learn a symbol like “|”. The IDE provides a ton of productivity features like Error Corrections and an amazing IntelliSense experience. The VB App Framework provides things like the My Namespace and application-level events automatically instead of making you wire all that up.
Features like “Handles” give you a powerful way to deal with events while abstracting away more advanced concepts like delegates. There’s still full support for delegates when you need to dive deeper, but for the simple case it reduces the concept count that the developer has to deal with. That’s a big part of the language’s philosophy: keep the number of concepts you have to remember low. This lets you focus on actually solving your business problem instead of learning every nuance of the compiler.
6. Have you ever been to Italy?
No but I’d love to visit someday :-)
7. Would you like to tell us something about your life outside the office (how do you like to spend your free time, what do you like to do when/if you go out in the evening or when you’re at home and so on)?
I really like Basketball, strategy board games (Settlers, Powergrid, Risk etc), and music. I’m also really interested in solutions to 3rd world poverty and organizations likes Compassion International.
8. Who is your favorite musician?
Impossible to pick just one, but I’ll try to keep it to three: Chris Tomlin, Hillsong, and Casting Crowns
9. What’s your favorite food?
Chicken Tikka Masala
Thank you very much for taking time to answer these questions and letting us know something more about you!
-
Bart and Lisa Simpson - well actually, Bart de Smet and I recorded an interview about the .Net Managed Languages. :) You can find that interview on the TechEd Online South Africa library page. Otherwise, you can also launch the video directly from here. Below is the abstract from our discussion:
.NET, A Multi-Language Platform
In this talk, Lisa Feigenbaum and Bart de Smet introduce the Microsoft language portfolio and discuss WPF, new features in Visual Basic and Visual C#, and provide answers to questions they receive on Microsoft's developer tools and languages.
Bart de Smet is a developer on the Microsoft Windows Presentation Foundation team. Bart blogs on a variety of topics, including Visual Basic.
-
The VB Catch syntax has a unique feature: When. It allows users to filter expressions based on something other than their type. Any arbitrary code can enter a When block to decide whether or not to handle an Exception.
Sub Sub1()
Try
DoSomeAction()
Catch ex As Exception When Filter(ex)
Stop
End Try
End Sub
Newsgroups often ask, "Why's this so special? I could effectively get the same behavior out of C# by doing the following:"
static void Sub1()
{
try
{
DoSomeAction();
}
catch (Exception ex)
{
if (Filter(ex))
{
throw;
}
HandleException();
}
}
This is true to an extent. In both cases the code is handling an exception and making a decision, via calling Filter, as to whether or not to handle the exception. The subtle difference is when the Filter method is called.
In VB the When statement is actually implemented as an IL exception filter. When an exception is thrown, exception filters are processed before the stack is unwound. This means that if the Filter method created an error report that included the current stack trace, it would show the frame in which the exception occurred.
For example, in the code above if DoSomeAction() threw and the stack was examined in the Filter expression, the following stack would show up.
Notice how the DoSomeAction method is clearly visible? This is incredibly powerful for features like error reporting and investigation. It also allows you to set powerful breakpoints where the exact state of the error can be examined and not just the post mortem.
Alternatively, code executed in the C# block will occur after the stack is unwound. As long as you're not in optimized code you can usually use the stack trace properties to get the source of the exception, but you won't be able to examine the live state of the error.

-
Continuing the community interviews from our Italian Visual Basic MVP Alessandro Del Sole, this time we interview Lisa Feigenbaum, now a Visual Basic Community Program Manager! Cool!
Remember that you can take a look at the Visual Basic Team page for pictures and bios and visit the home page of the Visual Basic Developer Center for a link to all these interviews as well.
Here's the interview with Lisa:
1. Nice to meet you Lisa! Let’s begin by asking a simple question: Where are you from?
Los Angeles, California
2. We all know that you’re a Visual Basic team member, but can you tell us something more about your role inside the team?
My current role is Community Program Manager. This means that I get to work on team community activities, including the MVP program, the VB team blog, conferences, and more. I find ways to get the product team involved in community activities, and help make sure we are satisfying our *large* user base of Visual Basic developers. :-) I also work very closely with Beth Massi who runs the VB online community activities, including the VB Dev Center.
Before my current role, I spent several years as Program Manager for the Editor and Debugger. This included fun features like intelliSense, code snippets, edit-and-continue, and more.
3. What’s your favorite Visual Basic feature, in the language and/or the IDE?
First, let me tell you that everyone is biased on this question. :-) I predict that every team member will suggest his or her own feature (except for the ones that try to prove me wrong!) Here is a video that Beth conducted with the language design team, where this very same incident occurred!
Following with that prediction, my favorite Visual Basic feature is intelliSense. It saves you typing, it saves you time, and it helps prevent errors before they happen – it’s the quintessential VB productivity feature!
4. What makes VB a great programming language?
What makes VB great is really the whole experience – the language, IDE, and tooling support combined. It’s the RAD drag & drop, it’s the background compiler instantly reporting errors and warnings, it’s the prettylister that inserts your parens, the dropdowns to insert event handlers, it’s the With statement, it’s XML literals, it’s the awesome query support, and more! It’s the language that lets you achieve your maximum productivity.
5. What brought you to Microsoft, and how long have you been working there? What was your occupation before joining the VB team?
Maybe first I should answer what brought me to software… My M.S. & B.A. degrees are in Applied Mathematics, so my first exposure to programming was in math and engineering classes, where we used Matlab, Mathematica, Maple, and Python. There were several occasions for programming. One was to visualize solutions to engineering problems in some kind of UI. Another was to compute results from the discrete models we approximated for analog equations, using numerical analysis. Outside of school, I did a series of internships that were software-related: a website for the Caltech seismology department, cardiology software for Cedars-Sinai hospital, and visual effects for Digital Domain.
When talking with Microsoft recruiters, I was very interested in the company and in the role. I liked the fact that Microsoft brings together so many different industries. I like that the Program Manager role involves both design & technical work, opportunities for creativity, and lots of people interactions, both internally and customers. I was very happy to work on Visual Studio. I remember my experience senior year when they finally let us use VS for the first time our school projects, and I was so thrilled by the product! Tasks that used to take 10min were reduced to 1 or 2. Very cool product.
I’ve been on the VB team for 4 years now, and just celebrated my anniversary by bringing 4 batches of home-made banana muffins for the team!
6. What’s it like working for Microsoft?
Exciting! So many technologies and industries to keep up with. So many smart & analytical people to work with. So many great opportunities to learn, grow, and make a difference. I’m not bored yet. :-)
7. Tell us something about your life outside of the office (how do you like to spend your free time, when you go out, when you’re at home, etc.)?
I love playing softball, tennis, skiing, swimming, running, camping, traveling, making art, karaoke, and dancing.
8. Who is your favorite musician?
Dave Matthews band, Fiona Apple, Mariah Carey, Blackstreet, Jurassic 5, Justin Timberlake, Nelly – those are a few that I like. Pop, hip hop, and salsa are my favorite genres.
9. What’s your favorite food?
This is a tough question because it is always changing… I usually eat my favorite food too often, then get tired of it and need to find a new one! Growing up, Italian was always my favorite. When I lived in Boston, I got really hooked on Indian and Thai. Since working at Microsoft, my favorite has been Mexican. But now I am also really into Vietnamese!
10. Have you ever been to Italy?
Yes! It was excellent. :-) I traveled during a week-long spring break while I was in college. I visited Rome, Florence, Naples, and Venice. Rome was probably my favorite, with so many exciting historical sites to see; Florence was absolutely beautiful – I enjoyed the museums there too; Naples had great pizza; and Venice the unique canal system. I used to do a lots of glass art in high school, so it was really interesting for me to see all the glass blowing shops in Venice. Of course, every city had great food and wine, too!
Thank you very much for taking time to answer these questions and telling us more about you!
-
There are a bunch of great How-Do-I videos on the http://silverlight.net site to get you started! There are four different categories of videos, and they all include Visual Basic code available for download.
Silverlight 2 Basics
Controls
Web Services and Data
Data
-
Most XSLT programmers are familiar with this XSLT transform to copy an XML file.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
This XSLT is commonly used for identity transforms as it allows you to copy an entire XML document and “touch” each XML node and attribute. If you add a matching template, then you can transform just that attribute or node that has a match in place. Unmatched nodes and attributes are simply copied.
We can also do this in Visual Basic with XML Literals (including LINQ to XML and XML Axis Properties). Our VB code will allow us to “touch” each node or element by recursively navigating through an XML document based on the following pseudo-code:
Starting with the root element, perform the following whenever you encounter a node
If the node is an element
If the element has attributes, transform or copy each attribute
If the element has child nodes, transform or copy each node
If the node is text, transform or copy the text
If the node is CData, transform or copy the CData
If the node is a comment, transform or copy the comment
If the node is a processing instruction, transform or copy the processing instruction
For this cookbook entry, we’ll create an abstract (MustInherit) base class that performs this pseudo-coded recursive navigation of an XML document. We can then create a class that inherits from that base class to perform specific transforms. First, we’ll create the abstract class and the “starting point,” a function called Transform that takes the XML document (XDocument) to be transformed as input and returns the transformed document.
Public MustInherit Class VBXmlTransform
Public Overridable Function Transform(ByVal xmlDoc As XDocument) As XDocument
Return <?xml version="1.0" encoding="utf-8"?>
<%= ProcessElement(xmlDoc.Root) %>
End Function
End Class
Next, we add the logic that is called for each XML node (XNode) encountered. This includes elements, text, CData, and so on. Our code needs to determine the type of XML node and call the related function to transform or copy the node type and return the result, which is either a copied or transformed node. This method is called ProcessNode and is shown here.
Public Overridable Function ProcessNode(ByVal xmlNode As XNode) As XNode
' This method ignores DTD (XDocumentType) content.
Dim nodeType = xmlNode.GetType()
' Because XCData inherits from XText, check for the XCData type before checking
' for XText.
If nodeType Is GetType(XCData) Then Return ProcessCData(xmlNode)
If nodeType Is GetType(XText) Then Return ProcessText(xmlNode)
If nodeType Is GetType(XElement) Then Return ProcessElement(xmlNode)
If nodeType Is GetType(XComment) Then Return ProcessComment(xmlNode)
If nodeType Is GetType(XProcessingInstruction) Then Return _
ProcessProcessingInstruction(xmlNode)
Return xmlNode
End Function
Next, we can add the strongly-typed functions that process each of the node types as well as attributes. The function to process an element is unique, so we’ll leave that out for now and cover that next. The functions to process the other node types and attributes are rather simple. Because the default behavior of the base class is to simply copy a document, each function just returns the input value. The reason that we have created this code is to provide strongly-typed functions that we can override in our inheriting class with specific behavior. Here are the strongly-typed functions (without the ProcessElement function).
Public Overridable Function ProcessAttribute(ByVal xmlAttribute As XAttribute) As XAttribute
Return xmlAttribute
End Function
Public Overridable Function ProcessCData(ByVal xmlCData As XCData) As XCData
Return xmlCData
End Function
Public Overridable Function ProcessText(ByVal xmlText As XText) As XText
Return xmlText
End Function
Protected Overridable Function ProcessComment(ByVal xmlComment As XComment) As XComment
Return xmlComment
End Function
Public Overridable Function ProcessProcessingInstruction( _
ByVal pi As XProcessingInstruction) As XProcessingInstruction
Return pi
End Function
Now let’s look at the ProcessElement function. Processing elements is unique because elements can have both attributes as well as child nodes. Those attributes and child nodes need to be transformed or copied as well, so we must provide code that calls the ProcessAttribute function for each attribute, and calls the ProcessNode function for each child node. We’ll encapsulate this code in a function called CopyElement. The ProcessElement function will look like the other strongly-typed functions, except that it will return a call to the CopyElement function instead of just the input element. The CopyElement function uses XML Literals, embedded expressions, and LINQ to XML to create the copy of the XML element as shown here.
Public Overridable Function ProcessElement(ByVal xmlElement As XElement) As XElement
Return CopyElement(xmlElement)
End Function
Public Overridable Function CopyElement(ByVal xmlElement As XElement) As XElement
Return <<%= xmlElement.Name %>
<%= From attribute In xmlElement.Attributes() _
Select ProcessAttribute(attribute) %>>
<%= From node In xmlElement.Nodes() _
Select ProcessNode(node) %>
</>
End Function
That’s the extent of our abstract class. Now we can make use of it for very simple or very complex identity transforms. Let’s see an example.
Creating a Transform
Our example will use the same source XML file that was posted with the Recipe 1 post. It has mixed content from several namespaces, providing a nice testing sample. The mixed content in our sample file is found in the <AdditionalContactInfo> element identified in the http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactInfo schema. In the additional contact info, there can be address information, which consists of three different element names: homePostalAddress, physicalDeliveryOfficeName, and registeredAddress. The addressType type has a required element named PostalCode. We can create a simple class to transform the <PostalCode> element and rename it to <ZipCode>.
First, we need to import the different schemas found in our source document. The abstract VBXmlTransform class does not need to know about these schemas, which are specific to the source document, but our inheriting class does.
Imports <xmlns="http://SampleSchema/AWContacts">
Imports <xmlns:aci="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactInfo">
Imports <xmlns:act="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes">
Imports <xmlns:crm="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactRecord">
Next, we create a class that inherits the VBXmlTransform class. In this class, called AWTransform, we override the base class and add the code to perform whatever transform we want. In this case, we’ll override ProcessElement, because we’re searching for any element named PostalCode. If we find that element, we’ll transform it. If not, we’ll defer to the ProcessElement method of the base class.
Class AWTransform
Inherits VBXmlTransform
' Rename <act:PostalCode> to <ZipCode>.
'
' Create an XName object to use for comparisons. This will perform better than comparing
' xmlElement.Name.LocalName to a string.
Private postalCodeXName As XName = _
XName.Get("PostalCode", _
"http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes")
Public Overrides Function ProcessElement(ByVal xmlElement As XElement) As XElement
Select Case xmlElement.Name
Case postalCodeXName
Return TransformPostalCode(xmlElement)
Case Else
Return MyBase.ProcessElement(xmlElement)
End Select
Return Nothing
End Function
Public Function TransformPostalCode(ByVal postalCodeElement As XElement) As XElement
Return <ZipCode><%= postalCodeElement.Value %></ZipCode>
End Function
End Class
Transforming the Document
To call this transform, we create an instance of our inheriting class, AWTransform, and then pass the source XML document to the Transform method as shown here:
Dim xmlPath = My.Application.Info.DirectoryPath & "\..\..\AWContacts.xml"
Dim savePath = My.Application.Info.DirectoryPath & "\..\..\TransformSave.xml"
Dim xmlDoc = XDocument.Load(xmlPath)
Dim transform As New AWTransform()
Dim transformedDoc = transform.Transform(xmlDoc)
transformedDoc.Save(savePath)
Other Examples
Let’s look at some other examples we could add to our AWTransform class.
The following code example shows how we can transform the content of an existing attribute. If the transform finds an attribute named date, it transforms the date value into the general date and time format.
Private dateXName As XName = XName.Get("date")
Public Overrides Function ProcessAttribute(ByVal xmlAttribute As XAttribute) As XAttribute
If xmlAttribute.Name.Equals(dateXName) Then Return TransformDateAttribute(xmlAttribute)
Return MyBase.ProcessAttribute(xmlAttribute)
End Function
Public Function TransformDateAttribute(ByVal dateAttribute As XAttribute) As XAttribute
Dim dateValue As New DateTime()
If DateTime.TryParse(dateAttribute.Value, dateValue) Then _
dateAttribute.Value = dateValue.ToString("G")
Return dateAttribute
End Function
The following code example shows how we can remove data from the transformed document. If the transform finds a CData section, it returns Nothing so that the CData section is not included in the resulting document.
Public Overrides Function ProcessCData(ByVal xmlCData As XCData) As XCData
Return Nothing
End Function
-
One of our Italian Visual Basic MVPs, Alessandro Del Sole, sent over some interview questions for the Visual Basic Team members to get our thoughts on the language and favorite features but mostly to share some of our personal interests to help you get to know us better. I also learned some fun facts about the team as well! Alessandro is also translating these interviews and posting them on the Italian Visual Basic Tips&Tricks site.
You can take a look at the Visual Basic Team page for pictures and bios of those team members who aren't shy. ;-). The home page of the Visual Basic Developer Center will also display the team photos and a link to these interviews that we'll be post here over the next month or so.
This first interview is with Paul Vick, VB Language Architect. Although Paul is moving teams to work on Oslo, he'll still continue to participate in the VB language design process and work to ensure the VB language specification is kept complete and up to date.
Here's the interview with Paul:
1. Nice to meet you Paul Vick! Let’s begin by asking a simple question: where are you from?
I’m originally from Durham, North Carolina, but I’ve lived in Seattle long enough that I consider myself more of a Northwesterner.
2. We all know that you’re a Visual Basic Team member, but could we know something more about your role inside the Team?
My main role has been the language architect, which really means three things: running the language design meetings, answering a lot of questions, and keeping the language specification up to date.
3. What’s your favorite Visual Basic feature regarding the language and/or the IDE?
I’ve worked on so many, I don’t really have a favorite. OK, maybe case insensitivity…
4. How long have you been working for Microsoft and what was your occupation before joining the VB Team?
I came to Microsoft sixteen years ago straight out of college.
5. Why do you think VB is such a great language?
I think VB is a great language because it takes a very practical, relaxed stand on things. Case insensitivity is a good example—rather than being stickler about casing, which in most cases really doesn’t matter, we accept different casings. Overall, I like that approach a lot.
6. Have you ever been to Italy?
Once, when I was in high school. I studied Latin and we took a trip to visit Rome, Venice and Florence. It was a wonderful trip, and I hope to come back some day!
7. Would you like to tell us something about your life outside the office (how do you like to spend your free time, what do you like to do when/if you go out in the evening or when you’re at home and so on)?
Well, I’ve got twin boys who are about two and a half right now, so they tend to consume most of my time outside of the office! I am looking forward to going back to running and indoor rock climbing at some point in the future…
8. Who is your favorite musician?
I like a lot of different styles of music, but I grew up listening to R.E.M., so they have a special place in my heart.
9. What’s your favorite food?
Also a difficult question, but it’s probably something Southern and fried, maybe fried chicken or hushpuppies.
Thank you very much for taking time to answer these questions and letting us know something more about you!
-
Microsoft has announced the names Visual Studio 10 and .Net Framework 4.0 for the next versions of these two products! Here are a number of references where you can look to find more information about this announcement:
http://www.microsoft.com/presspass/press/2008/sep08/09-29VS10PR.mspx
http://www.eweek.com/c/a/Application-Development/Microsoft-Announces-Visual-Studio-2010-and-NET-Framework-40/
http://msdn.microsoft.com/en-us/vs2008/products/cc948977.aspx
http://msdn.microsoft.com/en-us/vstudio/bb936699.aspx
http://www.cio.com/article/451622/Microsoft_Announces_Visual_Studio_._Developers_Respond.?
http://channel9.msdn.com/visualstudio/
-
Let's say that you've developed an application using the free Visual Studio Express Edition. Now, you want to deploy your application to the masses, and you read documentation about How to: Create or Add Deployment Projects.
Here's how the topic starts:
To create a new deployment project
-
On the File menu, point to Add, then click New Project.
-
In the resulting Add New Project dialog box, in the Project Types pane, open the Other Project Types node and select Setup and Deployment Projects.
-
In the Templates pane, choose the type of deployment project you want to create. For more information, see Setup and Deployment Projects.
In this example, I'm using Visual Basic 2008 Express Edition. However, when I open the New Project dialog box, there isn't an Other Project Types node.
The Other Projects Types node is only available in Standard Edition or higher (such as Professional Edition and Team System Edition). Also, you cannot download the Setup Project templates and add them to Visual Studio Express Edition.
Here, you discover that Visual Studio Express Edition is free, but limited. All of the following versions of the Express Editions have the same limited functionality: Visual Basic 2005 Express Edition,Visual C# 2005 Express Edition, Visual C++ 2005 Express Edition, Visual Basic 2008 Express Edition,Visual C# 2008 Express Edition, and Visual C++ 2008 Express Edition.
All hope is not lost! You can use ClickOnce Deployment to easily share your application with the masses. The ClickOnce Publish Wizard can easily generate a setup.exe to check for and install prerequisites such as the .NET Framework or SQL Server Express Edition. The published files can be copied to a CD, Web site, or network file share where users can download and install your application. ClickOnce can also easily update your application as you incorporate customer feedback and add features.
I created a Web browser based on Creating Your First Visual Basic Program and Video How to: Creating Your First Visual Basic Program. Now, I'll show you how to use the Publish Wizard in Visual Basic 2008 Express Edition to deploy this application to a network file share.
1. In Solution Explorer, right-click the solution name and click Publish.

You'll see the Publish Wizard open.
2. Type the location where you want Visual Studio to copy the files, and click Next. This location is called the Publish Location.
3. Type the location where your end users will install your application from, and click Next. This location is called the Install Location. These two locations are separate in case you do not have write access to the network file share. In that case, you would copy the files to your local computer, and an administrator would copy the files to the network file share.
4. Choose where the application is going to be run from, and click Next. If you select "available online or offline," the application is installed onto the end user computer. If you select "only available online only," the application is run from the Install Location.
5. In the final screen of the Publish Wizard, click Finish.
6. Open the network file folder, and verify that all the files are copied there. End users can open the Browser.application, publish.htm, or setup.exe files to start the installation.
For step-by-step instructions about how to publish to a Web site or CD, see How to: Publish a ClickOnce Application.
OK, let's test the installation.
7. Open file location where the application installer is located.
8. In the publish.htm file, click launch or Install.
You'll see the Launching Application dialog box appear momentarily.
9. In the ClickOnce Trust Prompt, click Install. If you don't want your users to see this prompt, you can sign your solution with a code-signing certificate.
10. Test your application.
In the Visual Basic Browser application that I created, I entered http://www.microsoft.com and clicked Go!!!!!! to see my application work successfully on my test computer.
These instructions apply to the Visual Basic and Visual C# Express Editions. The Visual C++ Express Edition development environment doesn't have the ClickOnce Publish Wizard, but you can perform the steps in the Visual Studio command prompt. For more information, see ClickOnce Deployment for Visual C++ Applications.
Enjoy deploying your applications!
Mary Lee, Programming Writer.
-
We have quite a few trips coming up over the next couple months, and we want to connect with you while we’re on the road. Here is our plan. Let us know where we can find you. ;-)
October 6-7, 2008
Software Development Conference 2008: http://www.sdc.nl/
Beth Massi
October 8-10, 2008
TechEd Hong Kong: http://www.microsoft.com/hk/technet/teched2008/
Karen Liu
October 21-23, 2008
OOPSLA: http://www.oopsla.org/oopsla2008/
Dustin Campbell
October 27-30, 2008
Professional Developers Conference: http://www.microsoftpdc.com/
Paul Vick
Dustin Campbell
Lisa Feigenbaum
Alex Turner
November 8-9, 2008