visual-studio-2008

Why does the Image element give me a design-time error with "add as link"ed images?

I need to display an image, which I've done without problems before, but today I decided to be tricky and use "add as link" instead. Well, now I get: The file Images/hello.png is not part of the project or its 'Build Action' property is not set to 'Resource'. Wait... its Build Action is set to Resource. I've seen a Silverlight soluti...

Visual Studio 2008 freeze after save

I recently added about a dozen classes from another solution into my current solution in Visual Studio. After adding these classes, Visual Studio started freezing for about 10 seconds whenever I Save. The cursor disappears and mouse clicks and keys do nothing. Some interesting points: Even after I removed the classes, the freezing...

Does Web Deploy work with VS2008?

I was wondering if Web Deploy found here: http://www.iis.net/expand/WebDeploy works with VS2008? ...

WPF application crash after ClickOnce publish

Hi, I have a problem with ClickOnce publishing of a WPF application. If the application is built (debug or release), it is running correctly. Application published by ClickOnce crashes. I tried to change Target Platform. Sometimes this change helps to solve problems, but not every time (1 of 20 cases). I have Visual Studio 2008 and...

Rename project output before being included into Setup project

Hi I have an exe that is built and placed into a Setup project for deployment. I want to rename the exe that is produced (to a .scr file - it is a screensaver) before inclusion in the setup project. How do I do this? I know I could rename the file in a post install process but I don't want to do it this way, I want the file to be rena...

How do I customize what a third party MSM does?

I'm trying to convert a project in Visual Studio 2008 from static linking of the CRT to dynamic linking. This was easy enough, and I added the CRT MSM and policy MSM to my Wix file with no problems. I am not that happy with the MSI that is output though, it is much larger than what I expected. Looking at the MSI with Orca shows three co...

Data Service and Linq DLL reverts to a different version after building

We are currently using an ASP.NET project that uses Data Services and Linq. Before when the project was newly created via Wizard/Template. The generated DLL in the bin folder has the version 3.0.40818.0 but each time I rebuild the versions of the DLL reverts back into version 2.0.31005.0. I tried checking the referenced assembly and it s...

Are there real differences between NUnit and Microsoft's Unit Testing Framework (VS 2008)?

With the framework that Visual Studio 2008 has, am I missing anything great by NOT using an external tool like NUnit? From what I can tell it seems like using NUnit would be more of a hassle with manually creating test classes and methods versus the right clicking native to the IDE. That being said, am I missing features that NUnit pro...

VS2008 designer automatically update control's property from resource file

I have a situation where some of the control's string property values are automatically replaced with a variable from a resource (.resx) file in the designer file during design time. For example, I have a form that contains a combobox. A snapshot of the code in the designer file may look something like this: this.comboDocument.Name = "...

Visual Studio: How to add existing project using environment variable?

I have a a project that resides on a "thumb drive" (a.k.a. memory stick). Due to Windows ability to change drive letters of thumb drives, I would like to specify the location of sub-projects using an environment variable. This allows me to set the thumb drive drive letter, depending on the PC that I am using; or change the variable whe...

How do you correctly use boost::make_shared_ptr?

This simple example fails to compile in VS2K8: io_service io2; shared_ptr<asio::deadline_timer> dt(make_shared<asio::deadline_timer>(io2, posix_time::seconds(20))); As does this one: shared_ptr<asio::deadline_timer> dt = make_shared<asio::deadline_timer>(io2); The error is: error C2664: 'boost::asio::basic_deadline_time...

Deleting DLL from bin directory causes compile errors in ASP.NET MVC

i have a project say MyProject. It is an asp.net MVC project. In bin directory, i have deleted a DLL named MyProject.dll. Now when i try to build the project, i am getting following error. The name MyProject does not exist in the current context. In my view files and controller, there are a lot of code like MyProject.Models; o...

multi-platform regisration-free COM with .NET app

I have a .NET application that uses a COM component. The application itself is "Any CPU", but the COM component has a 32-bit and 64-bit version. The article http://msdn.microsoft.com/en-us/magazine/cc188708.aspx is clear on what to do for registration-free COM. But what should one do for: "Any CPU" app dependent Assembly : Assembly1...

Visual Studio 2008 c++ Smart Device Platforms

Well i wrote a c++ app for a Windows CE device and selected the platform (from the sdk that came with the CD) for it, if i open the project file it says Platform Name="IEI_PXA270_E205 (ARMV4I)" <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="9,00" Name="BootInstall" Pr...

what is the URL for WCF post?

what is the URL for WCF post? I create a VS 2008, WCF method like this [WebMethod] public string TestMethod(string param) { return "param:" + param; } so then I go to http://localhost:57000/Service1.asmx?op=TestMethod But how do I do a post to this? On the test page it says HTTP POST The following is a sample HTTP POS...

why can i import this type from a xsd schema?

In the schema below, the line <xs:element type="cmn:AddressType" name="ResidentialAddress" minOccurs="1" maxOccurs="1" /> gives an error Type 'http://company.com/Common:AddressType' is not declared. Does anyone know why? It shows in the Visual Studio 2008 editor, and also if I try validate an XML file with XDocument. Schema Student.xsd...

How do I output coloured text from by unit tests in the Unit Test Session window in Visual Studio?

How do I output coloured text from by unit tests in the Unit Test Session window in Visual Studio. I am using Resharper VS addin which I think produces the Unit Test Window. I am using this with nunit and wish to use c# Console.Write to generate coloured text to this window. ...

Visual Studio ignore try catch - debug only

I think error handling is a good idea. :) When debugging it can get in the way - especially with nice user friendly messages. In VB6 I could just check a box for the compiler to ignore my error handling. I found the dialog that allows me to do something similar in VS, but it's about 10,000 check boxes instead of one - which is too ma...

load test/web test using vste - ignoring a file request

I'm using visual studio 2008 test edition to run a web and load tests. I have a webtest on a page that I need to have parse 'on' but theres one file call for this page that times out. When I run the loadtest the results for the entire test appear way off due to the timeout of that one file. Is there a way to ignore a certain file ca...

Checkstyle for C#?

I'm looking to find something along the lines of Checkstyle for Visual Studio. I've recently started a new gig doing .NET work and realized that coding standards here are a bit lacking. While I'm still a young guy and far from the most experienced developer I'm trying to lead by example and get things going in the right direction. I l...