visual studio 2010 - Accessing USB with CreateFile to eject - not working

I am working on code to programmatically eject a USB device on user request using the Win32 API (which I don't normally work with). From searching the web up and down, the code below is what I have come up with.As you can see, my call to CreateFile() used to pass GENERIC_READ|GENERIC_WRITE for the dwIoControlCode parameter, but when I debugged, I got a handle with value INVALID_HANDLE_VALUE. In my call to FormatMessage(), the GetLastError() call returned a code that translated to "Access is denied". Looking around, I saw someone who said pas...Read more

visual studio 2010 - How to create a dynamic Infopath form?

i have a webpart that creates a list dynamically.Now i want to create a infopath form for that list dynamically with the columns of that list only, so that when a user clicks add a document that new infopath should open.So, in a nutshell, my webpart creates a list with user specified columns and its infopath(which is it's default infopath).i am using sharepoint 2010,infopath 2010,visul studio 2010....Read more

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 error LNK1123: failure during conversion to COFF: file invalid or corruptI'm not 100% sure of this, but it seems to be related to projects that have .rc (resource) files in them.I've tried repairing Visual Studio 2010 from Add/Remove programs and rebooting, but this has no effect.I also get the same error if I use Visual Studio 2012 RC to compile the ...Read more

visual studio 2010 - Cannot import the keyfile 'blah.pfx' - error 'The keyfile may be password protected'

We just upgraded our Visual Studio 2008 projects to Visual Studio 2010. All of our assemblies were strong signed using a Verisign code signing certificate. Since the upgrade we continuously get the following error: Cannot import the following key file: companyname.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_3E185446540E7F7A This happens on some developer machines and not others. Some met...Read more

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 of the results in the Find Results window and the file I clicked on would open in the code editor panel.The problem is now when I click on one of the results, it opens in the same panel as the Find Results window which happens to be much smaller than the code editor window which is annoying.Does anyone know how to make it so that when I double click o...Read more

visual studio 2010 - Performance testing tool for web application

How effective is Visual studio test suite than load runner?I would like to learn performance/load test a web application, but i got really confused to choose which tool to go for.Does the scope of VSTS 2010 is better than Loadrunner, considering the cost of the license too?PS: I'm new to performance testing, please recommend a tool which is good for a beginner. I tried Jmeter but its just a long way to go....Read more

visual studio 2010 - Errors using poshgit from Package Manager Console

I have gotten poshgit to work in plain vanilla powershell with no problems. When I run a:git pull origin masterI get the following good message: From github.com:bmccord/WebShot * branch master -> FETCH_HEAD Already up-to-date.I have also set poshgit up to run form the NuGet Package Manager Console (since it is just a powershell inside of studio). However, when I run the same command, I get: git.cmd : From github.com:bmccord/WebShot At line:1 char:4 + git <<<< pull origin master + CategoryInfo : N...Read more

visual studio - Reverse Engineering Code into a UML Class Diagram in VS 2010

Reverse engineering source code into a VS 2010 UML class model?I have a bad feeling that this is not supported in VS 2010 (I'm using the RC from Feb 2010). I've tried dragging classes from the "Architecture Explorer" to the "UML Model Explorer" but that doesn't work (won't let me drop on the UML Model).I've tried generating an old style class diagram (*.cd) and dragging the resulting diagram object to a blank UML Class diagram. No luck.Binging does show up anything other than some MS marketing blurbs about "top-down modelling" and, as expected,...Read more

visual studio 2010 - FileSystemWatcher Not Triggering Correctly

Alright my filesystemwatcher is not triggering until the first item in my listbox is present. The files listed in the listbox will not be created in that order though.Further explaination...I'm taking the value entered in a textbox, and adding that value to a listbox and changing an icon next to that value in a picture box. The icon will alert the user that the PDF hasn't been created yet. ListBox1.Items.Add(TextBoxTicketID.Text) If CStr(ListBox1.Items(0)) = TextBoxTicketID.Text Then PictureBoxStatus1.Image = My.Resources.Orange_I...Read more

visual studio 2010 - This project references NuGet package(s) that are missing on this computer

I have an ASP.NET MVC5 application that worked yesterday and now I am getting this error when I try to build: This project references NuGet package(s) that are missing on this computer.I have the two options checked that allow nuget to automatically download and install missing packages checked / turned ON. I have also tried deleting all of the files in the packages folder and then have nuget re-download them. Also when I open nuget and look for updates it says there are none that need to be installed. I can't figure what else to do to move be...Read more

How can I get Silverlight 4 Tools to work in Web Developer 2010 Express?

I installed Windows 7.I then installed Web Developer 2010 Express from here with the Web Platform Installer.I then installed the the April 15 release of Silverlight 4 Toolkit from here.I then added this reference:alt text http://www.deviantsart.com/upload/ijk0lm.pngThen in my XAML, I reference it like this but it gives me no intellisense and tells me that I am missing an assembly reference:alt text http://www.deviantsart.com/upload/cd4vrj.pngupdate:xmlns:tk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"doesn't work eit...Read more