visual-studio

vc++: differences in runtimes of release build

Hi, when I build my project in release mode, right click the project and say debug > start new instance, this takes about 49 seconds to run(its a large task) when i go to the release folder in the project folder and click the .exe it takes 130 seconds. when I move the exe to a folder with all the dependent dll's it takes 220 seconds. ...

"Register for COM Interop" vs "Make assembly COM visible"

What is the real difference between these two options? What I know is: Register for COM Interop This options executes regasm on the assembly and registers the assembly as an COM component(or maybe not) in the registry with all COM like registry entries. Does this step generates a TLB file? What else is done? Sometimes I see a tlb is ge...

When to build a migration?

I am building a visual studio like application: User can create a new project, edit it, save it to disk and load. The project isn't exactly like VS it is domain specific. Like with VS I need a way to migrate project from V1 to V2 as they have a different structure on disk. When should I build such migration tool? option 1: Near the en...

Correct way to build and publish asp.net web application (with or without MSBuild)

I'm using VS2008 (just in case it matters), and I have a solution with multiple projects, some are class libraries, and some are build tools, which the main web project is dependent on. Until now I have been publishing with VS right click publish project, and everything builds and deploys correctly. I've tried creating a few simple publ...

Synchronizing changes between multiple Access databases

Hi, I've noticed that Access 2010 (maybe earlier also) - can prepera database for replication, and is able to synchronize changes beetween specified databases. My question is - is it possible to call this function from Visual Studio , using C# ? if yes - then how ? ...

Should I include my SDF file (SQL CE 3.5) as an item when adding solution to source control?

I have a visual studio 2010 solution that uses a SQL CE fiel (SDF) for storing data in one of the projects. I am wondering, is it a good practice to add this SDF file to the source control so that whenever I make any changes in the database, I commit it to source control? Sometimes all i do is a name change for example, then I have to c...

Renaming a C++ thread when running under Visual Studio 2010 extension package

Hi everyone, I'm using the following code (from MSDN) to rename a C++ thread: #include <windows.h> const DWORD MS_VC_EXCEPTION=0x406D1388; #pragma pack(push,8) typedef struct tagTHREADNAME_INFO { DWORD dwType; // Must be 0x1000. LPCSTR szName; // Pointer to name (in user addr space). DWORD dwThreadID; // Thread ID (-1=caller ...

Feature request for a text-editor with support for literate programming

This is a feature request for the writers of Visual Studio and any other programmer's editor. Consider a literate program as follows: /* File Name: LiterateProgram.h */ // \begin{comment} #pragma once #include "myHeader.h" /* \end{comment} %\bigskip \begin{lstlisting} % */ class CSomeClass : public CSomeBase { public: float som...

XCode Instruments - equivalents for Windows?

XCode's Instruments make me feel physically I'll. They're based on DTrace - which has some loose equivalents in Windows - but the GUI Apple made for them makes them usable in a day to day way. Visual Studio just doesn't seem to have tools to compete. It has an attempt at a profiler that requires a lot of command line mojo and parsing of...

Why F5 does not start a unit test in VS2008?

Hello, I have a solution with several projects and all of them are unit test projects. While I can start some tests selecting the project as the startup project and pressing F5 there are other projects that when selected as startup and pressed F5 says that a project with an ouput type of class library can not started. I've compared the...

Default value reporting services if no data

I have a filter on my report that is a multivalue list for UnitNumber. The report is set up to show each unit's details on a separate page. If I select unit #3 and unit #4 and unit #4 doesn't have any data, is it possible to show the data for unit #3 and then on the next page say "Unit #4 has no activity"? ...

VS 2010: Call Stack says: [external code] and won't show calling code

The Title says it all.. I can't see what code called the line being executed at runtime using the debugger. Added: How do I step into the methods that called the code being exectued themselves? Thanks a lot. ...

WPF designer error states that it "Could not create an instance of type..." for my custom UserControl when a StaticResource is applied.

I have an interesting problem. I've created a WPF UserControl which contains a button using a template: <Button x:Name="btnStart" Template="{StaticResource RoundedGlassButton}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="4" Height="32" Background="DarkGreen" Foreground="White" Width="72" Content="Start" /> When I plac...

use RegEx to extract text between html tags

Hello, I have to extract from a string in visual basic some text, like this: <div id="div"> <h2 id="id-date">09.09.2010</h2> , here to extract the date <h3 id="nr">000</h3> , here a number </div> I need to extract the date from the div and the number all this from within the div... Also and this will be in loop, meaning there are mo...

Large data in a cell of DataGridView

Hi everyone, i want to display a large data in a cell of DataGridView as multiplelines to avoid the horizontalscroll. ...

Error adding connection in Server Explorer: "Unable to add data connection. ExecuteScalar requires an open and available connection."

I'm using Visual Studio 2008, and my database is SQL Server 2000. I want to add a connection to the Server Explorer in VS. The Data source is Microsoft SQL Server (SqlClient). After entering in all my information and I click Test Connection, it is successful. But when I click OK, I get the error: Unable to add data connection. Execute...

Creating a WCF service to a MVC webapplication

I wonder if there are some differences between creating a WCF service and an MVC web-application. If you know of good links on how to create such a service for an MVC application that returns a JSON object please do post them. ...

Visual Studio - Post Build Event - Throwing Errors

I've got a nice power-shell driven post-build script that does some magic mumbo-jumbo for pulling all our plugins into the correct location after they're compiled and sorting out thier dependencies with the master-project of the solution. My problem is, occasionally when I do something stupid, I can end up in a state where my script can...

which visual studio project type should i choose that will best for standart c library

Hi, which visual studio project type should i choose that will best for c basic library(uni studies). the problem in visual studio 2010 express that its gives _tmain instead int main(). Thanks ...

Build .NET-Applications always for lowest possible framework-version?

I'm new in the .NET-world. I just built my first application with .NET-versionn 4.0 and am wondering if its a wise choice to lower the target-framework as much as possible (to 3.0 maybe) if it still works then. Whats best-practice when it comes to choosing the appropriate .NET-version? ...