visual-studio-2008

Visual Studio Macro to Format all Files in a Solution

▼魔方 西西 提交于 2019-12-17 19:57:10
问题 I've recently settled on a new format style for my code and want to replace the existing code. The only problem is there's 100's if not 1000's of files in my solution and i don't fancy formatting each one individually. I was wondering how to create a macro to open every file in the solution that has the .cs file extension and simply select all the text and then cut and paste it (which would format it accordingly). It would also be great if it could sort and removing the using statements

Allow multi-line String properties in the Properties window

无人久伴 提交于 2019-12-17 19:49:00
问题 I've got a Windows Form User Control with a string property for setting the text of a textbox. This string can be multi-line. I've noticed that on some controls with a text property, and instead of being forced to type in the single line property textbox, you get a little pop up where you can type multiple lines. (As a matter of fact, a Windows Forms Textbox control allows this on the Text property.) How do I enable this functionality in the properties window for the property I have designed?

Combo box drop down width on suggest

╄→尐↘猪︶ㄣ 提交于 2019-12-17 19:37:08
问题 I have a form which has a Combo Box Control. I have selected the drop down style property to DropDown. I have also set the DropDown Width to 250. I have set the auto complete mode to suggest and the auto complete source to listitems. it works absolutely fine when i click on the drop down. but when i type in somethin, the auto complete mode activates a drop down which has a small width. any help appreciate. i wanna know how to increase the width of the auto complete drop down via code so that

Debugging commands (step over/into) cause unhandled exceptions

妖精的绣舞 提交于 2019-12-17 18:59:37
问题 I'm using Visual Studio 2008 on a 64-bit version of Vista. After my program stops on one of my breakpoints, I can't step over or into the current line without either an Illegal Instruction exception or an Access Violation exception being thrown by my application. If I right-click on the next line and choose "Run to here" (equivalent to "Step over"), it works fine. Addendum: there is nothing in any watch windows. Also, here's something I forgot to mention: if I attach to the process,

Prevent Visual Studio from adding default references and usings for new classes

老子叫甜甜 提交于 2019-12-17 18:55:43
问题 Whenever I add a new class to a Visual Studio (C#) project, I get the following usings automatically: using System; using System.Collections.Generic; using System.Linq; using System.Text; Additionally, the following DLL references are added if they weren't there already: System.Core System.Data System.Xml I'd like to prevent VS from doing this (except "using System" of course). Does any one know of a way to prevent this from happening? 回答1: Marc and Brian both have a good idea: create a new

Catch block not catching exception

邮差的信 提交于 2019-12-17 18:44:21
问题 I have a child form that is throwing an ApplicationException in the Load event handler (intentionally for testing purposes). The parent form wraps the ChildForm.Show() method in a Try...Catch ex As Exception block. The catch block simply displays a message and closes the child form. All works as expected when debugged in visual studio 2008 (.net 3.5 sp1). However, when I run it outside of visual studio, the Catch block seems to get missed and an unhandled exception occurs. Any idea why that

How to build with v90 platform toolset in VS2012 without VS2008, using Windows SDK?

落花浮王杯 提交于 2019-12-17 18:20:51
问题 I use Visual Studio 2012 and this is the only version of Visual Studio I have installed. I need to build certain C++ projects with the v90 platform toolset (of Visual Studio 2008), but I can't install Visual Studio 2008. I understand it is possible to use the v90 platform toolset by installing Windows SDK 7.0. How exactly is it done? If I simply use the web installer of 7.0 SP1, I still don't see v90 as one of the possible platform toolsets. 回答1: It is possible, but apparently requires some

Getting started with Silverlight development

谁都会走 提交于 2019-12-17 18:11:04
问题 How does one start development in Silverlight? Does one need a new IDE? or Visual studio will support? 回答1: Yes there is tooling support for Visual Studio. It is still in Beta though. Get Started Building Silverlight 2 Applications 1) Install Visual Studio 2008 then Install Silverlight Tools Beta 2 for Visual Studio 2008 This add-on to Visual Studio 2008 allows you to use .NET to create Silverlight 2 Beta 2 Web sites. The Silverlight 2 Beta 2 Runtime and the Silverlight 2 Beta 2 SDK are

Why can't I reference my class library?

故事扮演 提交于 2019-12-17 17:59:29
问题 I have a solution that contains a website and a class library in Visual Studio 2008. I then have another web site project outside of the solution that needs to reference the class library. I right click the Bin folder or Project and select Add Reference, then select my Class Library Project, it adds the 15 or so DLLs that the class library needs to the websites bin folder, but none of the .cs files recognize the using statements. using MyLibrary.MyFolder; It says that it can't resolve it, and

HintPath on a added reference in Visual Studio

岁酱吖の 提交于 2019-12-17 17:54:32
问题 I know that I can add a HintPath to an external DLLs to help Visual Studio/TFS find the dll when it builds. What I was wondering is... is it possible to add multiple HintPath ? For example... developers have their DLLs for one place and we do a GetLatest of those DLLs at a different place on the server hence the need for multiple HintPath . What do you think, world? 回答1: Sorry, you can't use multiple HintPath's. Visual Studio/MSBuild takes only the last <HintPath> definition and will ignore