visual-studio

Lambda expression create unrelated compile error

Hi, Whenever I add a lambda expression (in the following form) to my wpf project, I get an error. The errors are nothing to do with the expression, but they arrive every time I add one. here is my latest: using ( LeisureServiceClient client = ServiceFactory.Instance.GetLeisureService() ) { client.Execute( ServiceFactory.Instance.C...

Unable to find WPF User Controls in Visual Studio C# 2008; stuck with nonexistant Control instead.

Hi guys, This is a rather unusual question but here's the issue: I have a WPF control created in Visual Studio C# 2008, map.xaml, created in the project Remote. I want to add this to a Windows Form, also in Remote, using the ElementHost tool. Simple, right? I created the ElementHost, went to select the HostedContent, but the only cho...

How to add a custom icon to Setup Project in Visual Studio?

I am trying to add a custom icon to setup project. So instead of standard installer logo I have my custom logo. To make it clear, here is the icon, which I want to change: ...

Big problems with MFC/WinAPI

I need to create a SDI form with a formview that has two tabs, which encapsulate multiple dialogs as the tab content. But the form has to have a colored background. And things like these makes me hate programming. First, I tried CTabControl, via resource editor, tried different things, but the undocumented behavior and the quirks with ...

Why Visual Studio doesn't adds AspNetCompiler settings in solution file for configurations different from standard (Release/Debug)?

I have 3 build configurations for my solution: Release, Debug, and Custom. Also I have WebSite (yes, not a WebApplication) project type. By default, when you create WebSite VisualStudio 2008 adds to the solution file following sections: Debug.AspNetCompiler.VirtualPath = "/MyWebSite" Debug.AspNetCompiler.PhysicalPath = "MyWebSite\" Debu...

Find replace with Regex adding extra text

I am using a regex within Visual Studio 2005 to turn my SQL statement into a readable string. I am using the find expression {.*} and the replace expression & "\1 " _. This should produce results something like: input: select * from x expected & "select * " _ & "from x " _ The reality is I am getting: & "select * " _& " "_ & "fr...

Just found Power++

I found Power++ and to my suprise it looks like a good alternative for Delphi and Visual Studio. Anyone used it? Can you tell me if it is worth it buying/learning it? ...

Run NUnit 2.5.5 tests from within Visual Studio 2010 Ultimate and using .NET 4.0 code?

How can I do it? All the test runners seem to work for VS2008 but not 2010 and if they do, not for .NET 4. Thanks ...

Why does cast always returns zero only when debugging in VS2010?

Only on my machine this happens. Basically if i run the following all is as expected: double d = 500.22; int i = (int)d; Console.WriteLine(i.ToString()); Output is 500. However if i put a breakpoint on the first line and step through, i always reverts to zero and the output is 0. I've tested this on other mac...

Get active Visual Studio object

Hi, using this code I get the object representing Visual Studio: var dte2 = Marshal.GetActiveObject("VisualStudio.DTE.10.0") as DTE2; However, when I have multiple instances of VS opened, this returns any instance of VS, not the one I am currently executing the code from. I am not within an add-in so I don't have access to the applic...

Add Method Wizard in VS 2010 Express

How do I create Add Method Wizard in VS C# 2010 Express. It was something like right click on a class library and Add method in Visual Studio.Net 2003. Now when I right click on the class I don't see Add method menu. any Help please? Thanks ...

Can't open project created from Visual Studio Web Developer 2008 with Visual Studio Professional 2008

I have several projects that opened just fine in Visual Studio Web Developer 2008 Express Edition, but can't be opened in VS 2008 Professional Edition! These projects are just .NET Framework 3.5 class libraries, and they are on the same machine. The error is "The project [myproject.csproj] cannot be opened. The project type is not suppo...

Create file/folder structure in VS 2010

Hello. I am somewhat of a novice and am seeking some help. I am working in Visual Studios 2010 and have my solution that has my project that I am currently working on. Specifically I am working on a Win32 Project. I don't know if that is important to know or not. I have made a file/folder structure in the directory I am working on to h...

How to prevent the copy of XML documentation files in a release mode build?

I have a Visual Studio 2010 project which references some third-party components. Their assemblies are accompanied by XML documentation files, which are useful for us (and only us) developers. And whenever the project is built (either in Debug or Release modes) these XML files are copied to the build directory. I can't seem to find a se...

Foreign Characters Appearing In Git-Managed Files

I am using git 1.7.2.3 via cygwin on Windows 7 and seeing strange artifacts appearing in some of my source files when switching branches. git status reports everything as unchanged yet they crazy characters are present. I've confirmed on GitHub that the files are as they should be in the repo. My Copy: ਍        ⼀⼀⼀ 㰀猀甀洀洀愀爀礀㸀ഀഀ ...

Idea for extending C# syntax

Hi, C# unfortunately does not allow for extra user-defined syntax. But I was wondering whether it was possible to surpass this limitation by tapping into the visual studio onbuild-event. Suppose I have some syntactic sugar which could be easily translated into actual C# code. If I were to automatically translate a cs document containin...

Why is my debug executable in Visual Studio (9) starting up so slowly?

I am experiencing a very weird issue when using Visual Studio (9) for debugging my applications. Whenever I hit F5 to start the debugging, the application takes a long time until it even gets to the first line of my main function... I started up Process Explorer and during this time you can see how slowly it finds and loads the required...

Stat Counter Not accurate all of a sudden on my site

Stat Counter Not showing Accurate Hits Webiste: www.curbappealconcepts.com I have pasted xhtml code into the head tags of my site.master page for the stat counter. This site was built with Visual Studio 2010 in C# ASP.NET I dont know if any of this matters just wanted to be thorough. The stat counter im using is from www.statcounte...

Incorrect reference PcapDotNet.?.dll

Hello I try to use PcapDotNet dll but I can't add reference to my project. It doesn't matter which dll it is. PcapDotNet.Core.dll, PcapDotNet.Base.dll etc. I have yellow exclamation mark near this reference and can't use any methods from this dll. Ofc "using PcapDotNet.Core;" is underlined too and compiler shows me: "The type or namespac...

Visual Studio 2010 hangs on loading web.config

I have a weird situation: Visual Studio 2010 will hang up indefinitely on me when opening certain websites. It prompts me for my credentials and loads up much of the project tree, and then just hangs at the "Preparing Solution..." dialog, which just then never goes away. In every case, the status bar of VS says that it is currently loadi...