FAQ Database Discussion Community

## Tfs and nuget: project files are forever in check out after build with restore nuget packages

visual-studio-2012,tfs,nuget
MS VS 2012 I have solution in tfs with enabled nuget packages restore. Every time when I build solution all my project files are cheked out with this changes: <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet...

## How to sync a Progress Control with a set of data which is loading in a Dialog Box in Visual C++

c++,visual-studio-2012,visual-c++,mfc
I'm trying to add a progress control in my dialogs, that will step upon every iteration of a loop until completion. I've never played around with progress controls before, so I'm totally clueless as to where I should start. I've added a progress control resource view into my dialog, but...

## Cant find File System, Registry icon in WIX setup project in Visual Studio

visual-studio-2012,wix
I installed WIX in my machine. I followed the video of https://www.youtube.com/watch?v=CoFPyIbcqN8enter link description here I can not find any way to add File Systems, no icon for it, no context menu entry on project. I am using Visual Studio 2012....

## 'Microsoft.VisualStudio.PlatformUI.SolutionNavigatorPackage' doesn't loaded correctly

vb.net,visual-studio-2012
I'm developing an OPC Client, everything was good until i get an HRESULT-FAULT Error, so i try this solution; error-hresult-e-fail-has-been-returned-from-a-call-to-a-com-component I execute this command : C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe /setup Then when trying to lunch VisualStudio V12 i get this error: Any help will be appreciated....

## x64 program returns the correct SIDT value occasionally (x64 assembly)

c,visual-studio-2012,assembly,64bit
I use Visual studio 2012 and I created a x64 bit program that returns the value of the SIDT function (without the offset). The problem is that when I initially run the program, it returns the right value, but when I run the program multiple times, it returns the right...

## Visual Studio watch shows different values for same object

c++,visual-studio-2012
I am working on a game with a few other students and I just encountered an issue. I have a factory object which has a std::vector<BehaviourFactoryCallbackObject> called registeredObjects. BehaviourFactoryCallbackObject contains a user given function used to create objects. This section is in the .dll created by the game engine (irrlicht)....

## Dynamic loose source routing in IP networks

c++,visual-studio-2012,boost,routing,ip
Okay guys, I have this idea to recreate a program wich could find the best rout in IP networks. I found one guy on the internet who did it, and he shared some code..but whatever I'm doing with it, I can't make it work. I'm using Visual Studio 2012 with...

## NUnit Categories not showing up in Visual Studio

unit-testing,visual-studio-2012,nunit
I want to custom group my tests by function so I'm using the nunit Category attribute, like this: [Test, Category("Cat1")] public void SomeMethod() { } [Test, Category("Cat2")] public void AnotherMethod() { } But in Visual Studio the categories do not show up, all I see are the defaults to group...

## Error: 'The system cannot find the file specified.' when trying to access certificate

c#,visual-studio-2012
I am using the Google API for BigQuery and it requires that I use a .p12 certificate. The issue is that no matter how I try to import my certificate resource I keep getting the same error: The system cannot find the file specified. I've added the file as follows:...

## Mixed Dev Environment: Automate Visual Studio .csproj updates from Git/TFS?

git,visual-studio,visual-studio-2012,tfs,csproj
I'm hoping you can help me solve this development workflow annoyance. I'm a front-end dev working on a project where most of the other developers use MS Visual Studio, and I don't. We've got TFS set up, and I'm able to check out code and make edits locally. After making...

## Label change when button click [closed]

html,css,visual-studio-2012
I'm trying to make a label change when I click a button, but for some reason it is not working. It was working until I made a little change, and i do not know what to do anymore. Can some one help? Here is the code: private void btnColorChange_Click(object sender,...

## how to stop“build must be stopped before the solution can be closed”

c#,visual-studio-2012
The "Build" menu appears as it would if the solution were building, but the Cancel Build (Ctrl+Break) menu item has no effect. Trying to close the application prompted as: The build must be stopped before the solution can be closed. Can anyone help me to resolve this problem...

