visual-studio-2008

How do I discover the return value at the end of a function when debugging in VS2008?

心已入冬 提交于 2019-12-12 09:44:56
问题 Using C# in Visual Studio 2008 and stepping through a function in the debugger I get to the end of a function and am on the final curly brace } and about to return. Is there a way to find out what value the function is about to return? This is necessary if the return value is calculated such as: return (x.Func() > y.Func()); 回答1: It's a little low level, but if you switch to disassembly then you can single step through the instructions and see what the return value is being set to. It is

Visual Studio 2008 Build Dependency Chain

耗尽温柔 提交于 2019-12-12 09:42:02
问题 I am having an issue with Visual Studio 2008 SP1. Basically, I have a .NET 3.5 solution with a client, shared and server component. While coding, all components run on the same box, but in production the server component is a standalone (remoting) service running on a separate server. I would expect that a change to the client component would require only a rebuild of that component as there is no client/server dependency. This is in fact how it works on my work PC. However, on my personal PC

MSSCCI provider for Visual Studio 2008 SP1 and TFS 2015

吃可爱长大的小学妹 提交于 2019-12-12 09:33:20
问题 I have Team Foundation Server 2015 installed, and I'm trying to connect Visual Studio 2008 (Version 9.0.30729.4462 QFE) to the team project. I have installed VS 2008 Team Explorer (version 9.0.21022.8). According to MS, this should be possible using MSSCCI Provider. However, I can't find the version that's compatible with TFS 2015. Question: Where is the MSSCCI Provider for TFS 2015, or is there another way to connect VS 2008 to TFS 2015 ? I have tried MSSCCI Provider for TFS 2013, and it

C# MD5 calculation issue

时光怂恿深爱的人放手 提交于 2019-12-12 09:26:35
问题 I am using VSTS 2008 + C# + .Net 3.0. I want to find the most efficient way to calculate the MD5 result for the whole content of a txt file. What is the most efficient solution? 回答1: Something as simple as: using (Stream stream = File.OpenRead(filename)) using (MD5 md5 = MD5.Create()) { return md5.ComputeHash(stream); } Given that there's no way of avoiding reading every byte of the stream, I doubt that you'll find anything significantly more efficient. 来源: https://stackoverflow.com/questions

Reason why a VS 2008 project is being rebuilt each time

南楼画角 提交于 2019-12-12 09:05:52
问题 Is there a way to find out the reason why a project is being rebuilt each time a Build Selection operation is issued in VS 2008? I've tried to even remove all dependencies from the Build\Configuration Manager (unchecked the build column for all assemblies, but the one in question). I get the same result: the assembly is rebuilt each time. I have to mention that all the dependencies are built in the same directory (there is a common Output Directory). Actually it's not very clear to me what is

Fields in a struct skipping bytes

送分小仙女□ 提交于 2019-12-12 08:56:32
问题 I have a struct I have written which is supposed to represent an entire UDP packet, with the ethernet header and all. Here it is: #pragma pack(1) struct UDPPacket { // an array to hold the destination mac address of the packet unsigned char dstmac[6]; // an array to hold the source mac address of the packet unsigned char srcmac[6]; // two bytes to hold the packet type, this is almost always IP (08 00) WORD ethtype; // each of the subfields of this take up 4 bits. ver, the first half, // is

Dialog has a modern look on time design , but old look on run time (using Visual C++ and resource editor)

馋奶兔 提交于 2019-12-12 08:55:03
问题 I'm creating a dialog with the resource editor of Visual C++. When I run the test button of the editor, components of the dialog are displayed with a modern look, while when running the application that creates and shows the dialog, it's displayed with an old look...I'm just using WINAPI calls to display the dialog, not MFC. Here are the screenshot (the upper image is an example of UI look on design time, the other one is the UI look on run time): link text Does anyone know what I'm doing

VS2008 unit tests - assert method exits

非 Y 不嫁゛ 提交于 2019-12-12 08:54:13
问题 I'm trying to write a C# unit test with VS 2008's built-in unit testing framework and the method I'm testing calls Environment.Exit(0) . When I call this method in my unit test, my unit test is Aborted. The method should indeed be calling Exit , and I want a way to test that it does, and also to test the exit code that it uses. How might I do this? I looked at Microsoft.VisualStudio.TestTools.UnitTesting Namespace but didn't see anything that looked relevant. [TestMethod] [DeploymentItem(

Lambdas in C++/CLI

你。 提交于 2019-12-12 08:54:02
问题 How to use lambda expressions in C++/CLI? 回答1: In C#, lambdas are really just syntactic sugar for creating delegates. C++/CLI supports delegates, so you can still do all of the same stuff in C++/CLI that you can do in C#, you just don't get to use the nifty syntax. 回答2: I've found this response from a Microsoft employee on the vc blog to a question regarding C++ 0x lambda and managed code interoperability: You can only pass a variable with a managed type as an argument to a lambda - you can't

.obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x6592

╄→гoц情女王★ 提交于 2019-12-12 08:48:35
问题 I am trying to load an .obj model into my c++ opengl 3 code but for some reason it gives me this error : 1>Linking... 1>.\bunny.obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x6592 I tried to search for similar errors, but there were about .dll's or .lib's. Can you please help me out with this issue. I have also tried with different obj models but it always gives me this error. 回答1: You are trying to load your object model with a C++ linker (probably you have just added