visual-studio

How to view/monitor which events are being fired from controls on a user interface

I am creating an GUI using winforms in C#, all the controls have numerous events. I would like to know which of these events are being fired and when. One way would be to put debug statements on each of the event handlers but that would require too much work. Is there any way of doing this in Visual Studio 2008/2010 or are there any tool...

How to turn off Auto correct for braces and coded elements in a Visual Studio MVC View

I am using Visual Studio 2010, but this applies to VS 2008 as well. In my MVC views I prefer to write my coded elements as follows: <% if (somecondition) { %> <p>something</p> <% } else { %> <p>something else</p> <% } %> This just looks more readable to me than the following which is what VS auto corrects my code to look like...

Visual Studio is not loading my debugger visualizer

I wrote my own Debugger Visualizer. It, and the attributes, are in their own assembly. There is no references or attributes in the assembly containing the class to be debugged - I want to make a drop-in dll that is optional for people to use. The class I am trying to debug is a generic. [Serializable] public class FinCellTable<S> :...

VS 2010 Database Project - Different Connections

I have an application that I'm developing in Visual Studio 2010 that utilizes a SQL Server database. As such, I am using a VS SQL Server 2008 Database Project. The database project requires a target connection for which is used to build the database. Problem: This project is under source control for a team of developers and a build s...

Target CPU affecting execution time dramatically

Recently, I've been running some tests with C++ and VB.net to compare execution speeds. In the last thread I posted, I talked about how I had encountered the fact that C++ was executing just as fast as VB, but got that issue resolved. Now I'm hitting my head against another wall: I had made a DLL for VB.net to test out this theory and c...

How to automatically add argument names to a method call in C# and Visual Studio?

I like the named arguments feature of C# 4.0, I noticed that in some circumstances it greatly improves the readability of my code. Is there a refactoring extension to VS, which would convert a normal method call to a call with explicit argument names? Like this: Before: cmd.Parameters.AddWithValue("Foo", "Bar"); After: cmd.Parameter...

Visual C# - Program Will Not Run

I made a program with Visual Studio 2010. It required .NET Framework 4.0 to run, and the machine it needs to run on is not connected to the internet, so I found the redistributable online on my own machine and copied it over. I installed the software on the machine (it's a very simple program, I just made up an installer to do the .NET ...

Source code different than code being built

I'm having an issue with a Visual Studio 2008 web application project where changes I make to the form or the code behind do not get built when debugging, and so I cannot use breakpoints and in fact none of the changes I make will display unless I navigate to "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" and del...

Unable to step into stored procedure inside stored procedure - SQL debugging using VS2010 and SQL Server

I'm checking out the SQL Debugger using Visual Studio 2010 (connecting to a SQL 2005 Enterprise Server), and I can successfully debug a stored procedure by going to Server Explorer -> Right clicking on the procedure -> "Step Into Stored Procedure". However, once I'm in, I can't step into or set any breakpoints inside any subsequent func...

__doPostBack is not defined

Im getting that error when try to call a __doPostBack on one of my pages, every page that i have in the project use __doPostBack function but in this particular page im getting that Javascript error. i was looking in the internet and the only thing i read is that this error happends when i have a unclose tag but i review the site and i...

Extension methods to extend class members?

Hi all. I'd like to write an extension method that extends some member of my class. Specifically, I'd like to extend an enum. However, this is not working: namespace mynamespace { public class myclass { public enum ErrorCodes { Error1, Error2, Error3 } public static double GetDoubl...

How to get WinForms app to find a log4net config file when running from the IDE?

I'm using log4net with a VisualStudio WinForms app, and I need log4net to find its config file. (I must keep the config settings in a separate file.) It works if the config file is in the directory with the executable, but how do I get it there? For now I've added a post-build action: copy "$(ProjectDir)test.log4net.xml" "$(TargetDir)"...

Popout window issue for WPF

Now, I got a Installation Window, which have a cancel button to 1) pause the storyboarding 2) popout my Cancel Window For Cancel Window, there will be an "OK" button for me to be prompted to Failed Window. So now I want to know how to track when the User closes the window (X) button, so I can close the Cancel Window and thus returning ...

Code to be executed only when application is run outside of visual studio ?

I have a WPF windows application that makes a call to a DLL for registration. I need this code to be called only when the application is run outside of visual studio. In other words, when clicking run from within the visual studio, I dont want this code executed but want it executed if EXE is called outside of visual studio. Is there a ...

VS 2008 crashes after Anti-XSS added

Hello I'm using visual studio 2008 with asp.net mvc 2. I need anti xss library to santitize an input which is generated by rich text editor (lightweight RTE). I want to use AntiXss.GetSafeHtmlFragment(input); function. the problem is that VS 2008 crashes after I reference anti xss dll (it works fine in the first time but than it crashe...

Why does VS require constant for array size, and MinGW does not? And is there a way around it?

I have ported some code from Mingw which i wrote using code::blocks, to visual studio and their compiler, it has picked up many errors that my array sizes must be constant! Why does VS need a constant size and mingw does not? e.g. const int len = (strlen(szPath)-20); char szModiPath[len]; the len variable is underlined in red to say...

Visual Studio 2008 upgrade to 2010 (in-place, solutions, etc)??

I have Visual Studio 2008 installed on a Windows 2008 Enterprise Server. I am thinking of upgrading to Visual Studio 2010 and wanted to know if this would be an in-place upgrade, or do I have to completely uninstalled Visual Studio 2008 then install 2010? What about all my solutions, do I have to upgrade them to 2010 as well? ...

Visual Studio Linking Problem with Cuda

I am doing some programming with nVidia's CUDA C. I am using Visual Studio 2008 as my development environment and I am having some troubles with some linking and I am wondering if someone knows a way to fix it or has had the same problem and could offer a solution. My program is made up of 3 files. 1 header file (stuff.h), 1 C source fi...

In Eclipse, is there an equivalent to Visual Studio's 'Watch'?

In VS, you can 'Watch' an object and drill down into it. Is there an equivalent when programming Java in Eclipse? ...

Any program to combine several images into one for use with CSS and to reduce round trip count?

I'm looking at ways to reduce the quantity of Round Trips to my site for my clients. Right now I have several images that I think should be combined into a single image like this: http://aspnetajax.componentart.com/common/themes/20101/Office2010Silver/Static.png and then spit out some CSS like this: http://aspnetajax.componentart.co...