## << Definition using inheritance and templates [duplicate]

This question already has an answer here: What is an undefined reference/unresolved external symbol error and how do I fix it? 18 answers I am trying to implement a Linked List in C++ using templates. Unfortunately I am getting an unresolved external error when I try to use a...

## Running a specific version of visual Studio

windows,visual-studio-2012
I have Visual studio 2012 Ultimate and Professional installed on my computer. By default Windows opens up Ultimate, is there a way to specify which version I want to open?

## Forbid linking against a c++ method

c++,c++11,visual-studio-2012,dependency-walker
I try to forbid the use of a method, to have a compile error if some piece of code use it. This is a proprietary legacy module, that I know that some methods are problematic. We have headers files, and dlls. I can't figure out all the use of this...

## Memory leaks despite destructor call

c++,visual-studio-2012,memory-leaks
I'm working on a class LinkedList which looks like this: private: LL_element* first; LL_element* last; int size; public: //constructor Linkedlist(): first(NULL), last(NULL), size(0) {} //destructor ~Linkedlist(); //adds element at the end of the list. void push_back(int value); //removes an element at the end of the list. bool pop_back(int& value); The...

## Where to specify preprocessor directives in visual studio?

c#,visual-studio-2012
Trying to define a preprocessor directives in the Visual studio 2012. #define FLAG .... #endif But not sure, where to include this FLAG in visual studio - C#. I remember specifying something like this in C++ projects. Any thoughts ?...

## Missing DLL even though the directory containing it is in the path

windows,visual-studio-2012,dll,vtk
I'm currently trying to build and run some of the example of the VTK. Building goes just fine, however when trying to run the examples I have some missing DLLs errors. I am using windows 8.1, Visual Studio 2012. My path actually include the directory where all the dlls are...

## How do I get Visual Studio 2012 to generate code from a windows form design?

vb.net,winforms,visual-studio-2012
I am trying to add a simple windows form to my VB.Net project. I have used the designer to design the form how I want it with buttons, a text box and a Timer. The problem is when I try to view the code, there is only an empty class...

## How to test a WebApi service?

c#,asp.net,rest,visual-studio-2012,asp.net-web-api
I'm really new to WebApi and I've been reading information about it but I don't know how to start my application. I already had a project with many WFC services with .Net 3.5. So, I updated my project to 4.5.1. Then I created a controller with the Visual Studio 2012...

## Autocomplete in package manager console exist?

