visual-studio-2010

Is there a clean way to read the config file during a custom rule (code analysis/Tfs check-in policy)?

I'm thinking of trying the following ideas: System.IO Package.GetGlobalService(typeof(EnvDTE.DTE)) public override Microsoft.FxCop.Sdk.ProblemCollection Check(Microsoft.FxCop.Sdk.Resource resource), while blocking on the thread that does Check(TypeNode type) until the resource reading completes. Anyone know if any of these will be re...

How to list all methods-of-a-class/classes that are not tested?

I want to have a list of not-tested methods/classes but not sure how to get it. Please help. [Edit] I'm using test framework Moq. ...

Dynamic key word, What, when ,how,why ? please

Possible Duplicate: What do you think of the new C# 4.0 'dynamic' keyword? Hi there i am using vs 10 for my new projects. in vs 10 we have new key word i.e dynamic, i read it for to know how its work but still unable to understand the meaning of the keyword. can any one tell me the what is dynamic When to use the Dynamic How...

Renaming a C++ thread when running under Visual Studio 2010 extension package

Hi everyone, I'm using the following code (from MSDN) to rename a C++ thread: #include <windows.h> const DWORD MS_VC_EXCEPTION=0x406D1388; #pragma pack(push,8) typedef struct tagTHREADNAME_INFO { DWORD dwType; // Must be 0x1000. LPCSTR szName; // Pointer to name (in user addr space). DWORD dwThreadID; // Thread ID (-1=caller ...

Adding line WPF control on ToolBox

I need to draw lines and dots (circles) in WFP. (VS 2010) I tried using Ellipse control for dots, but I don't have the line ones. I however added <Line element directly in XAML and this worked... but how I have the line control in the toolbox? ...

Draw lines and circles in WPF

I need to draw a graph like bus station schema: o-School----o-Church-------o-Police. So, simple line and circles. Also I need to zoom it. As I have VS 2010, I thought WPF(as I understood it uses vectorized graphics) should be the good canvas to start drawing. Is it possible, complicated, and what do you recommend for a WPF beginner. ...

Why does Visual Studio create a website Solution in the Project directory and the website in the Websites directory?

When creating a website in Visual Studio 2010 (I think 2008 had the same behavior): File > New Website, VS creates the solution files in the Projects directory and the website in the Websites directory. What is the purpose? Why not just create the solution files under the Websites directory? ...

VS 2010: Call Stack says: [external code] and won't show calling code

The Title says it all.. I can't see what code called the line being executed at runtime using the debugger. Added: How do I step into the methods that called the code being exectued themselves? Thanks a lot. ...

Any alternatives to VS's code formating engine?

MS still seems to not be able to format code that intermixes server-side with javascript and html very well. Is anyone providing a plug-in or extension that does? ...

Sorting XAML tags in VS2010

Is there a way to sort XAML tags in Visual Studio 2010? For an example <Button Content="OK" Height="23" Margin="0,0,0,0" /> <Button Margin="0,30,0,0" Content="Cancel" Height="23" /> may be reordered to <Button Content="OK" Height="23" Margin="0,0,0,0" /> <Button Content="Cancel" Height="23" Margin="0,30,0,0" /> ...

Debugging NET Framework source code not available

I am having trouble setting up Microsoft .NET Framework source code debugging for both Visual Studio 2008 and 2010 on Windows 7 x64 (I am having similar trouble on Vista x86 too). I have followed instructions from this blog post as well as some other resource but without much success. I have also downloaded and installed all symbols fro...

Could not load file or assembly 'B.DLL' or one of its dependencies

Along with: An attempt was made to load a program with an incorrect format I have A.EXE that references B.DLL. Both are mine. Both are set to x86 for the platform target. B.DLL references: System System.Data System.Windows.Forms System.XML I am using VS2010 on Win7 64-bit. All search results I can find say that this is because of loa...

which visual studio project type should i choose that will best for standart c library

Hi, which visual studio project type should i choose that will best for c basic library(uni studies). the problem in visual studio 2010 express that its gives _tmain instead int main(). Thanks ...

will installing visual studio 2010 install .net framework 2.0+

which versions of the .net framework are installed when you install visual studio 2010. if i need to work on projects with multiple target frameworks (on a fresh machine) do i need to install .net framework version up front before installing vs 2010? ...

Visual studio 2010: no data source

I run Visual C++ Windows Forms application and MS SQL server 2005. I succeeded to connect to server and view table contents (tools -> connect to database), but when I try to add new datasource, nothing is found by wizard. Why? ...

copy files after successful build

Hi All, I'm working on a application where multiple dev will check-in everyday. I want to copy latest files only after check-in and successful TFS build to a share location. Currently I'm using post build script something like Attrib -r "$(ProjectDir)Data*." /S & xcopy /S /Y /I "$(ProjectDir)Data*." "ShareLocation" But the biggest ...

How to check if Thread code runs in try-catch block

I would like to validate our code and check if every Thread that we execute runs in try catch block. A valid sample: Thread loadDataThread = new Thread(new ThreadStart(LoadData)); public void LoadData() { try {/*do something*/} catch(Exception ex) { /*Handle exception*/ } } Not valid sample: Thread loadDataThread = new Thread(...

Nightly Code Metrics in Visual Studio 2010

Is it possible to set up an a process that runs over night (every night) to run Visual Studios Code metrics Analysis? ...

Can't add event handler in visual studio 2010 (mfc project)

I've recently converted an MFC visual studio 6.0 project to a visual studio 2010 project and I'm experiencing problems whenever I try to add event handlers to controls on certain forms within my project. On one particular page I have a radio button and I've tried to add a click event handler to it using 3 different ways: 1) By right cl...

Using Entity Framework diagram or class diagram's classes in my own diagram

Hi, I've designed my own model to define the states of an activity to be used in Web Application development. In the model, I have: Actor SwimLane: defines each actor's role in the activity Manual State Element: defines the manual working state for each Actor (ie: getting the request signed form from customer) Application State...