visual-studio-2010

Visualize call stack of method calls in Visual Studio 2010

给你一囗甜甜゛ 提交于 2020-04-11 05:00:29
问题 I wonder if there is a way to visually represent a call stack of a method. Meaning for example: ServiceAdapter.GetMessage calls Manager.GetMessage calls Agent.GetMessage calls Repo.GetMessageById calls Agent.GetUserById calls Repo.GetUserById calls Agent.GetRating call Repo.GetRatingForMessage .. This way it would by very easy to navigate through a piece of code and visualize its dependencies. Is there an existing extension for this in Visual Studio? 回答1: You're looking for the Call Hierarchy

Visualize call stack of method calls in Visual Studio 2010

梦想的初衷 提交于 2020-04-11 05:00:13
问题 I wonder if there is a way to visually represent a call stack of a method. Meaning for example: ServiceAdapter.GetMessage calls Manager.GetMessage calls Agent.GetMessage calls Repo.GetMessageById calls Agent.GetUserById calls Repo.GetUserById calls Agent.GetRating call Repo.GetRatingForMessage .. This way it would by very easy to navigate through a piece of code and visualize its dependencies. Is there an existing extension for this in Visual Studio? 回答1: You're looking for the Call Hierarchy

Visual Studio 2010: how to automatically copy files into debug directory

♀尐吖头ヾ 提交于 2020-04-11 04:12:07
问题 I've got a dll, into which I've inserted txt files into the names subdirectory When I build the solution, VS does not create the directory and does not copy the files themselves into the directory of the exe file, which references the dll library Is there an easy way to make it do that? 回答1: It should do that, provided that you have a reference for the class library project in your executable project. I just setup a scenario like this in Visual Studio 2010: Created a C# Console Application

Visual Studio 2010: how to automatically copy files into debug directory

我们两清 提交于 2020-04-11 04:12:03
问题 I've got a dll, into which I've inserted txt files into the names subdirectory When I build the solution, VS does not create the directory and does not copy the files themselves into the directory of the exe file, which references the dll library Is there an easy way to make it do that? 回答1: It should do that, provided that you have a reference for the class library project in your executable project. I just setup a scenario like this in Visual Studio 2010: Created a C# Console Application

Visual Studio 2010: how to automatically copy files into debug directory

自闭症网瘾萝莉.ら 提交于 2020-04-11 04:12:02
问题 I've got a dll, into which I've inserted txt files into the names subdirectory When I build the solution, VS does not create the directory and does not copy the files themselves into the directory of the exe file, which references the dll library Is there an easy way to make it do that? 回答1: It should do that, provided that you have a reference for the class library project in your executable project. I just setup a scenario like this in Visual Studio 2010: Created a C# Console Application

Use static_assert to check types passed to macro

拜拜、爱过 提交于 2020-04-05 11:50:26
问题 I unfortunately have several macros left over from the original version of my library that employed some pretty crazy C. In particular, I have a series of macros that expect certain types to be passed to them. Is it possible to do something along the lines of: static_assert(decltype(retval) == bool); And how? Are there any clever alternatives? Yes I'm aware macros are bad. I'm aware C++ is not C, etc. Update0 Here is some related code, and the source file. Suggestions are welcome. The

How to generate Qt .pri files from Visual studio project at the end of the build?

痴心易碎 提交于 2020-03-23 09:04:10
问题 Can I setup my solution in visual studio to automatically generate the .pri files at the end of the build? I thought about perhaps writing a batch file to call a command to generate the .pri files, is it possible to generate .pri files from the command line? I am working on a Qt C++ application in visual studio made up of 9 subprojects. I also created a QMake based build of the same application using Qt visual studio add in to generate the .pro and .pri files. The setup is working well, and

error C2039: 'string' : is not a member of 'std', header file problem

杀马特。学长 韩版系。学妹 提交于 2020-03-17 06:41:26
问题 I am having problems with a class I am writing. I have split the class into a .h file that defines the class and an .cpp file that implements the class. I receive this error in Visual Studio 2010 Express: error C2039: 'string' : is not a member of 'std' This is the header FMAT.h class string; class FMAT { public: FMAT(); ~FMAT(); int session(); private: int manualSession(); int autoSession(); int mode; std::string instructionFile; }; This is the implementation file FMAT.cpp #include <iostream

.NET Framework 4 in WPF not showing bitmap effect

冷暖自知 提交于 2020-03-14 11:09:46
问题 I am having a problem using VS2010 and framework version 4 with bitmap effects. If I have the code below and run it in a WPF application using the .NET Framework 4 Client Profile, the bitmap effect does not appear. If I set the framework version to .NET Framework 3.5 Client Profile (and change no code), it runs as expected. At first, I thought it was a problem in my application, but I removed the code and put it in a separate standalone application and it behaves the same. Anyone else verify

ExecuteNonQuery: Connection property has not been initialized (access database)

倾然丶 夕夏残阳落幕 提交于 2020-03-06 04:35:49
问题 what's wrong with my code?I just want to add data into access database but it show ExecuteNonQuery : Connection property has not been initialized. It's pretty weird because in other project code similar to this works just fine. OleDbCommand command = new OleDbCommand(); OleDbConnection connect = new OleDbConnection(); OleDbDataReader reader; public Absen() { InitializeComponent(); } MainForm form_utama; private void Absen_Load(object sender, EventArgs e) { connect.ConnectionString = @