visual-studio

Is there a setting or good add-in for Visual Studio to color lines (like Throw) in the editor?

Is there a setting (didn't find one of hand) or good add-in (SO is better for recommendations than Google) for Visual Studio to color lines specially in the editor depending on what keywords or statements it contains? For example, if a line contains "Throw", it'd be nice to see either that word or the line in red, similarly for "Debug.A...

User scope vs Application scope in app.config

What is the difference between the User scope and Application scope in app.config? ...

Visual Studio XSD Tool: Generate Collections Rather Than Arrays

I generated some C# classes from an XSD using the Visual Studio XSD utility and it generated arrays for storing a collection of elements, rather than one of the built-in generic Collection<T> (or related) classes. None of the command line parameters mentioned in xsd /? mention anything about generating collections rather than arrays, bu...

Different mscoree.dll entry points on the desktop & on a device?

In a smart device project I'm trying to Pinvoke a function that should supposedly be available in mscoree.dll. The associated definition is as follows: [DllImport("mscoree.dll", EntryPoint = "#29")] internal static extern int Object_GetHashCode(object obj); You'll find this with Reflector in the internal class EE in mscorlib.dll. Note...

What happened to my VS Team project bindings?

I'm new to using Team Explorer, I create a new project in source control using VSTS, then I see the plus signs, check marks etc. Then I closed the project and reopened it, all the plus signs and check marks are gone as if the project is not under source control. Why is this happening I wonder? Thanks, Ray. ...

How do you remove the bindings from a VS Team project?

How do you remove the bindings from a VS Team project, is it just a matter of deleting ".vspscc" files? What is the best way to do this, say I have a project on CodePlex and it is time to package it up for release, but by default the bindings come with the source so when others open the solution it interferes with it. Thanks, Ray. ...

Assembly's App.Config is being ignored; Machine.config being read instead.

In running my VS2008 unit integration tests against my DAL, I have found that the assembly is reading machine.config instead of the assembly's app.config. Here's the rundown on the call stack: Unit Test Project has method calling into a DataLayer Project MyDataLayer class inherits from a base class. Method is called GetStuff() Base c...

Visual Studio: Is there an incremental search for the entire solution?

I am very fond of the keyboard shortcuts built into Visual Studio. One of my favorites is Ctrl+i, which triggers the incremental search. It jumps over the text in the current document as I fill in the searchword. After the desired searchword is typed, I use F3 to jump through the matches. It works fine, except that is is limited to sear...

Debug with an incompatible Visual Studio, but with .pdb

Okay, weird situation: I need to Debug a VSTO Office Addin. This was written in Visual Studio 2008 Professional and debugging is usually done by loading the Project, Attaching to Outlook.exe and setting breakpoints - works fine. But I gave a situation where it does not work as expected on one machine, but I do not have VS2008 Pro on tha...

Source file Encoding in Visual Studio (VS2005 but can apply to other versions)

Is there an option to easily view the current file's encoding (utf-8, utf-8 w/out BOM, ascii, western, etc)? I am working mostly on the web applications, so this is crucial to me. I can't find this anywhere besides the "Save as" dialog... When you are saving a file in Visual Studio, you can choose "Save MyClass.cs as", and then click o...

CMD Full Screen Visual Studio

I accidently made a command shell full screen, I managed to get it back to its original state but now when I run visual studio my screen flashes black, I assume this is the full screen command shell kickign in. Can anyone help please? If one more colleague asks do I have a virus I am going to headbut the desk. Thanks, B ...

How to begin a text selection in a Visual Studio macro

Long ago in a former editor, there was the ability to begin a macro, and then "open" the text selection...such that if your next action was to, say, search for some string - the text selection would then extend to that spot. This was a great way to do fairly sophisticated operations without having to use wildcards or regular expressions...

Folders to ignore on subversion commit

Which folders may I not commit to subversion server? I'm talking about an standard asp.net web application in Visual Studio 2.008. I think the bin folder because it's files are regenerated, is there any other? ...

How do I turn off Visual Studio's formatting options?

So I have this annoying issue with Visual Studio (when working with C#), I've been digging around in the C# formatting options, general VS options and on google and MSDN but can't really find a fix for this - I'm assuming there's just a checkbox somewhere and I've just overlooked it. Here it is: I like to format my code like this: Type...

How to Relocate Visual Studio project (.sln) file

I would like to move the Visual Studio solution (myProject.sln) file into a folder. The problem with doing this is that all the relative paths in the project will break, how can you relocate the project without updating all relative paths inside the project manually? Thanks. ...

Is there a way to automatically avoiding stepping into certain functions in Visual Studio?

I'm aware of the "Enable just my code" debug option, but that only works for managed code. I'm looking for a way to step into a function call without having to step through, for example, an STL string cast operator because there is an implicit conversion from a char* to a string in one of the function's parameters. ...

Using Visual Studio to make non aspx code-behind pages

I want to build my own "code behind" like pages so that i can have HTML in a HTML file and code in cs file but be able to have Intellesense for the tokens in the HTML file. (i know that's what the .NET page class does, but i want to have something much lighter) EG: in the .html file: <%@ Directive classname="HTMLSnippet" %> <html> <...

Unable to create PDB file

For some reason this error started popping up today on one of my projects. Error 1 Unable to write to output file 'C:\MyProject\Release\MyProject.pdb': Unspecified error If I go into advanced compile options and change it to not generate and debug info, my project compiles fine. I have tried setting the permissions on the Rele...

VS 2008 and Team Explorer- checked out files

how to search for files checked out by other users in vs 2008 Team Explorer. I can search for all the files checked out in a project in Visual Source Safe by doing a search, Is there a similar functionality implemented in team explorer? Right now I have to click on every folder and see if files from that folder are checked out by any one...

Display lines number in Stack Trace for .NET assembly in Release mode

Is there a way to display the lines in the stack trace for the .NET assembly build/deployed in Release mode? UPDATE: My application is divided into three class library projects and one ASP.NET "website" project. The error I am trying to track down is in one of the three class library projects. I only deployed the pdb file for the cl...