visual-studio-2012

Show codes in next line instead of horizontal scroll in visual studio

你。 提交于 2019-12-22 18:49:35
问题 in Visual Studio 2012 i didn't have horizontal scroll in my editor, if my code goes long it continue in next line, i want to know how to do like this in Visual Studio 2013? 回答1: Try going to Options --> TextEditor --> All Languages and make sure that Word Wrap is enabled. 回答2: The default key binding to toggle word-wrap in Visual Studio is Ctrl-e+Ctrl-w. 来源: https://stackoverflow.com/questions/21504708/show-codes-in-next-line-instead-of-horizontal-scroll-in-visual-studio

'ObservableCollection' could not be found even when using 'System.Collections.ObjectModel'

元气小坏坏 提交于 2019-12-22 18:39:31
问题 System.Collections.ObjectModel is included. Visual studio 2012 still says Type or namespace name 'ObservableCollection' could not be found. Similar to this question Code: class ObservableClass : ObservableCollection<OtherClass> { } EDIT: This is .NET Framework 3.5 and is a console application 回答1: You're probably missing an assembly reference... depending on which framework you are targeting, this class might be found: in WindowsBase.dll (.NET 3.x) in System.dll (.NET 4.x) in System.Windows

Difference between treatment of ambiguous generic interfaces by F# between VS 2012 and VS 2015 leading to compile errors in the latter

瘦欲@ 提交于 2019-12-22 17:56:53
问题 (Note: Question updated with full reproducible example) After migrating an F# project from VS 2012 to VS 2015 I receive an error on certain usages of interfaces. In particular it happens where a type implements two generic interfaces. I know this is not allowed in F# directly, but this type comes from C#. To reproduce the problem: 1. type definition in C#: Paste this in some class library. public interface Base { } public interface IPrime<T> : Base { T Value { get; } } public interface IFloat

Deploying a Visual Studio C# project with database

本小妞迷上赌 提交于 2019-12-22 17:53:40
问题 I'm developing my C# application with database hosted on SQL server. I just need to know how to create an installer for the client. And what should I install on the client machine? I tried publishing the application but database changed are not reflected, so what should I do? I've tried searching on the internet how to publish this application and give it to the client, but I couldn't find anything helpful. Note: I'm using Visual Studio 2012, SQL server 2012. 回答1: There are many posts online

VS 2012 Debugger, modules loaded twice, breakpoint couldn't be hit

♀尐吖头ヾ 提交于 2019-12-22 17:44:22
问题 I have a Visual Studio 2012 solution which contains two projects, 1st is C++/CLI wrapper and the 2nd is C# , where I use the wrapped dll. Both projects are in 32 bit debug mode. In C# project Enable native code debugging option is enabled. In C++/CLI debugging mode is set to mixed . The problem is that in both projects the breakpoints can't be hit. I followed advices from here and here but without luck. The most interesting thing, that bot projects are loaded twice, the locations are the same

How to get Qt 4/5 to build using VS2012 while targeting Windows XP?

99封情书 提交于 2019-12-22 15:52:25
问题 I'm trying to build Qt 4.8.5 / Qt 5.2.1 using Visual Studio 2012, targeting Windows XP (SDK v7.1a). There are various incompatibilities of the source with SDK v7.1a while compiled with VS2102, so it doesn't work out of the box. This is to be a canonical question that provides the knowledge necessary to successfully build Qt in such an environment. 回答1: First of all, the build environment needs to be prepared as below. Caveat emptor: There are variants of this script "out there" that have

TFS2012 Wrong user missing workspaces

此生再无相见时 提交于 2019-12-22 12:58:38
问题 I have a very unusual issue with TFS2012, We've just migrated across domain and upgraded from TFS2010 to TFS2012. All seems to work apart from one user, who we don't seem to be able to get his workspaces to work. When I make a connection to the TFS Server, I enter the server name and port number, this connects, but in the 'Connect to Team Foundation Server' window, bottom left it shows my login credentials, even though the user logged in is categorically the user, he gets all my tfs

How do I shorten this generic list?

二次信任 提交于 2019-12-22 12:51:13
问题 My question is simply: how can I shorten this code even more? List<Button> buttonList = new List<Button>(); buttonList.Add(button1); buttonList.Add(button2); buttonList.Add(button3); buttonList.Add(button4); buttonList.Add(button5); buttonList.Add(button6); buttonList.Add(button7); buttonList.Add(button8); buttonList.Add(button9); 回答1: If you've got your buttons stored in some control's Controls collection (say, a Form or a Panel ), then you could use: //here `this` is supposed to be a `Form`

How do I shorten this generic list?

∥☆過路亽.° 提交于 2019-12-22 12:51:09
问题 My question is simply: how can I shorten this code even more? List<Button> buttonList = new List<Button>(); buttonList.Add(button1); buttonList.Add(button2); buttonList.Add(button3); buttonList.Add(button4); buttonList.Add(button5); buttonList.Add(button6); buttonList.Add(button7); buttonList.Add(button8); buttonList.Add(button9); 回答1: If you've got your buttons stored in some control's Controls collection (say, a Form or a Panel ), then you could use: //here `this` is supposed to be a `Form`

version control over visual studio formatting style

眉间皱痕 提交于 2019-12-22 12:34:30
问题 What's the way to go if I want to have a consistent style standard versioned? I want to achieve two things: Pressing ctrl-k,ctrl-f (auto indenting) formats the code based on a shared standard Stylecop runs against shared rules What files do I have to add in my git repository to achieve this? 回答1: You can add a pre-commit hook. You can version in your git repo a hook script (say pre-commit.sh ) at the root of your project and include the installation instructions in your README/documentation