visual-studio-2010

Visual studio 2010 database project and code generation

Hi, I'm trying to use the database project in VS2010, but my setup is a bit different from standard and I can't find an easy way to get it to work. I have a "model" project which contains some xml model definitions of a simple information for an ETL process. As well as the schema for the supplied information, it contains other metadat...

Generating XML with an xsd in VS2010 using LINQ

I think the title says it all. I've used Linq2SQL lots and am familiar with most of the concepts (up to and including extending an ObjectContext) but with regards to Linq2XML, I'm a little lost. I now have a need to generate some complex XML and I'd like to use the simplicity of LINQ. Previously, I've used XMLDocuments and programatic...

How to get new mail using VS office tool

I'm writing an outlook addin office VS 2010 Office tools. Here I find a way to list of unread emails from Inbox, but I want to process only new mails. What I'm trying to do is - when an email comes with subject containing "my project", it should create a task. Here is my code void Application_NewMail() { string filter ...

Using CrystalReport and WPF, C#

Hi, Thanks for read my Question.. I have a Report on Crystal Report, and I am using CrystalReport for VS2010, VS2010, SQl Server 2008 and WPF targeting .Net Framework 4.0. The question is.. I am allready made a Report and I have and App on WPF in which I need to call, embed or whatever it is take to show the report. How could I ? Th...

Get referenced project's path in T4 template?

I have a solution that has a few projects in it. I'd like to create some T4 templates in one of my test projects to generate tests based on code in another project. The test project has a Project Reference to the other project. The problem I have is that I don't know how to get a file path to the edmx file I need to generate code from. ...

VS2010, ASP.Net and .designer.cs files

Came across this curiosity recently. One solution, with two projects within it (ORM and website). Visual Studio 2010 Ultimate on both computers, setup identically. Solution and projects created on computer A, all .aspx pages have .designer.cs files. Solution and projects copied to computer B and new web pages added, all new .aspx pag...

How can I clear the cache of the workflow designer (where does it cache things) ?

Every time I change some InArgument of my CodeActivity or an activity defined as an XOML, it takes a couple of restarts of Visual Studio and deleting all the traces of my project's dll on the hard drive (not sure which part actually works) until the changes are reflected in the workflow designer. Is there some way to clear the cache of ...

VS2010: Using COM in a .NET 2 Project

I have a .NET 2.0 project that needs to use a COM component (specifically Redemption). In Visual Studio 2010 I add a reference to the COM dll as I would in all prior VS versions (right click project->Add Reference->COM tab->select product->Ok). When I build and try and run the app I keep getting the following error: Creating an insta...

How can I debug a dump file for an ASPNET worker process in Visual Studio 2010?

I've run into a particularly nasty bug where an ASP.NET website attempts to make a call to a WCF service method that sends IIS into a death spiral...that ultimately brings down the associated app pool. It never gets to our log4net code that outputs unhandled exceptions. I was watching w3wp.exe processes spin up and die, so I figured I'...

Visual Studio 2010 "Add Reference" is copying dll to bin directory??

I am using w7, 64bit and vs.net 2010. I am adding a reference to a component that is within my 'add references' dialog box. The component is a 3rd party dll. Historically, on w7 32bit it would add a line in my web.config (within the assemblies tag) referencing this dll and it wouldn't copy the dll to the bin directory. However, on 64...

Can VS.NET 2010/MSBUILD produce XmlSerializers for .NET 3.5 SP1?

I just upgraded a VS 2008 solution containing WinForms, general use libraries, and a web app to VS 2010, but all projects still target .NET 3.5 SP 1. I use this technique to generate XmlSerializers for my general use libraries. The WinForms app runs fine. When my web app tries to run using these libraries that reference the same XmlSeria...

How do I get VS to properly "see" code I have in App_Code folder?

I have a class located in App_Code that can't be seen by my ASPX pages. Anyone know why this could be? ...

Which files/folders in a Visual Studio 2010 C# Solution should go into Mercurial DVCS?

I am using Google Code to host my C# project. It has a solution with one class library and one test project. I am using Visual Studio 2010. The client I am using is TortoiseHG. In Windows Explorer, first I cloned an empty folder and got the .hg files inside of it so that it is associated with my hosted code. Now, I created a new C# pro...

Why the CSS "gets lost" when i set the IncludeStyleBlock property equal to True?

The demo web project that ships with the VS2010 contains a system.web.ui.webcontrols.menu control. That particular menu includes the IncludeStyleBlock property. When the IncludeStyleBlock property is set to False the menu is displayed as it supposed to. The menu gets destroyed if i set that property to True. So here is my main question...

VS 2010 Database Project - Import Database Objects and Settings

Does anyone know if there is a way to ignore users and roles when performing an "Import Database Objects and Settings" on a new SQL Server 200X Database Project from within Visual Studio 2010? I have tried setting these object types to ignore within Tools/Options/Database Tools/Schema Compare/Object Types, but that didn't seem to work. ...

VS2010 Macro To Change Environment Settings Based on Build Configuration

I want to change my environment colors when I switch from "Debug" to "Release" configuration in Visual Studio 2010. I want it to really stand out that I have changed a configuration. Is there an event I can handle with a Visual Studio macro to find out when the configuration dropdown has changed? Also, can anyone point me to the objec...

Can you have MsTests and Windows-forms functional tests live in the same project file?

I've been asked to investigate the possibility of using a single .csproj file to run both interactive and unit tests. I've been able to get the windows forms project changed over to run msTests but now I'm not finding a way to run the windows forms/interactive side. Is there a way to do this? ...

VS 2010 Database Project - SQL03006 Error

I created a new SQL Server Database Project within VS 2010, imported the database objects and settings from a local database named "managers", and received the following error while attempting to build the project: SQL03006: View: [dbo].[vw_mlFunds] has an unresolved reference to object [managers].[dbo].[mlfunds]. I don't know why ...

Why doesn't VS2010 debugger stop at my breakpoints?

I am working on a C#.NET class library project in VS2010. In my project settings -> debug settings, I have the project set to start an external program (C:\Windows\SysWOW64\wscript.exe) which runs a very simple jscript file (test.js). The script simply creates an instance of the class and calls one of it's methods. The problem is when ...

ArcGis SDK VS2010 folder empty

I installed Esri's SDK for 2010 and authorized it. Now when I open Visual Studio 2010 -> New Project -> I see a directory labeled "ArcGis" in the C# section, and this directory has three subdirectories {Desktop Add-Ins, Extending ArcObjs, Server Obj Ext}, but each of these directories is empty. I've never used this SDK before, but I as...