visual-studio-2012
I saw some video about Entity Framework Code First and it seems that they use some autocomplete function when type command in Package Manager Console. Does it really exist because i cannot find something like that ? I tried Ctrl + J and Ctrl + Space(like Intellisense in visual studio...

## Exposing localhost to the internet via tunneling (using ngrok): HTTP error 400: bad request; invalid hostname

asp.net,visual-studio-2012,asp.net-web-api,iis-express,ngrok
From previous versions of the question: (So there is this, which outlines pretty much what I've done so far...I've got the local IP working. Then I found ngrok, and apparently I don't need to connect via the IP.) What I am trying to do is expose my website running on...

## How to show custom update/modifications text when I publish my outlook-addin. VB.NET

Recently I have created an Addin for my outlook 2013 in VB.net. I usually do a lot of modifications on this application especially in the beginning. These modification automatically download when a user starts its outlook as soon I publish the project. The question I have, and which I cant...

## Dapper, MS Access, Integers and “no value given for one or more required parameters”

c#,ms-access,visual-studio-2012,oledb,dapper
I keep getting the error "no value given for one or more required parameters" on the third attempt to insert in the code below. The first two attempts work fine. I'm running in .NET 4.0, against MS Access in VS 2012. And this problem appears to be consistent whether I'm...

## How to add a resource file in visual studio

visual-studio-2012,resx
I want to add a resource file to my project in Visual Studio. But I am not able to find from where I can create the resource file. Can anyone help me out in this

## Cannot create link between WorkItem and Server object in TFS 2012

visual-studio-2012,tfs,tfs-sdk
I'm trying to create a link from a work item to the current server version of a file in TFS via the API. I can do it within Visual Studio (2012) so I know it's possible. However when I try and do it via code it fails with TF201038: Linked...

## The difference between EF6 and EF4.1 in files hierarchy

c#,entity-framework,visual-studio-2012,entity-framework-6,edmx
I'm a beginner to Entity Framework . I notice that When I use EF6 with Visual studio 2013: I have .Designer.cs empty file with this comment: // T4 code generation is enabled for model 'C:\Users\Luka\Desktop\Test\EF-db2008\AdventureWorks\AdventureWorksLib\AdventureWorksLib\AWLTModel.edmx'. // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer...

## Post-build ditrective syntax

c#,asp.net-mvc-3,visual-studio-2012
I received this dreaded error, related to ClosedXML, when I deployed my project to the server. The project runs locally, though. Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. So I placed the "missing" DLL file...

## Any way to use XML axis properties in C#?

c#,xml,visual-studio-2012
Is there any way at all, by using some imports or usings, to use XML axis properties in C#? I mostly work in VB, and am so used to being able to just query XML with (from xel in xdoc.<names>) Having to do a little work in C# now, it...

## Team Foundation 2012 not recognising changes in vb6 app

visual-studio-2012,tfs,vb6,tfs2012
I'm using Team Foundation 2012 to provide source control for a VB6 (yes, I know) project. On a newly set up machine (installed Team Explorer 2012 and TFS Power Tools 2012), TFS does not seem to be properly noticing the changes. The local Team Explorer says it is connected to...

## Toggle groups based on a parameter

sql,sql-server,visual-studio-2012,reporting-services,toggle
I have a reporting requirement in which I have 3 groupings Group_1 parents -> Group_4 lowest child I have a groupingID param which is an int that I'm using to show the same report either as region/div or emp/supervisor. Group_1 =totals and Group_4 = Employee and NULL for region/division. Updated...

## What do I need to get Microsoft.TeamFoundation.Framework.Client.dll?

visual-studio,visual-studio-2012,tfs,tfs2013
I am using visual studio 2012 and tfs 2013. The problem i am facing is Microsoft.TeamFoundation.Framework.Client.dll is missing. But i have other dlls such as Microsoft.TeamFoundation.Client,Microsoft.TeamFoundation.WorkitemTracking.Client. Can anyone tell why the dll is missing? Is there any way to resolve the issue. Thanks in advance.

## How do I create a new txt file every time I click on this button?

vb.net,visual-studio-2010,visual-studio-2012
Private Sub cmdsummary_Click(sender As Object, e As EventArgs) Handles cmdsummary.Click Dim writer As New System.IO.StreamWriter("C:\Users\salman\Desktop\Text.txt") writer.WriteLine(Me.customer.Text + Me.txtcustomer.Text) writer.WriteLine(Me.todaystotal.Text + Me.txtsummarytotal.Text) writer.WriteLine(Me.average.Text + Me.txtaveragetotal.Text) writer.Close() End Sub Every time I click on cmdsummary it edits the notepad file (txt) and updates it but I want to create a new txt...

## Uninstall web essentials

visual-studio-2012,web-essentials
I have downloaded a .vslx file and installed which cuases web essentials to be part of VS 2012. This may be a silly question. But How can I remove the webessentials from vs.I cannot find such an option in VS 2012. I found it total messy...

## Sync 2 list boxes to 1 scrollbar

vb.net,visual-studio-2012,scroll,listbox,listbox-control
I have 2 listboxes next to each other. One holds the order the other holds the total cost of the order. For obvious reasons i need both listboxes to scroll simultaneously. Here is what i have tried Private Sub lstOrders_Scroll() lstTotalsEachOrder.TopIndex = lstOrders.TopIndex End Sub Private Sub lstTotalsEachOrder_Scroll() lstOrders.TopIndex =...

## Executable suddenly stopped working: silent exit, no errors, no nothing

c++,qt,visual-studio-2012,executable,exit
I am facing a rather peculiar issue: I have a Qt C++ application that used to work fine. Now, suddenly I cannot start it anymore. No error is thrown, no nothing. Some more information: Last line of output when application is started in debug mode with Visual Studio 2012: The...

## VS2012 Identifer not found when part of static lib

Using VS2012 C/C++: I created and linked a static lib called "libtools" to my project. Calls to functions in the libtools lib worked as expected. I created and linked a second static lib called "shunt" to my project. But when I incorporate a call to a function in shunt, I...

## Web Api 2 Controller behaves different in Visual Studio 2012 vs 2013, Authorize Attribute

visual-studio-2012,visual-studio-2013,asp.net-web-api2,iis-express,authorize-attribute
The exact, precise, .sln file which contains my MVC 5/ Web Api 2 web project behaves one way when I run it from the Visual Studio 2012 installation and behaves in an entirely different way when I run it from Visual Studio 2013. In particular, I have a CustomerController that...

## Setting the .src of img elements fails

javascript,html,visual-studio-2012
i have a 6x6 html-table. Each <td> holds <img id="1back" src="" /> where the id of each img-element is declared as "1back" to "36back". Further I have 18 .jpg files named "1.jpg" to "18.jpg". Each image has to appear in the grid twice , distributed randomly. I am trying to...

## How to install C++ library to VS2012?

c++,visual-studio-2012
I am not familiar with the way to install the libraries. I've downloaded the library which I need and there are some *.h in the include folder and *.cpp in the src folder.But what makes me mad is that I don't know how to use them.Just put them into the...

## Command line build solution vs Visual Studio 2012 build

c#,wpf,visual-studio,visual-studio-2012,build
I am in the process of creating a CI build machine. I use the command line to build our VS2012 solutions which contain many project types (wpf, forms, MFC, c# and c++). I use the following command line: call "%VS110COMNTOOLS%\vsvars32.bat" devenv.com SolutionName.sln /rebuild "Release|Mixed Platforms" If I look at the...

## How do I get list of all users in TFS 2013

c#,visual-studio-2012,tfs,tfs2013
I am using Team Foundation Server (TFS) 2013 and Visual studio 2012. I need a list of all the user in TFS. Is there any way to get all the users in TFS using C#?...

## No warning on deleting a forward declared pointer (Visual Studio)

c++,visual-studio-2012,memory-leaks,forward-declaration
Deleting forward declared pointers leads to undefined behavior. Examples: https://gist.github.com/jatinganhotra/4144778 http://stackoverflow.com/a/14382111/399908 However, my Visual Studio (VS2012) compiler doesn't warn me about it. Is this an unfixed VS2012 compiler bug? Did I disable (or never enable) the corresponding warning? Is this specific to some project setting? Visual Leak Detector hinted me...

## How to uninstall a program using C#? [duplicate]

c#,visual-studio,visual-studio-2012,command-line,windows-installer
This question already has an answer here: How to uninstall MSI using its Product Code in c# 4 answers I'm trying to uninstall a program using C# via Visual Studio and possibly CMD. I made several attempts but could not getting anything to go. Attempt #1: RegistryKey localMachine =...

## error C4996: 'std::_Copy_impl': is it safe to disable it? [duplicate]

c++,visual-studio-2012,boost,odeint
This question already has an answer here: xutility(2227): warning C4996: 'std::_Copy_impl' 1 answer I'm using odeint boost for solving differential equations. In visual studio 2010, there is no errors showing up but when I use visual studio 2013, I get this error xutility(2132): error C4996: 'std::_Copy_impl': Function call with...

## How do I avoid the loss of data after I rerun (debug) my program in Visual Studio?

visual-studio,ms-access,visual-studio-2012,ms-access-2013
I want to add a new record into an Access database which is already populated with data. When I initially run (debug in Visual Studio) and add the record, it is saved into that specific table. Then when I close the program and run it again, the record is nowhere...

## Asp.NET: How to trigger OnCommandClick first than OnClientClick

c#,asp.net,visual-studio-2012,javascript-events
I am crating a session inside the OnCommandClick to save informations about a file that will be downloaded. If I click to download it, the OnClientClick works fine and I can download the file. But when I have a grid with more than one file, I think that the function...

## Move from visual studio online to github

git,visual-studio-2012
I've created a project with visual studio online source control, however I've never actually synced with the server, i'm just committing locally. Now I need to add this project to a github repository, so in the windows github client I've located the project and added it, I can see all...

## How to successfully implement WPF textbox validation?

c#,wpf,validation,xaml,visual-studio-2012
I'm trying to implement what should be simple textbox validation for a WPF application, but I'm having some problems. I used this guide: http://www.codeproject.com/Tips/690130/Simple-Validation-in-WPF My textbox in MainWindow.xaml: <TextBox x:Name="textbox1" HorizontalAlignment="Left" Height="23" Margin="93,111,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Style="{StaticResource textBoxInError}" Validation.ErrorTemplate="{StaticResource validationErrorTemplate}"> <TextBox.Text> <Binding Path="Name"...

## Partial specialization of nested template types produces “internal error” in VC++ 2012 compiler

c++,templates,visual-studio-2012,nested
In the following example, I have an object class which defines a reference class. Both accept mutability as a template argument. In the case that 'obj' is 'Const', I want to disallow a reference of type 'Non_Const'. The example produces the ambiguous message, "An internal error has occurred in the...

## how to hide items behind a panel in wpf

c#,.net,wpf,xaml,visual-studio-2012
i used the following code for control display <Window x:Class="WpfApplication29.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid > <Border Margin="100" BorderThickness="3" BorderBrush="Black"> <Canvas> <Label Content="This is test" FontSize="129" Width="400" Height="200"/> </Canvas> </Border> </Grid> </Window> I want to display it as the 2nd one which...

## Asp.Net Website extension for visual studio 2012 express for windows desktop [closed]

asp.net,visual-studio-2012
Currently,I have Visual studio 2012 express for windows.I want to build asp.net website on it but it currently does not have any provision for it.What should i do?

## Visual Studio, Debug project that calls another project within the same solution file

c#,visual-studio-2012,visual-studio-2013
I have a solution in Visual studio with two projects. One project is a launcher application (calls different executable depending on the arguments, similar to how VS launches the approriate version depending on the .sln file) and the second project contains the executable called by the launcher. Is there a...

## Visual Studio native unit testing: Debug/console output?

c++,unit-testing,visual-studio-2012
Can anyone tell me how to enable or get debug or console text output when running unit tests in a native (C++) test project in Visual Studio 2012? Answer should not include the phrase, "use Google Test"....

## One file of the project does not seem to be under source control

c#,visual-studio-2012,tfs
VS2012 Pro and TFS: This is a file that used to be under source control and even the icons next to it I think is showing that it is but when I make a change and right click the option for "Undo Pending Changes" is disabled. However other files in...

## Difference between vector and list [duplicate]

c++,visual-studio-2012,visual-c++
This question already has an answer here: vector vs. list in STL 11 answers I'm learning c++ language and I trying to find out what is the difference between vector's and list's. I am using visual studio tool for coding. Can someone explain what is the difference? ...

## Edit xml in program files throgh code

c#,xml,visual-studio,visual-studio-2012,windows-8
I have a xml file in C:\Program files(86)\Application . I can edit the file only through note pad which is open as Administrator. I want to edit the file through code. Is it possible to edit the xml file through code? I am using windows 8.1 and visual studio 12.

## How come Visual Studio does not optimize structs for best memory usage?

c++,visual-studio-2012,compiler-optimization,struct-member-alignment
My question is why doesnt the Visual Studio 2012 compiler automatically reorder struct members for best memory utilization? The compiler seems to store the members in exactly the order they are declared in the struct definition, with some empty padding as required for member alignment. It seems like reordering would...

## how to prevent bug/error when saving data with the same primary key on visual basic 2012?

sql-server,vb.net,visual-studio-2012
i'm using visual studio 2012 and microsoft SQL server 2012 to make a save function. my coding is like this: form: Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click If Len(Trim(txt_nis.Text)) = 0 Or Len(Trim(txt_nisn.Text)) = 0 Or Len(Trim(txt_namasiswa.Text)) = 0 Or Len(Trim(cmb_kelaminsiswa.Text)) = 0 Or Len(Trim(txt_kotalahir.Text)) =...

## How to create a Simple Build Script for Visual Studio from the Command Line?

batch-file,visual-studio-2012,cmd,build-script
I have a lot of Visual Studio Project Solutions in multiple directories (all with the extension .sln) and I want to write a simple batch script that will automatically build all solutions listed in the batch file. I am able to manually build a solution by starting up the Visual...

## Spaces displayed as dots and tabs displayed as arrows

visual-studio-2012
In my Visual studio 2012 editor I erroneously pressed some obscure key combination (Ctrl-Alt-something or so) and now spaces are displayed as little dots and tabs are displayed as arrows. I'd like to get rid of this, but I haven't found the corresponding option in TOOLS-Options-Text editor....

## ReSharper Documentation Tags Formatting One Per Line

c#,visual-studio-2012,resharper
I'm trying to get ReSharper to behave properly when creating XML comments. When I see the preview it looks exactly how I want it to look but when I actually document a method or a class it isn't formatting as per the preview. I get this: /// <summary> /// The...

## Named pipes error 40, connecting to Xampp through visual studio

c#,php,visual-studio-2012
I have set up Xampp as a server to host my database. I am trying to connect to the database, filter results and output them to the datagridview based on the text in txtSearch private void btnTest_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=localhost;Initial Catalog=epas;Persist Security Info=True;uID=root;Password=Password");...

## Accessing parent parameters from child package SSIS 2012

visual-studio-2012,ssis
I know this subject has been covered here several times but I could not get any of the answers worked for my problem. I have 7 packages running in a Master Package and 7th child has 3 parameters. To be able to let user define those 3 parameters, I have...

## Cannot find InvalidCastException in C# Application

c#,winforms,visual-studio,visual-studio-2012,webforms
I'm getting a strange error in Visual Studio, and of course this great software is unable to tell me where the error is, just that I'm getting an error. I guess the best I can do is paste my code. using (SQLiteCommand cmd = new SQLiteCommand(query, con)) { using (SQLiteDataReader...

## Redemption Cannot add Item to Folder

c#,visual-studio-2012,outlook-redemption
I'm writing a program in C# using Redemption to iterate through the RDOMail objects in a RDOPstStore and copy the ones marked as relevant to a new RDOPstStore. I can modify the folders in the RDOPstStore.IPMRootFolder, and do so to only leave one folder (Results). However when I go to...

## how to send a post request using Visual C#

c#,windows,visual-studio-2012
I want to create a authentication page with a website from a windows app using XAML and C#. i have tried using the following code: private void SubmitData() { try { string user = textBox1.Text; string pass = textBox2.Text; ASCIIEncoding encoding = new ASCIIEncoding(); string postData = "user=" + user...

## Share project between Visual Studio 2013 and Visual Studio 2012

c++,visual-studio-2012,visual-studio-2013
I am using Visual Studio 2013 community and created C++ project. I want to share the project with a colleague working with Visual Studio 2012 professional. Once he took the project he had to change the toolset to v110 and it worked just fine for him. When he shared it...

## Angular Structure Incorrect Somewhere

c#,angularjs,visual-studio-2012,angularjs-controller,angularjs-controlleras