Visual Studio only any cpu debug .exe works - c#

In Visual Studio 2015 community when building forms-applications, only when configuration is set to "Debug" and platform to "Any CPU", the generated .exe actually works. ANY OTHER configuration just doesn't run.
If I try to delete the bin-folder it says the folder is used by another program. Still nothing shows on task manager. I have to reboot to terminate it.
This happens even on empty projects so it can't be caused by my horrible coding. I've even reinstalled Visual Studio but no luck.
I need this to work for my installer that doesn't work with "Any CPU"-config.
So how do I get all configurations to work?
Thanks for helping!

Related

Visual Studio Project Not Running properly

When I open any application or start a new application it will build the application but it will not run the application. I have restarted my computer and checked task manager for any processes pertaining to my application. If I run visual studio as administrator the application will run but it will not build automatically even though in the visual studio setting it is set to build and run. However if I copy my application to another computer it builds and runs perfectly fine. I usually use Visual Studio 2010 Professional but I also have Visual Studio 2012. The problem is constant between the two applications. Any suggestions?
Try removing the obj files withing your project directory.

C# Microsoft Visual Studio Release Mode

I created a C# project using Microsoft Visual Studio 2010 in debug mode and then built it in release mode so that I could run the code on some other machine without Visual Studio. I was motivated by this.
Everything seemed to work fine. However, my ' .../bin/release ' folder has .dll files and not .exe which I could just copy and run from the other machine.
How could I work around this?
EDIT: Here's the solution explorer screenshot:
Click Build, Publish within Visual Studio.

Visual Studio 2010 Extension - Cannot break execution in Experimental Instance

I am trying to break execution with Debug points in a Visual Studio extension running against a Visual Studio 2010 Experimental Instance.
For some reason, when trying to break execution, I receive an error:
"Unable to break execution. This process is not currently executing the type of code that you selected to debug."
Oddly enough, I can debug without any problem in a Visual Studio 2005, and 2008 Experimental Instance.
Has anyone else ran into this with VS 2010?
It sounds like the problem is that you're setup to debug only managed code in your VS 2010 project file. If you're setup to debug only managed you'll get this message if VS is currently executing native code (VS spends a good portion of it's time in native code).
To fix this do the following
Right Click on the project and select Properties
Go to the Debug Tab
Check "Enable unmanaged code debugging"
I re-installed Visual Studio 2010 and the SDK. This seemed to work at first, but after changing a source file and launching the Debugger, I was unable to break execution yet again.
I went to Tools->Options and unchecked 'Only build startup projects and dependencies on Run'. This fixed it! This must have something to do with an extension solution that supports both VS2008 and VS2010.

When creating a WCF project in VS2010, I get "Error : WcfProject.csproj cannot be opened. The project type is not supported by this installation"

hey there. So, we have a VS2010 project and the VisualSVN server on one machine. We added a new machine with the client visual svn and the projected loaded in. except for the WCF service. i'm getting a...
" error : the project file c:/..../wcfProject.csproj cannot be opened.
The project type is not supported by this installation."
i've checked the directory, the files and file structure are there and the same as the main development machine. any tips/solutions?
thanks
David K.
I had a similar problem with some WCF solution which I downloaded from a blog.
The solutions of running deveng with the switches did not resolve my issues. After some more searching it turned out that the following clue in the answer of Ralph Willgoss lead to the solution of my problem:
I resolved it by installing the Visual Web Developer.
I also had to (manually) install the Web Platform Installer to (automatically) download the last requirements for the project to properly load.
I had a similar problem when trying to create a new project of the following types:
WCF Service Application
WCF Work Flow Service Application
Syndication Service Library
I was using Windows 7 Ultimate 64bit, with no other versions of Visual Studio installed.
I also had tried many other options, such as:
devenv /resetsettings
devenv /resetskippkgs
ensuring I had C++ option of VS2010 installed
VS2010 Service Pack 1
I resolved it by installing the Visual Web Developer.
There are a few things this could be so I can't give you one specific answer. However, here are a few things to try on your machine that is throwing the error:
First, verify which version of Visual Studio is set as the default for opening csproj files. It could be that you installed SQL or something else that uses an older version of Visual Studio. Sometimes that can give an error. Even if the default is the Visual Studio version selector I've seen it throw an error. Open up the correct version of Visual Studio (through the Programs menu) and then inside Visual Studio try to open the package. If that works, you know the issue is with which version is opening the file.
If that doesn't work, you could try resetting the Visual Studio settings. From the run menu type devenv /setup This should reset the Visual Studio environment and hopefully it will fix the issue. If this does not work, try running devenv /ResetSkipPkgs from the Run menu. This will try to load any packages that Visual Studio previously skipped.
If these steps don't work, let us know. Give us any further error messages that come up after attempting these steps.

Visual Studio registry capture utility has stopped working, error compiling C# project in Windows7

Visual Studio registry capture utility has stopped working.... http://easycaptures.com/fs/uploaded/256/9376236710.png
Windows 7 Shows build error like below everytime I compile my project.
From Microsoft Connect:
Locate regcap.exe here: C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\Deployment
Right click and select properties.
Select Compatibility tab
Check box to Run this program in compatibility mode.
Select Windows Vista SP2 in the OS drop-down and Run as Administrator.
Click Ok and Recompile.
This solution also works on Windows 7 with Visual Studio 2008 (32 bit version), where in the 5th step, you just need to select the check box in the last group box "Privilege Level" for "Run this program as an administrator"
Another reason From Add-In-Express:
Long paths (a buffer overflow?). This was my case: I had *.tlb in a setup project with a long path, I excluded it and it compiled ok.
I ran into this build an MSI project using VS 2008 on Windows 7 64 bit. The problem was that an assembly that reference Microsoft.InteropFormTools.tlb and had to be callable from VB 6 through COM. Visual Studio defaulted the type library's Registry property to vsdrfCOMSelfReg. Changing it to vsdrfDoNotRegister solved the problem.
TIP: Pay attention to the Output window during the Build/Rebuild processing. I saw the following warning after I closed RegCap program:
Note: Unable to create registration information for file named 'Microsoft.InteropFormTools.tlb'
In case anyone is running into this issue with Visual Studio 2015, the path for regcap is now C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\VSI\bin.
I also encountered this error when I tried to add a class to my project that had previously been compiled as an external DLL that was added as a reference. I added the class to the project, but forgot to remove the reference to the DLL. Removing the reference to the external component resolved the problem and this error message no longer occurred.
If your project doesn't require to build in 64bit , you can build it in 32 bit instead.
This works in my case. I build my project VS 2008 and Windows 7-64 bit and have the same error message. I then try to build again in 32-bit and run Visual Studio in Compatibility mode and it works.
Run Visual Studio in Compatibility mode for Windows XP:
Right click Visual studio icon
Select Properties
In Compatibility tab, check on Run this program in compatibility mode for Windows
XP SP3 and check on Run this program as administrator
Go to Configuration manager and Debug your project in X86 mode

Categories

Resources