how to get the automatically incremented publish revision number - vb.net

I would like to read the automatically incremented publish version revision number by code and use it so I can display it on a splash screen.
On the picture the Revision number is number 58.
I use Vb.net, Visual Studio 2013.

In fact the solution:
how to show publish version in a textbox?
does work in the compiled, published executable. But not during debugging.
remember to add "System.Deployment" as a reference to your project (under the .NET tab of "Add Reference").
example vb.net:
If System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed
Then
TextBoxVersion.Text =
System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString
End If

Related

How can I add a module to a project in VS 2017 enterprise?

I'm taking a VB course that uses the 6th edition of Gaddis (2012). It says that to add a module to the project I must do the following;
However, this option is missing in my install of VS 2017 Enterprise. Is my install messed up, or has this functionality changed since Gaddis 6th came out, or am I missing an installed piece? If my installation is incomplete, which feature should I install?
The selection of Project Item templates changes in every release of Visual Studio to help advertise whatever new features came out in that edition. Use the search box in the top right corner to search for "module".
You need to have the VB project selected in Solution Explorer for the Add New Project Item dialog to suggest VB items. If you're seeing C++ items then you're in a C++ project or you're in the "New File" or "Add New Solution Item" (not Project Item) dialogs:
File > New File
New Solution Item
New Project Item (Visual Basic)

BC32208: Locals debug window doesn't work, along with quick watches

Similar to this question, I'm having trouble with an old webforms project in vs2015. The code will compile and run without error.
If I enable a breakpoint and try to look at any value in a Quickwatch, I get the following error:
error BC32208: Project already has a reference to assembly
'projectname.resources'. A second reference to
'projectname.resources.dll' cannot be added.
Similarly, if I break into the code and hover the mouse over a variable name then I do not get a pop-up containing the variable's current value.
I also looked at this microsoft link to no avail.
Is there a workaround for webforms?
My project doesn't have any localized [culture-code].resx files.
There's no assembly tab in project properties.
Amber Zhang from Microsoft contacted me to inform me that this has been resolved in vs2015 update 2. Downloaded and verified today. Thanks Amber!

Cannot change control name property in IDE (VB.Net 2008 and ActiveReports.)

I have a VB.Net 2008 project that use ActiveReports. The problem is that any control on the report does not list the control's Name in the Properties window. All other properties seem to be there, just not the Name. The only way to change the name is to go into the forms .vb and change the name with a search and replace (like Me.Label1 to Me.lblAmount). All other forms are fine, it's just the ActiveReports forms. This happened just recently and there didn't seem to be any sort of update/event that triggered it. Anyone else have this issue before?
Thanks in advance,
-J
It is suggested that you download and upgrade to the most recent available build/service pack of the version of ActiveReports you are working with. And thereafter you should not face an issues.
The latest service packs can be downloaded from the following links :
AR3 : http://www.datadynamics.com/forums/121331/ShowPost.aspx
AR6 : http://www.datadynamics.com/forums/83/ShowForum.aspx
AR7 : http://our.componentone.com/groups/topic/activereports-7-service-pack-1-maintenance-release-now-available-2/
After the download, make sure that all of the dll’s of the upgraded version are present in the GAC. Also check that there isn't any dll of the previous version is present in GAC. After that remove all the ActiveReports references and then re-add the latest dll(s) in your project. Re-build the whole solution. You may also try creating a new project and check whether the name property appears.
Regards,
Mohita

There are no property pages for the selection

Hey guys my friend sent me his vb.net project made in VS2012 but I'm using VS2010. Now I can't open the file, it says 'This project is incompatible with current version of Visual Studio'. I have Googled it out and they said I need to change format version to v11 instead of 12 and also change target framework to 4.0. However, I am only able to change the format version to v11, but unable to change the target framework since I have nothing to access in the properties , as it shows 'there are no property pages for the selection'. How can I fix this?? Anyway to change the framework without going into properties??
Thanks!
Nevermind, I've figured it out guys.
open up the .vcxproj file using note pad and change the number from 4.5 to 4.0,so it should look like this
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

TFS 2010 : Use the label name in build number format

I'm trying to setup a build with TFS 2010. I want the build number format to be something like $(BuildDefinitionName)_$(version) where $(Version) is the version (label or changeset) specified in the "Get Version" field in the "Queue Build" dialog. If there's no specific version, I would like the version to be latest.
I googled for that but I'm new to msbuild and TFS build so I'm not sure what I should look for to get started.
Thanks.
The Microsoft.TeamFoundation.Build.Workflow.Activities.UpdateBuildNumber activity in your build template (e.g. DefaultTemplate.xaml) is what does the work of transforming your build number format string. It takes any of the parameters listed here, however, the version (your changeset or label) is not one of the supported tags.
One workaround I've found that does not require custom code is to edit the BuildNumberFormat argument immediately before the Update Build Number activity uses it.
Open up the xaml template using the GUI editor and find the Update Build Number activity at the top.
Find the Primitives -> Assign activity in the Toolbox. Drag and drop that just above the Update Build Number.
Edit the Assign activity to assign the value String.Format("$(BuildDefinitionName)_$(Date:yyyyMMdd)_{0}$(Rev:.r)", BuildDetail.SourceGetVersion) to BuildNumberFormat. The SourceGetVersion will pull the changeset number or label used to trigger the build. If nothing is specified in the Get Version dialog when you're queuing your build then the changeset number is used by default (e.g. C16044).
this is a good start
http://www.ewaldhofman.nl/post/2010/06/01/Customize-Team-Build-2010-e28093-Part-10-Include-Version-Number-in-the-Build-Number.aspx