visual-studio-2008

Conditional References

Currently our .net code is not processor specific, but it depends on libraries (Oracle/ODP.Net) which are. We've found a solution where we edit the csproj file directly, and put the references in to item groups with a Condition clause based on our selected build configuration. We have 32 bit debug/release and 64bit debug/release, and t...

Refreshing a DBML diagram?

Really stupid question, sorry, but I can't find it on google (I'm sure it's in a screencast or something somewhere). I have a DBML (linq2sql classes) diagram and I've changed the underlying database. In VS2008, how do I "refresh" the diagram? There's no View-->Refresh or RightClick->Refresh or Update option. As it stands now, I have to ...

Why the native DLL is not copied to the output directory

I have a C# project A which uses a .net wrapper DLL and a native DLL. I add the .net wrapper DLL to the reference list of project A. Since the wrapper DLL only works with the native DLL when they are in the same folder, the native DLL should be copied to the output directory of project A. I achieve this by adding the native DLL as a cont...

Change run action in Visual Studio database project

I have a database project in Visual Studio 2008, and I want the ability to run a preprocessor on my sql code (using it to allow for variable database names without resorting to dynamic sql). So I'd like to change what action occurs when I hit the run button to include running the code through the preprocessor automatically. Is there a ...

WPF Basics: How to set an outside property in a DataTrigger?

Hi, I"m trying to get my head wrapped around the WPF model. I have a list box of items. Inside the list box items are string identifiers. This works fine. What I want is to have it so that the identifier from the currently selected item is accessible in my code-behind for the enclosing control. I have this: <ListBox.ItemTemplate> <D...

What does Setup Project do for .NET COM?

Ok, imagine the simplest solution in Visual Studio 2008 with framework 3.5 (OS = Win XP) where I have added a class library. Then I've added a COM Class. This COM Class is so simple, it only exposes 1 function: Public Function SayHello() As String Return " Hello." End Function I've build this class library, which produced the .dll and ...

Disabling Visual Studio hosting process on Visual Studio 2008

Hello, All instructions to disable Visual Studio hosting process I've found says as follows: Open a project in Visual Studio. On the Project menu, click Properties. Click the Debug tab. Clear the Enable the Visual Studio hosting process check box. I believe this is for VS 2005 because in my VS 2008 C++ project there is no such tab a...

Does .NET MVC work when System.Web.Mvc is loaded in the GAC?

Is it allowed to put System.Web.Mvc in the GAC? Allowed as in: does it work? I have done this and all my projects have problems inheriting from System.Web.Mvc.ViewPage... EDIT Hope this doesn't scare you: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE> "c:\WINDOWS\Microsoft.NET\Framework\v3.5\vbc.exe" /t:library /utf8output ...

How I can find all extension methods in solution ?

How I can find all extension methods in solution ? ...

vs 2008 broken snippets functionality

Is there a way to reset to the original vb.net snippets that came along with visual studio 2008? I recently installed a purchased third party lib, that managed to break almost all the default snippets. I can see that the snippets do physically exist in C:\Program Files\Microsoft Visual Studio 9.0\VB\Snippets\1033 but only the followi...

Is it possible to invoke .NET Reflector when pressing F1 in Visual Studio?

When I press F1 in Visual Studio 2008, I would like to start .NET reflector and navigate to the selected class/method (instead of waiting for the Visual Studio documentation to start up). Is it possible to configure Visual Studio in that way? Follow-up question: how to determine the type/assembly under the caret (as described in x0...

Hiding the regions in Visual Studio

I know VS code folding issues are an old chestnut, but I haven't been able to find this in all the other discussions I have browsed through: We have a team of C# guys, some love regions and others hate them and we don't seem to have much middle ground to work with. Is there a plug- or add-in for VS that will just 'hide' the regions? S...

Consuming a WCF service - c#, VS2008 with 3.5 SP1

I am trying to cnsume a WCF service.I was given the URL to the svc file. 1. Created a Windows form application 2. Added a service reference to the svc file 3. In my code behind during form load event, i call the method exposed by service ServiceReference1.SearchServiceClient search = new WindowsFormsApplication1.ServiceReference...

Calling text message from XML file.

Currently i'm developing a software which uses layered architecture using Visual Studio 2008 and C#. In that system I want to keep all the text messages(that will be shown using message boxes when necessary) in an XML file so that if I update any message I dont have to compile the whole system. How can I accomplish this? What will be th...

debugging with vs 2008?

Hi there, currently setup vs 2008 and been doing "PURE" javascript debugging with eclipse... so i wanted to give vs 2008 a try and debugging "PURE" javascript... I have vs2008 sp1 and i have unchecked the "disable ie client sscripting" in the IE8... I now set my breakpoint (in a .js file) and Attach process. and mark Internet explorer...

How to do Alpha Blending at design time for a Compact Framework Control

I'm designing a Compact Framework Control that supports transparency and for the runtime version of the control everything works just find doing the platform invoke on this API: [DllImport("coredll.dll")] extern public static Int32 AlphaBlend(IntPtr hdcDest, Int32 xDest, Int32 yDest, Int32 cxDest, Int32 cyDest, IntPtr hdcSrc, Int32 ...

Debugging xsp on windows

Is it possible to debug a website running under xsp on windows? I would like to attach to the process from visual studio if that is possible. I modified my xsp2.bat file to enable debuging @"C:\PROGRA~1\Mono-2.4\bin\mono.exe" --debug=mdb-optimizations "C:\PROGRA~1\Mono-2.4\lib\mono\2.0\winhack\xsp2.exe" %* but it doesn't seem to help. ...

VS2008 Web Deployment Project Section Replacement with Elmah

I'm using a web deployment project and want to do some section replacement with the emlah/errorMail section. I don't want to send emails in debug build mode. I have created the custom section and put it in an errorMail.config. In the properties of web deploy project under replacements, I have elmah/errorMail=errorMail.config. The error...

Visual Studio 2008 Xaml Editor not working / disappeared

When I start up VS 2008 to work on a WPF / Silverlight App and open a XAML or XML file the XAML / XML editor is no longer working. The designer does not show up and intellisense is unavailable. It basically looks like a text file has been opened. ...

Visual Studio - quick key or snippet for <% %>

My goal is to be able to quickly type this: <%= %> Can anyone suggest a way to make it easier within Visual Studio to insert the HTML code escape block. (I am not even sure the name of this piece of code!) I realize that typing <% in the code editor will autocomplete the escape block for me, but perhaps there's an easier way to input...