visual-studio-2008

How do I test that all my expected web.config settings have been defined?

拥有回忆 提交于 2019-12-23 02:57:20
问题 I am using the built in test framework in VS2008 and I would like be able to write a test that makes sure all the expected web.config settings have been defined so that if by accident one is removed or changed my suite of tests will detect it and not have to be tested in a runtime scenario. How would I set this up? I do not want to setup a mockup of my web.config since I don't want to maintain two versions and this would make my test invalid anyways since I am really trying to capture the

How can I programmatically launch visual studio and send it to a specific file / line?

狂风中的少年 提交于 2019-12-23 02:38:31
问题 I have a nice tidy way of capturing unhandled exceptions which I display to my users and (optionally) get emailed to myself. They generally look something like this: Uncaught exception encountered in MyApp (Version 1.1.0)! Exception: Object reference not set to an instance of an object. Exception type: System.NullReferenceException Source: MyApp Stack trace: at SomeLibrary.DoMoreStuff() in c:\projects\myapp\somelibrary.h:line 509 at SomeAlgothim.DoStuff() in c:\projects\myapp\somealgorithm.h

Locating installer paths in c#

你离开我真会死。 提交于 2019-12-23 02:33:05
问题 In VS2008 I have writen a c# service, an installer and created a setup package to install it. The service needs to load an xml file to operate. Where is the best place to put this file in the various filesystem folders offered by the VS setup project, and how do I then refer to these paths from my code? Thanks [I should point out the the service runs as LocalService, which means that the applicationdata folder offered by the "User's Application Data Folder" item in the VS setup project is not

Member of Union has User-Defined Constructor

旧巷老猫 提交于 2019-12-23 02:24:07
问题 For the following code: class Foo{ int foo; public: Foo() : foo(13) {} int getFoo() const { return foo; } }; union Bar{ Foo fBar; double dBar; }; I believe this is fully legal in C++. http://en.cppreference.com/w/cpp/language/union#Explanation says: If two union members are standard-layout types, it's well-defined to examine their common subsequence on any compiler And thus in gcc I can do this: Bar bar = { Foo() } When I try this in Visual Studio 2008 I get the error: error C2620: member Bar

Working with XML document type definitions in .net

自作多情 提交于 2019-12-23 01:43:47
问题 Is it possible to import an XML DTD into Visual Studio in order to generate a proxy class? I have a third party .dll that I need to interface with that is designed like an XML service. The interface into the .dll is all driven by XML inputs, and returns output as XML. The nice thing about it is that all the input and output types are well defined. The bad news is that they use DTD (Document Type Definition). I would really like not to have to build up the XML by hand, but I only know how to

C# Can't find file

做~自己de王妃 提交于 2019-12-23 00:53:10
问题 I have a C# Visual Studio 2008 Form which needs to read the contents of the relative file 'character/attacks.txt' File.Exists() returns false when I run it, even though I'm positive my directories are sorted. Code: try { System.IO.StreamReader file = new System.IO.StreamReader("character/attacks.txt"); int counter = 0; int numberOfLines = 0; string line; while ((line = file.ReadLine()) != null) { numberOfLines++; } string[] attacks = new string[numberOfLines]; while ((line = file.ReadLine())

How to make WPF animations without expression blend

末鹿安然 提交于 2019-12-23 00:32:31
问题 Is there a way or a tool i can use to make WPF animations and controls without using Expression Blend...maybe just using Visual Studio 2008 or something??? 回答1: You can use Visual Studio. ALSO: Visual Web Developer XAMLPad If you're looking for a visual XAML tool and can't swing Blend, take a look at: Kaxaml Even though the page says for Silverlight two, the designer says: The latest beta of Kaxaml works with Silverlight 3 with you doing anything. That said, I’m looking to expand the support

keep LinqToSQL sync with the database

百般思念 提交于 2019-12-22 18:56:15
问题 I am going to develop a new website with asp.net 3.5 and LinqToSQL. For maintainability purposes, how can I modify a Linq class if an attribute is added to a table in the database ? Thank you. 回答1: Unfortunately LinqToSQL does not have synchronization support in Visual Studio. The options are: Remove the table and add it again. Of course any customization changes are lost Edit the .dbml file file directly and add the attribute. The file has xml content and when saving it will regenerate the

Custom Sorting on a DataGridView

余生长醉 提交于 2019-12-22 18:36:35
问题 I found a few questions similar to this one here on SO, but none that matched this problem, so here we go. I've got a DataGridView showing members of a team. All the team members have an assigned role within the team listed in one of the columns. Examples could something like be "Legal Representative", "Account Manager", "Assistant Account Manager" or "Accountant". Now here's where it gets interesting. I basically want to sort the grid on this column alphabetically, with a couple of

Visual Studio 2008 skipping projects when building a solution

白昼怎懂夜的黑 提交于 2019-12-22 18:36:10
问题 I recently installed VS2008 in Win2k8R2 machine and opened a VS2005 project(C++). After successful conversion to VS2008, i tried building the project in Debug x64 mode. But the project is getting skipped. I tried Clean as well as Rebuild, and it is getting skipped for those as well. I'm able to build in Debug win32 mode. But i need to build in x64 mode. Also the Build option is ticked in Build->Configuration Manager under x64. I have installed the x64 bit compiler too. How can i solve this