visual-studio-2008

“Target Framework” in Visual Studio

烈酒焚心 提交于 2019-12-13 21:44:00
问题 What actually happens when you target the .NET 3.5 framework in Visual Studio? What does that actually do? Does it somehow "flag" any of the output files and associate them with the framework version? 回答1: It sets an attribute in the .csproj file: <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> and updates any references to namespaces if they require the newer version: <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> </Reference> This tells the

Purpose of “Target machine” field in Visual studio -> Linker-> Advanced Options->Target Machine

廉价感情. 提交于 2019-12-13 21:13:23
问题 I'm porting a 32-bit C++ app to 64-bit (using VS2008). I'm not sure what does this field mean in the VS2008 :: Visual studio ->Configuration Properties-> Linker-> Advanced Options->Target Machine. By default it's value is set to " Not set ". Is it compulsory to change it's value to "MACHINEx64" if I want my application to be ported to 64-bit executable. 回答1: Yes, this is a very important option. It sets the IMAGE_FILE_HEADER.Machine field in the executable file. The very first field of the

Data List populated from stored procedure

微笑、不失礼 提交于 2019-12-13 20:14:31
问题 Here's a concrete example in 5 short steps: 1) I have built a Data List in the Design view of an "ASCX" file. 2) In the Item Template area of the Data List, I created a 1x3 table, and in each cell I specified as below using Eval(“columnx”) a column (fid) returned through a Stored Procedure. <asp:Label ID="Label1" runat="server" Text='<%# Eval("fid") %>'> In the same manner, I specified other two fields returned by the same stored procedure. 3) I went to the .ASCX.CS (code behind file) and

Automatically add links to class source files under a specified directory of another project in Visual Studio 2008 solution

岁酱吖の 提交于 2019-12-13 17:49:02
问题 I want to share some class source files between two projects in Visual Studio 2008. I can't create a project for the common parts and reference it (see my comment if you are curious to why). I've managed to share some source files, but it could be a lot more neat. I've created a test solution called Commonality . The Solution Explorer of the Commonality solution which contains project One and Two : What I like: All class files under the Common folder of project One are automatically added to

Visual Studio designer moving controls and adding grid columns when form is opened

跟風遠走 提交于 2019-12-13 17:30:04
问题 The first time I try to open a particular form many of the controls (those with anchors on the right side and/or the bottom) are shifted and my grids automatically regain all the columns from their datasource which (the columns) I had previously removed. I have read elsewhere it is recommended to copy the 'good' designer code into the constructor after the InitializeComponent method. This doesn't seem to be a good long term solution, eg what if a user makes future design changes? Any

VS2008: Breakpoints window gone while debugging?

对着背影说爱祢 提交于 2019-12-13 17:23:19
问题 This is probably silly but very frustrating. Using VS2008 with a C++ project, when I'm working normally, the breakpoints window is visible and active but when I'm debugging it disappears and can't be shown. This is a problem if I want to edit the condition of a breakpoint while running. Pressing the breakpoints window button doesn't do anything and neither does pressing Ctrl+Alt+B Does this happen to anybody else? It's a brand new install with Visual Assist and QT integration as extensions.

Padding with multiple derivation of empty classes. Only under Windows

隐身守侯 提交于 2019-12-13 17:12:52
问题 We had a problem today where my code was generating crazy prices. I eventually boiled it down to the fact that my message classes were the wrong size, even though I am packing on one byte and have unit tests in place to ensure this doesn't ever happen. (Turns out the unit tests were not run under Windows, but that's another problem.) I've got a traits class template, which is empty except for some static const s and enum s, and an implementation of a noncopyable class which is empty. When I

obtain command line arguments in unit test

天涯浪子 提交于 2019-12-13 16:25:56
问题 In a Test project in Visual Studio 2008 (Pro), I created a Test project, and I want to configure the project properties to give a command line argument to the tests. I set the properties, but then realized I have no idea how to actually use the argument. How do you get the arguments from MSTest? 回答1: VS 2008 test are compiled into DLLs which can't directly receive command line arguments as far as I know. You could add a configuration file 'app.config' for the dll and use that instead. Just

XNA Number lock affects input

时间秒杀一切 提交于 2019-12-13 16:25:49
问题 I have an interrupt that on keyboard keypress gives me the coordinating key. When the number lock is ON, the keys come up as Numpad1, Numpad2, etc. When the number lock is OFF, the numpad keys turn into End, Left, Right, Up, PageLock... I cant have this happening because I need to keep those keys (Left, Right..) as the actual arrow keys. Id rather have the input not be affected by the number lock at all. However, I can't seem to mitigate this as I am getting the input from XNA directly. Can

Resharper (R#) 4.5 and MVC (1.0) solutions cause Visual Studio 2008 SP1 to crash on solution load

大城市里の小女人 提交于 2019-12-13 16:17:01
问题 Does anyone have the issue with Resharper where opening a solution with MVC projects causes Visual studio to close/crash? No Errors, no warning, just close. To fix the problem, I have to delete the bin and obj folders from the MVC project directory which allows the solution to be opened again. When the solution is loaded, sometimes opening a .aspx/ascx file will close visual studio too. I've never lost any work from this other than the occasional mismatched project/file system. Any help is