visual-studio

Force enconding of all files within a Visual Studio solution directly from Visual Studio

Any way to convert the encoding of all the files within a VS solution (*.sln) directly inside Visual Studio? (I am using 2008). Any Add-in for this effect? ...

how to use regex negation string

hi can any body tell me how to use regex for negation of string? I wanna find all line that start with public class and then any thing except first,second and finally any thing else. for example in the result i expect to see public class base but not public class myfirst:base can any body help me please?? ...

Is there a way to make VS/R#/whatever enforce CLR/CTS types instead of C# ones?

It has nothing to do with the question per se, but I guess I'd rather state my reason for wanting to. I'm not developing an API to be consumed by a lot of other .NET languages or anything like that, but it's rather a matter of style and readability. I don't like how the C# aliases are 1. colored in VS like reserved words instead of typ...

Difficulty starting VS 2010 debugger attached to Outlook to debug plugin

I'm trying to write an Outlook Addin in C# using Visual Studio 2010 and WPF and it's turning out to be difficult to debug. I would like to have VS automatically attach to OUTLOOK.EXE upon startup so that I can hit breakpoints easily. So, I went into the project's properties > Debug tab > Start Action and changed this setting from "Star...

Why does my NotifyIcon1_mouseclick event do nothing while executing module Subroutine in Try block?

When I debug my application I am able to use the NotifyIcon1_MouseClick until it reaches a portion of the code. Does Anyone know why it would be doing this and how to resolve it? Here is my main: Module Main Public startdate As DateTime Public oGvar As New cGVar Public Event FinishedWritingTxtFile() Public Event ErrorSendEmail() Publ...

How to access web service on port other than 80 in vs2008/2010

Hi all, I tried searching the net, also tried some workarounds I found (like manually executing wsdl.exe) but still I can't access a remote web service running on a port different than 80 (say 1234). When from Visual Studio 2008 OR 2010 I add a web reference using a url like http://192.168.1.2:1234/WebServices/Test.asmx, the service ...

Is there a free tool/plugin that can format code ect on the fly for VS C#?

Ive just moved from VB.Net to C#. I dont understand why people are using it/prefer it as it is soo much more time consuming! In VB.NET, you simply type your code and VB.NET formats is as you go, For example: removes unneccessary whitespace, automatically puts in brackets, tabs blocks of code, automatically creates the NEXT, END IF, sta...

How do you get Visual Studio to recognise XAML changes?

I have just started with WPF so am probably missing something simple here. I have a window that I am editing in VS 2010. When I change the XAML by hand and then run the application (F5) the window remains as before my edit, however if I do a rebuild and then run the application my changes show up. Is there any way to get VS to recognise...

C++ - Memory leak testing with _CrtDumpMemoryLeaks() - Does not output line numbers

Hi. I'm working on a game with SDL in Visual Studio 2010. I came across the _CrtDumpMemoryLeaks() macro and thought I'd give it a go. Invoking _CrtDumpMemoryLeaks() does print memory leaks to the output window, but it does not show where it happens. I've read the MSDN article at http://msdn.microsoft.com/en-us/library/e5ewb1h3(v=VS.80)...

Add compiler flag for Visual Studio 2005 with CMake 2.8.1

Probably an easy beginners question: I want to add the compiler flag /EHsc to my project and tried both SET_TARGET_PROPERTIES(name_of_my_project PROPERTIES COMPILER_FLAGS "/EHsc") and SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") in my CMakeLists.txt. With both, CMake generates a Visual Studio Solution without complaining. EDI...

When creating a custom Task how to get access to the MSBuild verbosity?

In the context of creating a custom Microsoft.Build.Utilities.Task how do I get access to the MSBuild verbosity? Microsoft.Build.Utilities.Task: http://msdn.microsoft.com/en-us/library/microsoft.build.utilities.task.aspx MSBuild verbosity: http://blogs.msdn.com/b/saraford/archive/2008/10/07/did-you-know-you-can-configure-the-msbuild-ve...

Debug heap memory leak detection - strange results?

I think my C++ application is tight and doesn't leak any memory. Long running stress tests and static code analyzers seem to indicate as much. However, when exercising a very complex usage szenario the Visual Studio 2008 built in debug heap will show a couple of warnings like the following on exit: Detected memory leaks! Dumping objects...

How do I reset Visual Studio so that it once again searches for source files of DLLs while debugging?

Hallo! In the process of debugging my WPF project, I regularly encounter thrown exceptions. When these exceptions fire, if the exception is thrown by my application's code, I am able to browse the source code. All is well. HOWEVER, if an exception is thrown by code hosted in another assembly (that we built), I am unable to browse for t...

Entity framework: How can I use more then one context?

Hi, I'm new with EntityFramework. My application has a pool of context object instances (Each context has 1 connection to the DB). The problem is that when I update an object (and calling SaveChanges), the data is updated in the DB and in the updating context but when I select from other instance, it gets the old data of the selected ...

Visual Studio 2008 Intellisense Priority Settings

Is there someway to get VS 2008 intellisense to default to Properties over Classes in a name collision? Example: Within my scope I have a property Foo, but I'm also using a class Foo. When writing code, if I start to type F o, VS2008 intellisense will think I mean the class Foo. I want it to think I mean the property Foo instead. ...

@ Character at the begining of fonts in CSS

When working with Visual Studio, I always see that @ character when selecting font family in CSS editor and finally I decided to ask what that is. Sample image right below : Thanks in advance. P.s : It seems like fonts installed only my computer or not general fonts but I am not prerry sure tho. ...

Managing internal 3rd Party Dependencies

We have a lot of different solutions/projects which are managed by different teams. Our solution needs to reference several projects that another team owns. We don't want to add these dependencies as project references because we do not intend on modifying that code, we just want to use it. Also we already have quite a bit of projects in...

ASP.NET Development Server Restart EVERY Time

If I make a change in my ASP.NET project using VS2008 or VS2010, I must stop the ASP.NET development server and restart it (usually by "View in Browser") to see the change reflected. I'm having the exact same problem as this guy: http://stackoverflow.com/questions/1733926/asp-net-development-server-needs-restart-every-time Except for m...

Breakpoint Problem in VS2008

I have an ASP.NET web site project that I want to debug, but when I try to debug it Visual Studio gives the message "The breakpoint will not currently be hit. No symbols have been loaded for this document". Does anyone know of a solution to this that does not involve reinstalling everything. Debug is enabled on those files. Edit: manual...

VIsual Studio 2010 ultimate crashes when I make a SQL Server 2005 project

Hi Every time I try to create a new SQL Server 2005 server project I get this error. Then after I hit ok Visual Studio 2010 crashes. Could not load file or assembly 'System.Data.SqlServerCe, Version 3.5.1.0, Culture=neutrail, PublicKeyToke=89845dcd908080cc91' or one of it dependencies. The system cannot find the file specifi...