visual-studio-2010

View container of a control in a Form

I'm wont working with netbeans, and with Visual studio i can't find the way to view an hierarcal relation of the control(Parent container ---> Child) in the form, something like this : Is there a way to have a view like this in Visual Studio 2010 with c# programming language ? ...

How to generate local variable?

When writting codes, if we typed a undefined references, pressing Ctrl+. will bring up the generating-code list box which says generate field/property/method. I'm looking for a way to generate a local variable but I don't know how to. To make it more clearer, I'll give an example. Say we have a method void MyMethod(MyType param) { ...

GACed .net library project succesfully build only on second try

I'm trying to build a project library that needs to be in the GAC, so I added the following line as a post build event: "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe" -if "$(TargetPath)" For every even (second build, forth build, etc...) build execution I get this: ------ Build started: Project: Test.BusinessLog...

Visual Studio 2010 and custom markup extension

Hello. I have created a custom MarkupExtension for localization like below: [System.Windows.Markup.MarkupExtensionReturnType(typeof(string))] [System.Windows.Markup.ContentProperty("LocalizedValue")] public class LocItem : System.Windows.Markup.MarkupExtension { public LocItem() :base() { } public string Localiz...

MS Build Error 3181- Problem with referenced assemblies

Hello everybody, imagine the following scenario: Assembly "Foo.dll" references the ADOX-Library (Microsoft ADO Ext. 2.8 for DDL and Security) which was added as Interop.ADOX.dll in the bin-directory by VS 2010. "Local copy" of this reference was set to true, too. Assembly "Bar.exe" references both Foo.dll and additionally the ADOX-Lib...

VS 2010 - find text in XAML editor

Hi, In VS 2010, when searching for text in the XAML editor, the highlighted text is highlighted in the lightest gray colour when not in focus. Is it possible to change the background colour of the highlighted found item text? I've tried changing the VS theme but cannot find the property which would set this colour. In the screenshot bel...

C# The process cannot access the file ''' because it is being used by another process.

The snippet of code was just supposed to write a string into a text file called "all_results.txt". I had errors implementing in File.WriteAllText. After searching the net for solutions, I tried using FileStream and StreamWriter as substitutes. The problem still persists. It gave me: IOException Unhandled: The process cannot access the...

VS2010 target .net 2.0 and System.Runtime.Serialization

Why can't I add a reference to System.Runtime.Serialization when targeting .net 2.0? Also if I convert a vs2005 project using System.Runtime.Serialization the vs2010 conversion fails with a build error. I'm using the DataContract class and the compiler says The type or namespace name 'DataContract' could not be found (are you missing ...

Any way to add custom properties to the file properties grid in Visual Studio?

In Visual Studio (specifically, 2008 and 2010), when you invoke the View.PropertiesWindow command (default key, F4) in a C# project, you get a property grid with a standard set of properties that apply to all project items. Is there any way to customize that list of properties? Specifically, I'd like to associate additional information ...

Is there a Pre-Run event?

Hey, I use a Pre-build event to call an external compiler to compile an opencl kernel. This way i get all the errors messages inside the ide. But if you only change the kernel, the compiler is not required to run so there is no pre-build event, even if the kernel compile command would generate an error. So is there a way to run the comma...

Visual Studio 2010 Javascript/jQuery Documentation

OKay, TWO questions here: Is there anything like GhostDoc for JS? Are there any good help file generators that can use both C# AND JS source files to generate documentation? It looks like SandCastle doesn't support a web site as opposed to a web project with .proj files. And, as far as I can tell, Natural Docs doesn't support the Visua...

Deployment items not working with new Visual Studio 2010 test project

I created a new Visual Studio 2010 Test Project. <solution> <test-project> Resources test-data.csv tests.cs I added one test with one deployment item attribute. [TestMethod] [DeploymentItem("test-project\Resources")] public void Some_unit_test() { ... } The file in the Resources folder is not moving ...

How can I give Microsoft feedback regarding Windows CE support in VS2010?

I like using Visual Studio 2010, but miss having support for Smart Device Projects and Compact Framework (i.e. Windows CE, Pocket PC and Smart Phone). Where and how can I make my voice heard? Does MS have a public "feature requests" site where I could propose / vote on such support? ...

.NET 4.0 and his Web.Config's XDT

Hello, I'm trying to use the XDT in a 4.0 web application and I just don't figure out how! I know this is maybe weird (At least, all thread I've read since then, everybody seems to do it easly but hum, not me!!). Nothing working. Here's what I've tryed : Here's my Web.Debug.Config : <?xml version="1.0"?> <configuration xmlns:xdt="http...

Visual Studio 2010 Slow to Load

I have been happily using VS 2010 for several weeks without any performance problems. I installed dotCover from JetBrains several days ago and things continued to run well, but ran my first code coverage test earlier today. I double clicked on one of the report results and it successfully took me to the referenced line of code. I inadv...

Cold startup optimization

I tried to search, but so far with no luck. Does anyone know a good resource how one should do cold start optimizations? The app in question is C++/MFC app, compiled with VS2010, full version, with built in profiler available. I have tried to cut down all the extra weight to get the load times acceptable for warm start, but the cold sta...

Visual studio 2010 formatting showing and I can't remove it

It seems that stackoverflows image upload is broken in IE. http://imgur.com/HLbLe.png Basically I have a bunch of text-formatting showing like - instead of spaces. I was pressing a keycombo and accidentally typed one and I don't know what it was. How can I disable this? I've looked through all the options for Text Editor and couldn't f...

MFC data forwarding to main thread via PostMessage

I have a C++/MFC application I need to restructure. The app used to process most of the data on the main thread, therefore blocking the input, and now I want to change it so, that all GUI updates are done through PostMessage. Unfortunately, I can't seem to find a good source on how to achieve this goal. Right now I'm thinking of creati...

VB.NET Cross-threading operation not valid even though Invoke is used!

I've been reading around trying to find out why I'd be getting this exception to no avail. I hope someone has seen this before: I'm using Visual Basic 2010. Briefly, I have a "Settings Panel" form which takes a while to create (it contains a lot of labels and textboxes), so I create it in another thread. After it's loaded, it can be ...

Silverlight 4 - XamlParseException: Failed to create a 'System.Type' from the text 'local:CustomerEntity'

I am getting this exception when trying to debug a Silverlight 4 application in Visual Studio 2010. The exception will be thrown after it passes the InitializeComponent() line. The exception will only happen during debugging, but it does not seem to be a problem to the Visual Studio Designer. System.Windows.Markup.XamlParseException occ...