visual-studio

How can I use a SQL Scripts in a Database Project with the System.Data.SQLite data provider?

I've got a project where I'm attempting to use SQLite via System.Data.SQLite. In my attempts to keep the database under version-control, I went ahead and created a Database Project in my VS2008. Sounds fine, right? I created my first table create script and tried to run it using right-click->Run on the script and I get this error messa...

How do I Compile and Deploy an assembly into a custom path using visual studio?

Hi, I've been searching this for a long while and i could find anything. I have 2 projects. One called ConsoleApp and other called ConsoleLib. ConsoleApp has a reference to ConsoleLib. How can i Tell visual studio to copy the assembly into a custom path instead of the app path? What i want to mean is that when i build the solution i want...

Is there a way to suppress c++ name mangling?

I have a DLL that is written in C++ and I want to suppress the name mangling for a few exported methods. The methods are global and are not members of any class. Is there a way to achieve this? BTW: I'm using VS2008. ...

Outputting line numbers

Is there a way, in VB.NET, to output the current line number in the source code? For example: Try ' The following line will purposly cause an error Dim BigNum As Int64 Dim LittleNum As Int16 = CShort(BigNum) Catch ex As Exception Dim LineNumber As Integer = <linenumber> ' How do I do this? MessageBox.Show("Error in s...

What is the best default location for projects in Visual Studio?

Over the years I have vacillated between having my project/source folders in a directory one level removed from the root (e.g. D:\Projects) and keeping them in the default location for Visual Studio. In the past, I resisted storing anything in the various "My Documents" folders established by Win 95, Win 98, and XP. I finally switched t...

Is there a master index for Visual Studio projects?

I have MANY small "Test Projects" where I put together just enough code to prove or disprove some idea I'm working on. Some time (sometimes several months) later, I need to use some of this code. It can take hours searching through poorly named folders to find the gem of code I'm looking for. It's not enough to be worth a Blog or wiki...

Visual Studio Snippets - How to specify foreach loop's collection

When using the Visual Studio shortcut/snippets is it possible to specify the collection in advance/automagically, rather than fill in the green boxes afterwards? In this case, I'm trying to come up with something like the following with the fewest possible number of keystrokes: foreach (ListItem item in ListBox1.Items) { // } For...

How to change all highlighted rows in DataGridView - VB.NEt

Hi all, Begginer's question. I'm trying to write small piece of code in Visual Studio (VB.net) that will change value of a particular field of the database for all highlightetd rows. So, I'm running my form, which displays some data from the datatabse. I then highlight some rows (holding Ctrl and clicking). Next I click a button that wi...

What is the best location for solution file in Visual Studio?

I prefer for the solution file to be in the same folder as the project files in Visual Studio. I know this is accomplished by unchecking the "Create directory for solution" checkbox. However, VS 2008 defaults to having the box checked. I am interested in other people's opinions on whether the solution file should live in the same direct...

Conditional compilation in C++ based on operating system

I would like to write a cross-platform function in C++ that contains system calls. What conditional compilation flags can I check to determine which operating system the code is being compiled for? I'm interested mostly in Windows and Linux, using Visual Studio and GCC. I think it should look something like this: void SomeClass::SomeFu...

How to call one project from in another in vs2005

Hi i have 2 projects named as SQLDiscovery and TestApp like (Solution 'TestApp'(2 Projects) Solution 'TestApp'(2 Projects) | | ---> (SQLDiscovery) Contains a class SQLDiscover and a method DisplayLocalinstances() ---> (TestApp) which contains main() Now i want to access DisplayLocalInstances() in main.how can i do it. Alr...

Converting items in Visual Studio project from "links" to copied files

Hi, I have a Visual Studio (2008) project where I have some files added as links (through Add Existing Item->Add As Link). Suppose I want to copy this project somewhere else (give it to another developer, release source code, etc.) and I would like to "convert" all these links to actual copies of these files. Is this possible? How can I...

Visual Studio 2008 Source Control Explorer with Subversion

I usually use Visual Studio Team System 2008 Source Control Explorer with TFS, but I'm considering using Subversion for some small projects, can I make use of the already installed Source Control Explorer without installing a new Subversion client/plugin in my IDE? ...

Use the official binaries of a library without losing the option to load the source on demand.

Within a Visual Studio (2005/2008) Project I'd like to use an open source library. I'd like to link to the binaries so that I'm not responsible for a proper build and can check those binaries into the source control server (SVN). So far so good, but if I'd like to debug into the open source library or want to take a look at a class impl...

C++ code performance

Hi there When is about writing code into C++ using VS2005, how can you measure the performance of your code? Is any default tool in VS for that? Can I know which function or class slow down my application? Are other external tools which can be integrated into VS in order to measure the gaps in my code? ...

how to add reference in visualstudio2005 for vc++ project

Hi i have created a vc++ console application i need to add .net assembly references. but when i do the following as project right click->properties->Common Properties->references->add references then i am getting the window as addrefernce(title) tabbed window project name and project directory and have empty list i am unable to fi...

tabbing in C# resource file

Hi How do i add a TAB (\t) to a string resource ? "\tText" doesn't work ...

Double qoutes problem with string.

Is there a way to write in Visual Studio in nice formated way the row bellow? string x = "<Site name=\"Stack Overflow\" >Inner Content</Site>"; so that it would look like: string x= "<Site name="Stack Overflow"> Inner content; </Site>" ...

When using View Code on a XOML file, designer view is displayed.

In Visual Studio: When you right-click on a xoml file in the solution explorer and select "View Code" it takes you to the designer (design view). Steps to Reproduce create a xoml add something into the code-behind [I used C#] Close the code-behind and designer right-click the xoml from the Solution Explorer Select "View C...

using Libcurl on Visual Studio

Not really a programming question but I am having trouble getting Libcurl to install. I tried this "visual_studio.pdf" guide but its 7 years old and when I build the initial file I don't get a library file. Thanks ...