Questions tagged [visual-studio-2012]
Visual Studio 2012 is a version of Microsoft's Visual Studio. Do not use this tag unless you have a specific question about Visual Studio -- not just a coding issue.
visual-studio-2012
22,915
questions
1309
votes
22
answers
662k
views
.gitignore for Visual Studio Projects and Solutions
Which files should I include in .gitignore when using Git in conjunction with Visual Studio Solutions (.sln) and Projects?
582
votes
12
answers
63k
views
How to disable all caps menu titles in Visual Studio
I assume the title is self explanatory. Just want to change the look of the Visual Studio 2012 not to show menu title in all capital letters.
573
votes
55
answers
387k
views
Visual Studio debugging/loading very slow
I'm at wit's end. Visual Studio is typically painfully slow to debug or just plain load ("start without debugging") my ASP.NET MVC sites. Not always: at first, the projects will load nice ...
543
votes
42
answers
191k
views
ReSharper "Cannot resolve symbol" even when project builds
My Tools:
Visual Studio 2012 Ultimate + Update 1
ReSharper v7.1.25.234
My Solution Build Status: Build Successfully
But when I install ReSharper and ReSharper code analysis is enable, many ...
540
votes
25
answers
824k
views
Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview
I've installed Visual Studio 2012 Release Preview, and it appears to be fine, but now when I try to use Visual Studio 2010 to compile C++ projects, I get the following error message:
LINK : fatal ...
533
votes
13
answers
836k
views
Is there a format code shortcut for Visual Studio?
In Eclipse there is a shortcut, Ctrl+Shift+F, that re-indents code and fixes comments and blank lines. Is there an equivalent for Visual Studio 2010?
509
votes
9
answers
152k
views
VS 2012: Scroll Solution Explorer to current file
VS2010 had the feature that viewing a file would automatically cause Solution Explorer to scroll to that file.
With VS2012, viewing different files from within the IDE no longer scrolls and select ...
469
votes
5
answers
54k
views
Disable file preview in VS2012
In VS2012 when you select a file in solution explorer it automatically opens file in a special "preview" tab.
Maybe my computer is not fast enough, but this preview is too slow for my taste.
How do ...
447
votes
72
answers
497k
views
Visual Studio "Could not copy" .... during build
I keep getting this error during the build of my VS2012 C# project
Error 41 Could not copy "obj\Debug\WeinGartner.WeinCad.exe" to
"bin\Debug\WeinGartner.WeinCad.exe".
Exceeded retry count of 10....
393
votes
10
answers
298k
views
How can I switch themes in Visual Studio 2012?
The Visual Studio 2012 offers two themes, Light and Dark. I want to switch the theme to Dark, but I'm not able to find any menus or options to do that.
I found out a way importing settings from:
...
389
votes
94
answers
425k
views
Tests not running in Test Explorer
I am currently working on a solution that has currently 32 Unittests. I have been working with the resharper test runner - which works fine. All tests are running, all tests are showing the right test ...
374
votes
2
answers
48k
views
How do I undo "Scope to this" in Visual Studio 2012?
In the Solution Explorer, I clicked on "Scope to this" to display only a part of the solution. Now I can't find how to get back to normal view.
Closing/Reopening Solution Explorer won't work; I ...
373
votes
9
answers
241k
views
How to add Web API to an existing ASP.NET MVC 4 Web Application project?
I wish to add an ASP.NET Web API to an ASP.NET MVC 4 Web Application project, developed in Visual Studio 2012. Which steps must I perform to add a functioning Web API to the project? I'm aware that I ...
347
votes
5
answers
136k
views
How do you reference a capture group with regex find and replace in Visual Studio 2012, 2013, 2015, and VS Code
I realize there are a ton of questions about this, but none that I found specifically referenced which VS version they referred to. With that important information lacking, I still was unable to ...
317
votes
36
answers
287k
views
How can I fix the Microsoft Visual Studio error: "package did not load correctly"?
I installed Visual Studio 2012 and DevExpress 13.1. As Visual Studio started, it generated an error shown by this attached image,
The 'Microsoft.VisualStudio.Editor.Implementation....
297
votes
12
answers
181k
views
Exposing localhost to the internet via tunneling (using ngrok): HTTP error 400: bad request; invalid hostname
From previous versions of the question, there is this: Browse website with ip address rather than localhost, which outlines pretty much what I've done so far...I've got the local IP working. Then I ...
261
votes
7
answers
53k
views
Visual Studio Clicking Find Results Opens Code in Wrong Window
I'm using Visual Studio 2010 and when I do a "Find in Files" the results are returned to the "Find Results 1" window which is docked below my code editor window.
Before, I would double click on one ...
253
votes
38
answers
279k
views
Error TF30063: You are not authorized to access ... \DefaultCollection
I'm using TFS Preview (Team Foundation Service) with one of my projects with Visual Studio 2012. I'm also using an on-premises TFS server with most of my projects. When I use my on-premises TFS after ...
233
votes
19
answers
296k
views
OWIN Startup Class Missing
I'm getting this error as my project is not able to find the reference for OWIN startup class. I've even installed all the OWIN reference packages through Nuget still getting the same issue. I'm using ...
233
votes
31
answers
152k
views
Visual Studio 2012 Web Publish doesn't copy files
I have a Web Application project in VS 2012 and when I use the web publishing tool it builds successfully but doesn't copy any files to the publish target (File System in this case).
If I look at the ...
229
votes
21
answers
261k
views
Intellisense and code suggestion not working in Visual Studio 2012 Ultimate RC
I have just downloaded and installed Visual Studio 2012 Ultimate RC, but I'm having an issue with the intellisense: it does not work until I press Ctrl+Space. Code suggestions are disabled also (...
226
votes
7
answers
164k
views
Visual Studio Expand/Collapse keyboard shortcuts [duplicate]
In Visual Studio, if I have a code file open, I can press CTRL + M or CTRL + M + O to collapse all code blocks, regions, namespaces, etc.
How to I do the opposite and expand everything?
I have ...
223
votes
5
answers
78k
views
Retargeting solution from .Net 4.0 to 4.5 - how to retarget the NuGet packages?
I have migrated a solution that is currently targeting .NET 4.0 in VS2010 to VS2012 and now I would like to re-target it to .Net 4.5
What I am not sure about is the NuGet packages. For example EF5, ...
199
votes
13
answers
219k
views
Asp.net 4.0 has not been registered
When I try to open my Visual Studio project I get the following error:
Asp.Net has not been registered on the webserver you need to manually configure your webserver for Asp.net 4.0.
Update:
...
197
votes
38
answers
358k
views
Error: allowDefinition='MachineToApplication' beyond application level
I have downloaded the online project in ASP.Net. While running application I get an error
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application ...
195
votes
17
answers
168k
views
Cannot install node modules that require compilation on Windows 7 x64/VS2012
I cannot install any of the modules that require compilation. All they fail with the following error:
MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". ...
My ...
195
votes
4
answers
180k
views
How to install XNA game studio on Visual Studio 2012?
Is it possible to create XNA games using Visual Studio 2012?
193
votes
17
answers
221k
views
Multiple select in Visual Studio?
Is there a way to select multiple non-adjoining (totally separate) texts in VS? I can do it in MS Word by selecting the texts separately by holding the Ctrl button, like this:
My version is 11.
Edit:...
193
votes
2
answers
25k
views
Disable Visual Studio devenv solution save dialog
When I open my solution by double click on solution file in a file manager, Visual Studio 2012 asks me whether I want to save devenv.sln:
How can I avoid this annoying thing? (except of opening vs ...
187
votes
13
answers
119k
views
Restoring Nuget References?
I have solution & project in Visual Studio 2012.
The project has a file packages.config in the root of the project.
For the purposes of this question, lets assume I accidentally removed these ...
177
votes
5
answers
76k
views
IIS Express Immediately shutting-down running site after stopping web application
I'm using visual studio 2012 in the first days when I want to stop application in IDE, application was still running on IIS Express, I could browse and work with running application, but now I can't. ...
176
votes
5
answers
73k
views
Error in SQL script: Only one statement is allowed per batch
I have 4 sql scripts that I want to run in a DACPAC in PostDeployment, but when I try to build the VS project for 3 of them I get this error:
Only one statement is allowed per batch. A batch ...
172
votes
32
answers
261k
views
Why does intellisense and code suggestion stop working when Visual Studio is open?
I have been having issues with Intellisense in Microsoft Visual Studio 2012. I will be working in a project, editing code and whatnot (after a period of time, anywhere from 5 minutes to over an ...
168
votes
48
answers
188k
views
The name does not exist in the namespace error in XAML
Using VS2012 working on a VB.NET WPF application. I have a simple MusicPlayer tutorial app I am using to learn WPF. I am converting a C# version of the tutorial to VB.NET step by step.
It has 2 ...
163
votes
5
answers
25k
views
'Specified condition "$(PackageAsSingleFile)" evaluates to "" instead of a boolean?
The visual studio 2012 on my PC get the following error message when preview in the "Public Web". I need to restart VS to get rid of the error message.
Invoke build failed due to exception '...
161
votes
8
answers
67k
views
Where can I locate themes for VS2012
Okay, the lack of color on VS2012 is gross.
Is there someplace I can get a theme pack or something for it so that it actually looks reasonable? I really liked the look of VS2010. However, the new ...
157
votes
11
answers
204k
views
How do I delete NuGet packages that are not referenced by any project in my solution?
Somehow during the upgrade to VS2012 and .NET 4.5, I've managed to get NuGet confused. There are packages that appear in the package manager (and the packages folder) that I cannot delete (I believe ...
156
votes
28
answers
232k
views
Visual Studio can't build due to rc.exe
I've searched online and couldn't find anything that resembled to my issue.
I created an empty C++ project and added a main.cpp with a return and I can't get it to build. Here is the message I ...
156
votes
1
answer
57k
views
Edit changeset comment after updates have been checked in to TFS
I have just switched to VS2012 and being unfamiliar with it, checked in some major changes without a comment. No other updates have been done since then and no other developers will have access to the ...
156
votes
22
answers
344k
views
Qt 5.1.1: Application failed to start because platform plugin "windows" is missing
Edit:
Some people started to mark my question as a duplicate. Do not forget that many similar questions existed when I asked this one (see e.g. the list below). However, none of these answers solved ...
155
votes
3
answers
57k
views
How do I open an old MVC project in Visual Studio 2012 or Visual Studio 2013?
I have an old ASP.NET MVC 2 project which I do not want to upgrade to MVC 3 or MVC 4. I am working on a new machine running Windows 8, Visual Studio 2012 and Visual Studio 2013. When I try to open the ...
155
votes
9
answers
74k
views
Where is the "Create Unit Tests" selection?
I have installed the new Visual Studio 2012 Ultimate.
I have created a Test Project with my solution and it contains some default unit tests. However right clicking on new Methods doesn't show the "...
154
votes
31
answers
113k
views
Visual Studio compiles fine, but it still shows red lines
I am using Visual Studio 2012 and it was working all fine until I started observing some funny behavior. When I open my code it shows red Underlines which we usually see when there is an error in our ...
151
votes
8
answers
259k
views
How to actually search all files in Visual Studio
I am using Visual Studio. Say for instance I have a static public method named FooBar() in class Utils. Let's also say that I use this method in a lot of .aspx files. Let's say I change the method ...
150
votes
16
answers
248k
views
What is going wrong when Visual Studio tells me "xcopy exited with code 4"
I'm not very familiar with post-build events, so I'm a little confused as to what's going wrong with my program. When compiling in visual studio 2010, I get the following:
The command "xcopy C:\Users\...
146
votes
34
answers
350k
views
Error HRESULT E_FAIL has been returned from a call to a COM component VS2012 when debugging
I have a problem debugging a project migrated from Visual Studio 2010 to 2012. Every time I go to debug it I get the error message:
"Error HRESULT E_FAIL has been returned from a call to a COM ...
145
votes
13
answers
165k
views
How to add a vertical Separator?
I want to add a vertical Separator to a Grid, but i can only find the horizontal.
Isn't there a Property, where you can enter if the line of the separator should be horizontal or vertical?
I searched ...
145
votes
5
answers
38k
views
Can anybody find the TFS "Unshelve" option in Visual Studio 2012?
I can find the shelve button okay, and had shelved changes earlier today, but now I can't seem to find a way to unshelve them! This has left me in quite a predicament!
If this button is in fact ...
144
votes
10
answers
107k
views
How to turn off brackets/quotes auto-completion in Visual Studio
As it states in the title: how to I turn off brackets/quotes/curly braces autocompletion in MSVS? I'm interested in C# and XAML mostly but other text editors would be nice too.
EDIT:
Currently I'm ...
144
votes
22
answers
197k
views
"C:\Microsoft.Cpp.Default.props" was not found
I have a project created in Visual Studio, 2013.
The project file has the following properties:
ToolsVersion="12.0",
PlatformToolset = v120.
I have Visual Studio 2013 and Microsoft Build Tools ...