visual-studio-2010

What type should I use for iterator difference to eliminate "possible loss of data" warnings?

I need a common rule for warnings in x64 mode. Which way is better? Consider the following lines of some code const int N = std::max_element(cont.begin(), cont.end()) - cont.begin(); or const int ARR_SIZE = 1024; char arr[ARR_SIZE]; //... const int N = std::max_element(arr, arr + ARR_SIZE) - arr; It is my usual code. I have no pr...

When debugging unittest in visual studio the debugsession just quits

I've had this occur to me daily now. I am debugging my libraries using unittests. My libraries are all code projects inside a single solution. So I'm stepping through the code and all of a sudden it just continues as if I would've pressed F5, which I didn't. Is this a bug or is there something I'm missing here? Anyone else experiencing...

Visual Studio 2010 Project Template doesn't show up

I tried to edit a project template after exporting it from vs2010 by extracting it and after editing compressing it again. But after that it won't show up in visual studios new project dialog. So I tried it again, without the editing. Just extract and compress again. I even used windows zip mechanisms, but still wont work. Only the expo...

SharePoint 2010: edit a view programmatically

As the title says, i need a way to programmatically edit an existing view of a list in sharepoint 2010. I have found a lot of examples about creating a new view: SPList documents = web.Lists["Documents"]; StringCollection fields = new StringCollection(); fields.Add("Type"); ...

Changing Default Location for Saving SQL Server Change Scripts in VS2010 Pro

This is a very minor annoyance of mine; maybe someone can help! I often build and modify databases from within Visual Studio 2010 Pro. I have VS set to prompt me after every change to save a change script, so that I have the scripting necessary to update the production DB when the time comes. My issue with this is that the default dire...

New to Dynamic SQL Statements.

Hi, Im currently making a very simple WebApp on a Website using ASP.NET Framework using C# in Visual Studio 2010. The website will connect to my SQL EXPRESS server running on my laptop (Its all locally based) I have a table defined as below CREATE TABLE Users( userName varchar(50), email varchar(50), firstName varchar(50), lastNa...

Conversion of VS 2010 project to VS 2008

I downloaded some sample ASP .NET projects from net. But they are in VS2010 format. I use VS 2008. How can I change the format? ...

How to add new .cxx and .h files in cmakelists.txt

Hello, I am new on cmakelists.txt. I wan to 2 new (.cxx and .h) files in my previous running project. How can I add them? One way is to just put there names in the "ADD_EXECUTABLE", and make same both files in the same directory, where whole project is available. This was not working before half an hour. But now this is working :) ...

C# 2010 Express - Missing Pointer

Where has my pointer gone :'( In the designer at the top of each category in the toolbox, I have "border" not "pointer" anymore. I don't know how I have managed this or how to set it back. I can obviously work around this by just finding the control I want to edit in the xaml but its frustrating to say the least. Does anybody know ho...

Is there a fast way to remove braces in VS 2010?

For example I have this code: if (cond) { lock (locker) { foreach (var item in list) { callFunc(item); } } } And I now want to remove all those brackets because they are too redundant. I always do it manually but I find myself doing this often so was wondering if there's a shortcut I missed or easy ...

Customize web deployment package in Visual Studio 2010

I have a WCF DataService build in VS 2010, targetting .Net 4.0. This all works fine. I've created a deployment package and have the application deployed to a web server using MSDeploy and a zip file. When I set up an automated build on a TFS Build Agent the contents of the deployment package changed. I no longer get the strong named asse...

Is it possible to have forms in sub-namespaces of a VB.NET WinForms project?

If I create a new class library project in VB.NET, I can create subfolders (a la C#), add WinForm objects to these subfolders, and then specify a namespace: Namespace Sub1.Sub2 Public Class SomeForm Public Sub New() InitializeComponent() End Sub End Class End Namespace This resolves as ProjectRootN...

Setting SizeToContent fom Child UserControl causes FatalExecutionEngineError

I've added a dependency property to my view base class, that is supposed to allow the child UserControls to set some properties on the parent window, one being SizeToContent. When my OnSizeToContent method runs, when it tries to change the main windows's SizeToContent from WidthAndHeight to Manual, I get this odd error: FatalExecutionEn...

How to make a webbrowser in C++ without dependencies?

How can I use IE control or some kind of webbrowser in c++ but without any external dependencies? I mean can be done with pure win api or something like that? I know the basics of c++ and the methods I know to use the webbrowser control needs the c++ libs to work. Edit: Sorry my question is unclear, im such a noob sometimes. What I mean...

How to display the ouput window from an add-in?

I currently have a visual studio add-in and have created a new output window pane which I can write text to successfully. However, when the output window is not open or it is minimised then it doesn't open (popup) when I call the Activate() method on the pane. Any ideas how I can achieve this? ...

MySQL with Entity Framework - what am I doing wrong?

...

determine SVN checked in state of a file in c#

I currently have a requirement where I need to validate that all the files in a folder structure which are in SVN to see if they are up to date. Is there a way to do this using the svn artefacts that are held in the same directory as the file without interacting with SVN? Apologies, this appears to need some further explanation... I'm i...

Cannot find any coverage data (.coverage or .coveragexml) files. Check test run details for possible errors.

I am using Visual Studio Ultimate and I cannot get code coverage data. All of my unit tests pass, and I edited the Local.testsettings file to enable code coverage and configured it to reference the dll of my project. Also the active test setting is set to Local.testsettings and not TracAndTestImpact.testsettings. ...

How to enumerate C# project files and update the header of a file?

Can somebody help me on enumerating a C# project files and update the cs file headers in Visual Studio 2010? Any helpful code snippet or a pointer to that would be highly appreciated. ...

Visual Studio 2010 - Semi-Transparent Floating Windows

Is it possible to make floating windows in Visual Studio 2010 semi-transparent? I would like to be able to float an editor window and reduce the alpha level on it. Could this functionality be created with an extension that modifies the stock editor window? If not an extension, are there decent third party applications which would be cap...