visual-studio

How do I add a navigation property for a Entity Framework Complex Type

I'm using VS2010 Beta 2, I have a Complex Type called Address with the following properties: Street City CountryId I have a Country Entity defined in my Model, but I can't seem to find a way to add a reference (Navigation Property) from the CountryId property of my Complex Type to the Id property of my Country entity. I'm I going ab...

Visual Studio 2008 resolving wrong reference

In my project file, I have the following entry: <Reference Include="Microsoft.Practices.Unity, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <HintPath>..\..\..\..\Libraries\Microsoft.Practices.Unity.dll</HintPath> </Reference> which in absolute terms translates to: C:\dev\LUT600 ...

Does ASP.NET support C++?

When I go to New -> Web site, in the drop-down menu "Language" there are only 2 languages: Visual C# and Visual Basic. No Visual C++. Maybe, I'm using wrong version of Visual Studio? (mine is 9.0.21022) I tried to google this problem. I found a topic which tells that using C++ in ASP.NET is impossible. But it was posted in 2002 and I ho...

Why ReSharper offers a variable name with a "class" suffix?

Hi guys, I was wondering why R# offers a variable name with a "class" suffix? When I am creating an instance of a class, why would I put a class suffix of my instance? Can there be any reason to have a such thing: BusinessClass myBusinessClass = new BusinessClass(); Thanks. ...

#region/#endregion vs sub functions?

How do you recommend using #region / #endregion? To what extent should that replace using sub functions to clarify your code? ...

Web Access in Visual Studio 2010

I try to upgrade a plug-in that was on webaccess 2008. Whe were using WebAccessSession to get the user name of the current user logged (WebAccessSession.Current.Connection.UserName ). I Imagine now that it is in tfsConnection but I'm not sure. Is there any documentation that tells what really changes between Team Foundation Server 200...

Reading from web.config while running Pex explorations

I've just started using Pex to generate parameterized unit-tests for my project. However, when I let Pex run its explorations, my code crashes because it cannot read from the web.config (ConfigurationSettings.AppSettings has zero elements to be more precise). The working-directory during the explorations is: "C:\Program Files (x86)\Micro...

How to overlay a control onto the Visual Studio code surface

I am writing an addin into Sql Server Management Studio, using the Visual Studio Extensibilty APIs. I have had some success overlaying a control onto the text surface (I'm attempting to emulate the CodeRush/Refactor action list, similar to the intellisense combo), however I can only locate it's coordinate space based the following proper...

Alter initial Visual Studio code behind stub code?

When I add a new form to an ASP.NET project (WebForms), and then "View Code" some basic stub code is added -- basic "using" statements, form_load event, etc. So the first thing I have to do is add some project usings, etc. Is there anyway to alter this canned code to what I want, vs. what it puts up by default? Would templates be the ...

Free tools that automatically reformat whole C/C++ source files in VS2008 on save?

I'm looking for a tool (macro, extension) for Visual Studio 2008 that would reformat the source code (C/C++) when you save the file. ...

Javascript intellsense not working in VS2010 Beta 2

Hi, i've just installed the VS2010 premium beta 2 and I can't get javascript intellisense to work. is there a setting I have to change to enable? Thanks ...

How to find all unused members or objects

I want to try to make code reviews go a bit faster. While in VS, on a particular class or .aspx page or whatever it is, I can right-click a variable, method, property and use the Find Usages, that's still a very manual process and I wouldn't want to do this on every single method, property, etc. on a page...because most probably have no...

how to export visual studio project to qt?

Hi, I wonder how can I export a Visual Studio C++ project to qt? I am using openCV and openMP so I would like to know about setting this libraries in qt. Thank you very much. ...

Stop Visual Studio Design mode from refreshing

Does anyone know how to stop Visual Studio from automatically refreshing the Design view everytime I modify the source file associated with a Form? I'm updating strings on a form that has about a million controls. I'm constantly going back and forth between the design and code for a form. The load time it takes to render the design ea...

Adding icons to application

Hello I am trying to add to my application some icons via the code. When i run my executable from debug / release compilation folder it works good . But when I move my executable files to other folders it tells me that it doesn't find the icon files . Any idea how/where I should tell the compiler to add those files to my final exec...

Visual Studio does not break at exceptions in Form_Load Event

I recently updated my laptop from Vista 32bit with Visual Studio 2005/2008 installed to Windows 7 x64 with only Visual Studio 2008 installed. So I don't know if this is a "Windows 7" issue or just a configuration within visual studio. My problem is that exeptions in the Form_Load() event get swallowed without notifing me, which makes i...

How to write Visual Studio addin for custom text coloring?

Hello. I need to write a visual studio 2005+ addin for custom coloring of some file format (for example, i need to highlight all words "test" in files that has ".test" extension). Is it any good tutorials available? MSDN help is very general and huge :(. Preferable language is C#, but VB or C++ will do too :). ...

What is Visual Studio GDR R2, and do I still need the Power Tools?

I am working on quite a large DB based project and I like the look of a few of the power tools. Looking through the related downloads, I found out about GDR R2, I cannot find out that much information about it - Not even sure what GDR stands for, but one thing that caught my eye - "this release incorporates many previously released Pow...

C#: Powerpoint does not Quit?

Hello, I have a script that opens Powerpoint from my application and exports all slides. After that, I need the application to be closed. I've tried without any luck. Could you please help? using System; using System.Collections.Generic; using System.Text; using System.IO; using Powerpoint = Microsoft.Office.Interop.PowerPoint; using M...

How do I make an object's variable name editable in the designer?

I've written a custom control which mimics the appearance of a table header. The columns it draws are given by a collection of objects with a Text string property and a Width int property. Both have Browsable, Category, DefaultValue and Description attributes added. In the designer, the collection is editable and the user can set the ...