visual-studio-2008

How to turn off RTTI in Visual Studio 2008

流过昼夜 提交于 2019-12-22 08:40:18
问题 I am not sure about other versions, but, in VS 2008 even with RTTI disabled I can query the information by calling typeid(T).name() on the type. It works with all types, internal and user created. Our project has RTTI disabled but I was surprised to find that this still worked. Is this a Visual Studio bug or is the /GR- flag not enough to disable it? Does this fall into the realm of undefined behavior ? If it is not a bug, how do I really turn it off? 回答1: Is it possible that you used typeid

How can the Visual Studio 2008 Build Command Line be seen?

雨燕双飞 提交于 2019-12-22 08:39:53
问题 When I am in Visual Studio I hit the F5 to do a build. Is there a way to see the MSBUILD command line being executed? Inside of Visual Build Pro the build fails but when run from Visual Studio 2008 (hitting the F5) it succeeds. Here is the command line used inside of Visual Build Pro: C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe C:\Code\EduBenesysNET\EduBenesysNET\EduBenesysNET.vbproj /t:publish /p:Configuration=Release /p:Platform=AnyCPU /v:detailed /p:PublishDir="\\BSIIS3\c$\DATA

get stack trace when exception is thrown

我们两清 提交于 2019-12-22 08:26:37
问题 I am now debugging a program that utilizes many different threads. there is an exception that is thrown from time to time. the problem is that there is no way to know what thread caused the problem... does anyone know an easy way to get the stack trace after the exception is thrown? I thought about simply writing a debug messages but it is going to be a huge :-) i guess there are much better techniques than this one ... I'm using visual studio 2008 - native c++ project.... 回答1: Unless I'm

Where is SetOaNoCache defined?

喜欢而已 提交于 2019-12-22 08:13:03
问题 Attempting to disable BSTR caching: SetOaNoCache(); VC++ compiler build output : 'SetOaNoCache': identifier not found Don't want to use: OANOCACHE=1 Question: Where is SetOaNoCache defined - header file? 回答1: It is not defined in a header file, it is in OLEAUT32.dll. You can call it like this: typedef int (*SETOANOCACHE)(void); void DisableBSTRCache() { HINSTANCE hLib = LoadLibrary("OLEAUT32.DLL"); if (hLib != NULL) { SETOANOCACHE SetOaNoCache = (SETOANOCACHE)GetProcAddress(hLib,

Replacing delimiter characters in file path

こ雲淡風輕ζ 提交于 2019-12-22 08:09:49
问题 I'm developing a C# web application in VS 2008. I let the user select an input file and then I store the file path in a string variable. However, it stores this path as "C:\\folder\\..." . So my question is how do I convert this file path into single "\"? Thank you guys for all your helps! Please forgive me as I am a newbie to ASP.NET development. This is more of my code in context. First I want to see if the directory exists. I guess I don't have to check this if I check if the file exists.

Why doesn't VS 2008 IDE remember my preferences?

限于喜欢 提交于 2019-12-22 07:59:48
问题 This is a very petty question that I'm only asking while compiling... ;) For some reason my VS 2008 IDE doesn't remember my window preferences when I close & reopen - it resets the window widths, locations, appearances etc. Where's the secret switch so that my IDE stays looking the way I want it? 回答1: Try resetting the Visual Studio Tools->Import and Export Settings->Reset All Settings Or devenv.exe /resetsettings 回答2: The window positions are stored in the following file: %APPDATA%

How I can Connect to Oracle in ADO.NET Entity Data Model

有些话、适合烂在心里 提交于 2019-12-22 07:24:09
问题 Somebody advised me to use Entity Framework here when I asked this question: what is better to build Data layer, Strongly Typed DataSets or Classes So I read a lot of articles about Entity Framework, I understood that Entity Framework designed to be data-source independent and it will support most of the popular DBMSs. I Have vs2008 with SP1, and I tried to add ADO.NET Entity Data Model , but I couldn't generate the model from Oracle connection, it seems that it's just supporting SQL Server!!

CMake RequireAdministrator

不问归期 提交于 2019-12-22 06:56:52
问题 I'm trying to set the RequireAdministrator manifest flag on an executable I'm building with CMake and Visual Studio. Any ideas on how to direct CMake to set that option? Thanks! Billy3 回答1: try this: SET_TARGET_PROPERTIES(your_executable PROPERTIES LINK_FLAGS "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\" /SUBSYSTEM:WINDOWS") 回答2: I appreciate that the question is tagged visual-studio-2008, but for VS2010 this produces the following error message: error MSB4030: "level=

Unit test sequence when running all tests in solution

青春壹個敷衍的年華 提交于 2019-12-22 05:52:54
问题 In a complex VS2008 solution I have three unit test projects. As they operate on the same test database it is important that the test projects are executed one after the other. It is not important which project first, just that one is finished before the other starts. If I want to execute them all, there are several ways to do that, which lead to different results: I have a test list .vsmdi file where the tests are ordered by project. If I open the list and execute the tests from the test

How to prevent Visual Studio from compiling solution after I exit debug mode?

ⅰ亾dé卋堺 提交于 2019-12-22 05:46:12
问题 Visual Studio builds the entire solution when I exit debug mode. This is very annoying as the solution contains 42 projects (ASP.NET MVC, IIS hosted WCF, Silverlight apps and others) and the build process locks Visual Studio for aprox. 30 seconds. What causes Visual Studio to do a full rebuild of the solution? Is there a setting that I can turn on to determine the root of the problem? 回答1: Are you editing the source code during debugging? VS does a "temporary"* compile in these cases to let