visual-studio-2008

Making ThisWorkbook talk with ThisAddIn

I have a solution containing an VSTO Excel AddIn project and an VSTO Excel Template project. Is there any design pattern (or hack) that can allow the ThisAddIn instance to access properties and methods of the ThisWorkbook instance, and vice versa? Also I should note that I'm using VS 2008, VSTO 2005SE, and the target Office version i...

Visual Studio 2008 Web Project error: Unable to start program http://localhost:port

I am re-hashing this question because I have looked at over 50 threads in different forums and have not been able to get a resolution to my problem. Here are the specs: Windows XP SP3, Visual Studio 2008 SP1, .NET 3.5, ASP. NET MVC 2 project, IE 7 (was IE 8) Up until a few days ago I was not having any issues. It is now happening on an...

How do I debug a DLL from VS2008?

I have a program written in VB.Net (Visual Studio 2008) that uses a DLL written in Visual C++ by another developer. I'd like to be able to step in to the C++ code as my code makes calls to methods in the DLL. Since the DLL is it's own solution, I don't think it can be included in my solution/project. I tried putting the DLLs pdb file ...

Can LINQ-to-SQL omit unspecified columns on insert so a database default value is used?

I have a non-nullable database column which has a default value set. When inserting a row, sometimes a value is specified for the column, sometimes one is not. This works fine in TSQL when the column is omitted. For example, given the following table: CREATE TABLE [dbo].[Table1]( [id] [int] IDENTITY(1,1) NOT NULL, [col1] [nvarch...

Compiling C# Application with VS Plugin?

Ok I feel like such an idiot..but I cannot figure out how to create a release version of my C# application. I am using a National Instruments Visual studio plugin and only can run the output .exe on the machine that has the plugin. Surely there can't be an added runtime to install for visual studio addons? The error I get is Una...

EnvDTE: ArgumentException when accessing the ActiveConfiguration

I'm writing an addin for Visual Studio 2008. At some point in my code, I'm attempting to access the current active configuration for a project: var configName = _Project.ConfigurationManager.ActiveConfiguration.ConfigurationName; Sometimes, in some very obscure cases, the getter for ActiveConfiguration throws an ArgumentException. Not...

How to Integrate ILMerge into Visual Studio Build Process to Merge Assemblies?

I want to merge one .NET DLL assembly and one C# Class Library project referenced by a VB.NET Console Application project into one command-line console executable. I can do this with ILMerge from the command-line, but I want to integrate this merging of reference assemblies and projects into the Visual Studio project. From my reading, ...

How can I locate all the network printers in the enterprise?

When I go to Printers and Faxes dialog, I can click the Add a printer link, select Network Printer, then Find a printer in the directory. From there I get a dialog box which lets me find ALL printers in the enterprise. I need to find all the network printers with my code. How can I do this? Note that I am not talking about network p...

How to get around circular references in Visual Studio Web Project?

I am trying to create a set of WCF web services for an existing website that uses web site instead of a web application project. I would like to create a DLL that I drop into the Bin folder instead of writing all my code inside the App_Code directory. Ideally, I want to create a project and reference it from the web site, but I am runn...

Initializing a property in c#

I have a constructor I am trying to build with the header public KsuPoint(double x0, double y0) now i also have properties in the class as shown below private double x; public double X { get { return x; } } private double y; public double Y { get { return y; } } This constructor is sup...

visual studio localhost server can't locate file

i have a very simple web project. just one htm file with some javascript that opens a file test.xml. the xml file is in the same folder as the htm file (and it is part of the project) but when i start the page (f5 or ctrl-f5) it can't find the xml. it starts as http://localhost:50586/main.htm when i do a folder list the test.xml file i...

VS2008: File creation fails randomly in unit testing?

I'm working on implementing a reasonably simple XML serializer/deserializer (log file parser) application in C# .NET with VS 2008. I have about 50 unit tests right now for various parts of the code (mostly for the various serialization operations), and some of them seem to be failing mostly at random when they deal with file I/O. The wa...

I've created a database table using Visual Studio for my C# program. Now what?

Hi! I'm very new to C#, so please forgive me if I've overlooked something here. I've created a database using Visual Studio (add new item > service-based database) called LoadForecast.mdf. I then created a table called ForecastsDB and added some fields. My main question is this: I've created a console application with the intention ...

Changing settings in multiple VS project

Hey, Is there any way to change settings for multiple projects in a Visual Studio 2008 C++ solution? For example, adding a library dependancy for all the projects, or ignoring a specific warning. I am aware being able to change some global settings in the IDE itself, but I'm looking for settings which will be stored in the solution/pro...

Can VS launch FireFox in a new window when hitting F5?

I am using FireFox as my default browser. I am using the setting "Open new windows in a new tab instead", since this is what I prefer when just browsing the web. However, this means that when I hit F5 in VS to start debugging, the web app is opened in a new tab in the active FireFox instance, alongside any other tabs I have opened alread...

Usage of VIsual Memory Leak Detector

I found a very interesting memory leak detector by using Visual C++. http://www.codeproject.com/KB/applications/visualleakdetector.aspx I try it out, but cannot make it works to detect a memory leak code. I am using MS Visual Studio 2008. Any step I had missed out? #include "stdafx.h" #include "vld.h" #include <iostream> void fun() ...

Avoid Page REfresh Problem using Extjs 3.2

Hi, I am working on extjs based application , i need control the page refresh when user press f5 multiple times, i am getting script error when user done this. I need to solve this issue by sending 2nd refresh request after 1st refresh one is completed. Is there any way to achieve the above solution using extjs.. Thanks in advance ...

Linker problem linking boost in Visual Studio 2008

Hi, I have a rather obscure linking problem in Visual Studio 2008. The linker error message is: "LNK1104: cannot open file 'boost_thread-vc90-mt-gd-1_38.lib'". All pathes and dependencies are set. What I noticed though is that Visual Studio misses boost_thread-vc90-mt-gd-1_38.lib and not libboost_thread-vc90-mt-gd-1_38.lib (notice the l...

Are Inherited Forms And/Or Inherited Controls possible in Managed C++

Hello everyone The question is actually pretty self explanatory but I will further clarify it. I am building a simple application to show a load [file] for 5 different types of [files]. So all these 5 forms will have similar GUI elements such as a listbox and a load button with a small textbox/label to show the summary of the [file]'s ...

How do I specify the User's LocalAppDataFolder in a VS 2008 setup project?

Basically I am looking for a way to create application data files during setup inside the folder corresponding to: Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) or put another way (for WindowsXP): C:\Documents and Settings\%username%\Local Settings\Application Data I tried the solution suggested here, but ...