Project-level Conditional Compilation Constant?

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


ADVERTISEMENT

Conditional Compilation On A Single Line?

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

Changing EXE Name Based On Compilation Constant

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

Put A Conditional Variable In Project > Compiler Tab > Advanced > Custom Controls?

Dec 8, 2010

How is conditional compilation controlled for a VisualBasic web? For a VB Windows app, I put a conditional variable in Project > Compiler tab > Advanced > Custom controls.

How in a VB web app is a conditional compilation variable assigned that can be accessed by all the files of the web app?

View 1 Replies

Coding Computing Project For A-Level?

Oct 24, 2009

I have just started coding my Computing project for my A-Level, and I will admit, I am far more experienced in VB6 than VB.NET (as embarrassing as that is to say).I get extra marks for making everything presentable, so was wondering if it was possible to add icons into .NET buttons. For example if I have a button to add an entry to the database, I want a nice Web 2.0 looking icon (for which I already have) next to the text on that button.

View 1 Replies

IDE :: Importing Namespaces In Project Level?

Mar 16, 2009

i hav a problem in building a solution in vs 2008.I'm opening vb.net project in VSS repository.When i tried to build the application its giving lot of compile error.After examining the code i've found that the namespaces are not imported in *.vb file , hence the types used in the file are not accessible .I know that we can import namespaces at application level

View 1 Replies

Public Constant Versus Private Constant?

Aug 13, 2011

When building a class library which contains many classes, all classes uses a lot of common constants and functions, what is the best to do:

1- Declare these constants and functions as public in a module.

2- In each class declare constants and functions used by individual class as private.

The first choice is good for easy and fast implementation, but re-using a class in a different project will require importing the module to the other project.The second choice require a lot of copy/paste for code snippet but a class can be re-used in different project easily.

View 3 Replies

VS 2005 : Can Alias A Project Level Imports Statement

May 12, 2011

I know you can alias an Imports statement in

Imports xyz = ProjectABC.ClassABC

But if I want to use the Project Properties, Reference tab to select a namespace to allow a project-wide setting, is it possible to alias that namespace?

View 4 Replies

Asp.net - Project Level Imports Stored In Visual Studio 2008?

Mar 16, 2009

I have a Web Service Application Project in Visual Studio 2008. This is supposed to be an ASP.Net 2.0 project and at some point this has been rebuilt using 3.5.VS has kindly added in project level imports to System.Linq and System.Xml.Linq, but when I have re-targeted the project at 2.0 these project level imports have remained.Because the Web Service Application Project does not have the detailed window for editing project references I cannot find how to remove these project level imports.There is no .proj file which is where I would assume these were included.I cannot now build the project as it fails, even though I only get warnings (no errors reported) such as this:Namespace or type specified in the project-level Imports 'System.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

View 3 Replies

Application-level KeyUp/KeyDown Events (not Windows Form-level)?

Apr 1, 2012

I am creating an Excel add-in written in VB.NET. I would like to bind KeyDown and KeyUp events to the spreadsheet to record when the user presses and releases the arrow keys while navigating the spreadsheetIdeally, these events would be built into Excel alongside the native SheetActivate and SheetSelectionChange events, for example. Alas, they are not.

View 1 Replies

Set Option Explicit And Option Strict On A Project / Solution Level?

Feb 22, 2011

I really like the coding speed that vb.net provides, but I don't like the possibility to forget to declare variable types, return types of functions, etc. and that is why in each class I use[code]..

Is there a way to define those two options on the project/solution level?

View 2 Replies

What's The Difference Between Dim On The Member Level And Static On The Procedure Level

Jan 6, 2010

In Visual Basic 2008, there's two different ways that I know of to accomplish the same thing:The Dim on the member level:

Dim counter1 as integer = 0
Dim counter2 as integer = 180
Public Sub SampleSub1()

[code].....

View 1 Replies

Error BC30464: Namespace Or Type'Compatibility' In The Project-level Imports 'Microsoft.VisualBasic.Compatibility' Cannot Be Found

Jan 16, 2009

I've started to use a Vista machine for development. In case it is significant: I'm using MSBee so that I can code in the Visual Studio 2005 IDE while still building against the 1.1 framework.On the Vista machine, when I tried to build a particular vb project, I got this error:

error BC30464: Namespace or type'Compatibility' in the project-level Imports 'Microsoft.VisualBasic.Compatibility' cannot be found.

The same project built fine on my old XP machine. I checked in this folder on my Vista machine:

C:windowsmicrosoft.netFrameworkv1.1.4322

...and sure enough, "Microsoft.VisualBasic.Compatibility.dll" was missing. So was "Microsoft.VisualBasic.Compatibility.Data.dll". Copying them from my XP machine to my Vista machine allowed me to build the project successfully.I'm just a bit puzzled as to why this happened. Why was "Microsoft.VisualBasic.Compatibility.dll" missing? I'm also not very comfortable with my chosen solution - copying the DLL manually. It works, but surely there must be a better way.

As far as the configuration:

Vista:
.Net Framework 1.1
.Net Framework 1.1 SP1
.Net Framework 1.1 SDK

[code]....

View 1 Replies

Top Level SQL Table Row - Save The Top Level Automatically?

Mar 18, 2011

I have created a simple program which uses a two tier structure of SQL Tables.At the top level, one record holds the date of the activities and linked to it using its primary key as a foreign key, three subordinate tables hold time stamped records.The issue I have been unable to solve is that before adding any of the lower level records for a given date, a newly added top level record must be saved to the database.Doing this manually is simple - but can I rely on my users to remember to do this before they start plugging in the lower level data?I thought not, so I am looking to save the top level automatically.I've failed miserably but I refuse to believe that it's not possible.

View 14 Replies

Multiple Level Of For Each And Linq In Each Level

Feb 12, 2011

I have multiple level of For Each and in each level, i have a Linq that is the 'In' criteria as in:

[Code]....

It will go inside each for (because the value is not nothing), however, it will only loop (next) in the very inner 'For Each t In tFor'. After it is finish inner loops, the outer Fors' or Next will not execute... even thought there are more than one values in that 'In'... like 'sFor' or 'fFor'. i've noticed while debuging, while break at the for (for example 'sFor', before stepping in), i get the error message:

"Enumeration yielded no results" when i expand the result for that variable and it will not step into it. but if i do not expand the result, it will step in. It seem that some how, once an element is accessed for that 'In' collection, it breaks (meaning does not loop for the rest of the elements) the next for that collection is this a bug or am i missing something in Linq? BTW: i believe it has something to do with the SqlDataReader in the Linq. I'm working with IAsyncResult.

View 5 Replies

Compilation And Execution

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

Vb6 - File For Compilation Of CLS To DLL?

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

Asp.net - Converting New With From C# To .NET - Compilation Error

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

IDE :: Having Slow Compilation Time?

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

Speed Up Web Application Compilation?

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

Access Compilation Element In Web.config?

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

Code Converted To C# Compilation Error?

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

Deployment - Ignoring Bad References At Compilation

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

Managing Resources Via Compilation Flags?

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

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

VBNET2008 Application Compilation Procedures?

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

C# - Generic Method Overloading Compilation Error In VB?

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

Error Displaying Crystal Report After Compilation

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

VS 2005 Compilation Error Deletes Properties?

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

Import A Platinum Level Advisor .jar To Use With This Platinum Level Product Key?

Nov 10, 2009

U0161 import a Platinum level Advisor .jar to use with this Platinum level product key.How I can get this and import it to continue my completion of setup of mysql download?From where I can download that file?To enable this application, please provide a MySQL Enterprise Product Key or your MySQL Enterprise credentials.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved