Remove The Debug .PDB File From My MSI Compilation?
Dec 25, 2009
In Debug mode my application compiles to a 4MB .msi file plus setup.exe at 368kb, and the installed app includes the .pdb file @ 2.3MB. If I change to Release mode I'd expect to avoid including the debug symbol file and considerably reduce the .msi size, but surprisingly the .msi goes up to 4.45MB and setup.exe to 420kb. Am I missing something here? I want to reduce the upload size of the application by avoiding the unnecessary debug file, but clearly I've misunderstood what's happening or maybe what I can do.
View 1 Replies
ADVERTISEMENT
Nov 9, 2011
I have seen a different behavior before, but this time my application just doesn't work properly when debugging, while it does everything perfectly after compilation.
My project is beginning and does just one thing: monitor the clipboard and save its contents to a XML. It has just one form (frmMain), which, when loaded, puts itself in Windows clipboard listening, via WIN32 API. Then, whenever receives a message, the form has to check if it's from clipboard and, if so, saves the actual contents.
The code is below:
Public Class frmMain
Private Const WM_CLIPBOARDUPDATE As Integer = &H31D
Private XmlDocument As System.Xml.XmlDocument
[CODE]...
So, as I've said, after compiling, everything works perfectly. However, when debugging the "AddItems" function is never called. I set a stop point in the line Win32 API is called (in frmMain_Load) and the execution NEVER STOPS THERE! Debugging line by line, I found out that after executing some lines from frmMain_Load, VStudio just jumps to WndProc and never comes back to frmMain. I mean, the form is shown, and the rest of its initialization code is never executed. Because of that, my form is never added to clipboard listening (this command is at the end of frmMain_Load) and, consequently, all messages my window receives are not from clipboard, and, therefore, nothing is saved.
Is it normal to VStudio just bypass some code because a event triggered other method? This could lead to lots of complications and it's not consistent with after compiling behavior. A proof that what I said is actually happening is this: I passed the last 5 lines from frmMain_Load (where the Win32API is called) to the beginning, so my program would call the API before initializing the XML file. OK, now what I have: the API is called, but the XML commands are never executed. Consequently, "AddNewEntry" is called, but I have a null-reference error, because my XML was never initialized. Have you ever faced that bizarre behavior? What can I do so my debugging is correct and I don't have to compile my program for each test I want to do?
View 5 Replies
Dec 20, 2010
I have a vb 6.0 file that compiles a CLS file in the same folder to a dll without the creation of any windows forms. Does anyone know of an example for this in VB.NET?
View 1 Replies
Aug 31, 2011
Simple question that does not seem to be covered: If I use a lot of Debug.WriteLine statements in my code, will they be completely absent in my production version?
I mean: Is the compiler smart enough to not emit any code for those calls? Or would I have to surround them by #if DEBUG..#end if directives?
View 3 Replies
Jan 5, 2009
I have the following codes:
me.hide()
staff.show()
It run smoothly for the first time,but when I execute it for the second time,it occured the following errors:Unable to copy file "obj\Debug\FYP.exe" to "bin\Debug\FYP.exe". The process cannot access the file 'bin\Debug\FYP.exe' because it is being used by another process.
View 3 Replies
Nov 12, 2011
read the COMPLETE email before giving me instructions.I say that because it seams like who ever is responding is only reading part of the email and responding.I have followed your instrutions and I still can not get myhello.vb to compile.
Both vbc.exe and mylello.vb is in the same folder c:program files
"C:Program Filesvbc.exe myhello.vb"
You stated that I should run command prompt as administrator and tye the same command as you do. what (as administrator) is. Please walk me through the complete process. Please do not tell me to run the command prompt as administrator because I do not know what that mean.I can not speak to my administrator. Also I attempting to compile a sample VB that came with the software, so using Visual Studio is not the solution.
View 5 Replies
Apr 28, 2009
I follow a "new" book called "Programming Using Visual Basic 2008 7. edition" by David. L. Schneider.
But when I was creating a file called " PAYROLL.TXT " it didnt show up in the debug folder as it should. How do I get the file automatic located in the debug folder?
If first question is answered:Second question - is it the same way to include other files?
View 5 Replies
Jun 10, 2011
Im looking to play a sound from a folder which is in my debug directory. I got this working for a PictureBox: PictureBox1.ImageLocation() = ("Resourcespicture.png"). But I cant find something to play a sound. This is what I had before: My.Computer.Audio.Play("C:Users......Soundseep-2.wav"). I dont really want to be writing the location of the files using special directories. Is there any way I can just set the location of the file to the directory in which the .exe is.
View 6 Replies
Mar 5, 2010
there is a way of putting a file in the debug folder of my project so that when i move it, i dont have to put the new file name
View 3 Replies
Feb 7, 2009
What is the source for Creating a .txt file when debug
Quote:
Originally Posted by Example
Like when i click button1 it will create a .txt file on my destop or C:
View 10 Replies
Dec 19, 2011
I have the following code in C#:
public static ArrayList GetGenders()
{
return new ArrayList()
{
new { Value = 1, Display = "ap" },
new { Value = 2, Display = "up" }
[Code]...
View 3 Replies
Jan 22, 2012
I'm using Visual Studio 2010 Pro on a Windows 7 PC, to build simple VB Windows Form Applications (I've just started learning VB). Lately when I try to debug my applications, it takes unusually long. For example, an application with just a blank form and nothing else will take about a minute to build, and then it will sit for another minute or two until the app window pops up. It didn't use to do this!
View 1 Replies
Jan 19, 2011
I have tried looking at "related" questions for answers to this but they don't seem to actually be related...Basically I have a VB.Net application with a catalogue,administration section (which can alter the catalogue, monitor page views etc etc) and other basic pages on the customer front end.When I compile and run the app on my local machine it seems to compile fairly quickly and run very fast. However when deployed on the server it seems to take forever and a day on the very first page load (no matter what page it is, how many stylesheets / JS files there are, how many images there are, how big the page markup is and so on). After this ALL the pages load really fast. My guess is this is due to having to load the code from scratch; after that, until it is recycled, the application runs perfectly fast. Does anyone have any idea how I could speed this part of the application up? I am afraid that some customers
View 1 Replies
Dec 6, 2010
I'm using vb10 express.When I give copies of my exe file to friends to test will they have to install anything on there computers to get it to work? Do I need to include other files with the exe?
View 3 Replies
Feb 12, 2012
When I drag my debug file from the debug folder to the start icon in order to make a shortcut for the application on the start menu, it automatically names the shortcut WindowsApplication1. How can I change the default name for this action?
View 14 Replies
May 18, 2010
I want to be able to determine if the web.config element
<compilation defaultLanguage="vb" debug="false" />
if the property is debug is set to true or false.
Public Shared Function isDebug() as Boolean
[code].....
View 1 Replies
Sep 21, 2011
I have a project in VB.NET 2010 (compiling to x86, .NET 2.0 runtime) that I want to compile into two separate EXEs - a "lite" version and a "full" version. Unfortunately I cannot make two separate projects as it uses the Adobe Reader COM control - and sharing a form using that control between two projects seems to confuse the IDE (something to do with COM Interop, I assume - if someone knows how to share a form hosting the adobe reader control, that would solve my problem too).
I have found this thread: C#: VS.NET: Change name of exe depending on conditional compilation symbol however I don't have any MSBuild experience so I need more explicit instructions. On the "My Project>Compile" tab there is a "Build Events..." button. I was wondering if anyone knows how to set a conditional compilation constant and use that to determine the EXE name (or change it after build). If all else fails I can rename the EXE manually I suppose, but I'd prefer it to be automated.
View 1 Replies
Oct 12, 2010
I had a code for getting the hdd id written in vb.netNow I need to re-write the code into c#. I have converted the vb.net code to c# but it is not compiling.Below is the vb.net code
Dim hdCollection As ArrayList = New ArrayList()
Dim searcher As ManagementObjectSearcher = New ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
[code].....
View 4 Replies
Nov 27, 2009
How can you write a #If statement on a single line?
vb.net
#Const Debug = True #If Debug Then Console.WriteLine("Debug")'I also tried:#If Debug Then : Console.WriteLine("Debug") : #End If'
But that didn't work either?
View 2 Replies
Feb 8, 2012
I've got a problem with a program that references a third party ActiveX component that I've been refused permission to distribute. The AX component is used on some user defined controls which the user can add programatically, which makes isolating them fairly easy. However, the problem is that if the program is installed on a machine without the third party component then it just crashes, where I would much prefer it to just alert the user to the missing component and then disable the functionality that requires the component.
In the past I've tried adding the reference programatically but have found that this solution doesn't work with this particular control.
View 1 Replies
Feb 3, 2010
Now days it is done in Resources.Designer.vb we have there following lines:
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
[code]...
View 3 Replies
Sep 12, 2011
I am using VBEt2008 to develop application. After completed development. I do not know how to compile the applications.brief me of the procedure and steps to compile the application.I tried to look for options at the Menu ToolBar and also the TookKits options and in vain.
View 5 Replies
Jul 3, 2010
I am having trouble with this list box assignment. I am supposed to pull the information from a text file in the debug folder. The problem is the code looks perfect to me, but when I debug, the first line that starts with : lstSummary.items.add returns as being in the wrong format. The code is below.
Private Sub btnSummary_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSummary.Click
Dim strAccount As String
[Code].....
View 3 Replies
May 26, 2009
I have more than one file under project. Where do I configure the first/start file when debug?
Example: form1.vb is load by default when debug. Now I want it to load login.vb instead.
View 4 Replies
Aug 5, 2009
I have a problem with the VB.NET compiler failing to compile a class (in a separate C# assembly) which contains two overloads of a method with generic arguments. The equivalent code in C# compiles against the same assembly with no errors. Here are the two method signatures:
protected void SetValue<T>(T newValue, ref T oldValue)
protected void SetValue<T>(T? newValue, ref T? oldValue) where T : struct
Here is the code to three assemblies that demonstrate the problem. The first is the C# assembly with a Base class that implements the generic methods. The second is a C# class derived from Base and calls both overloads of SetValue correctly. The third is a VB class also derived from Base, but fails to compile with the following error message:
[Code]...
Am I doing something wrong in the VB code, or are C# & VB different when it comes to generic overload resolution? If I make the method arguments in Base non-generic then everything compiles correctly, but then I have to implement SetValue for every type that I wish to support.
View 2 Replies
Dec 27, 2011
I'm running 64bits Windows 7 and using MS Visual Studio 2010. I'm doing a VB program connecting to mySQL database using 32bits ODBC connection. the program have no issues loading crystal report in Visual Studio IDE environment. However, after Build and install in the same machine the following error msg appeared when trying to load the crystal report with data call from database (ABLE
to display report when NO data call):
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
[Code].....
View 8 Replies
Aug 19, 2009
I am getting a project-level conditional compilation constant error while trying to build my vb.net project. It reads:
project-level conditional compilation constant 'VB_VER=9.0,TARGET="exe",CONFIG="Debug",_MyType="Console",PLATFORM="AnyCPU",DEBUG;^^ ^^ TRACE' not valid: Character is not valid.
I recently upgraded it to the latest version (from 2.0), and I have a feeling that this has something to do with it.
[Code]...
View 1 Replies
Apr 2, 2009
We were working with a VB.Net app that contains something like 2200 VB modules/forms/classes and got a not-uncommon error message when we went to compile it. (Didn't write down the exact message, but it's basically unable to copy an image file that's in use.)Problem, of course, is that not everybody got out of the app when we told them to. Like I said, not uncommon. (It's a shared app that runs from a server.)Now, the weird thing. After kicking the offenders out, when we recompiled the program the image, which we use on search buttons, was gone. The file was still there but all of the property settings that referenced it were gone. Looked into the Designer code & they were gone from there, too. Seems to me that a compiler should *mark* the code that won't compile, not delete it.Anyway, I only see two courses. Either we restore our app from a backup, losing all our changes, or we go thru all the forms (like I said, there are 2200 modules-not sure how many are forms, but it's a bunch) and manually replace the properties on all the search buttons. Either way it's going to cost us at least a day's work.
View 2 Replies
Jun 10, 2012
if you are debugging or releasing a projet , vs writes exe or bin files to the bin and obj folder in a release and debug version, are ther differences bewteen these files with the same name in 4 folders ?, eg myproject.exe
View 3 Replies
Sep 9, 2009
What is the best way to keep my source code separate to the output from compilation? I can change the "Build output path", but I am still getting files created in the "obj" directory whenever I compile. I want to have a directory tree that only contains source code.David Streeter
View 7 Replies