I am trying to run a C code in microsoft visual studio 2015.
For some reason, the run bottom is changed to "Attach to a process".
And when I attach any of the process, the process wouldn't start to run (command prompt would'nt open).
That's a picture of my visual studio and the attach to process window:
May be because the code you have compiled gives only a Dynamic Link Library (DLL) file. So you need to attach it to a process (.exe file) which will load the (DLL) for execution.
Also, why 0 projects?
I had the same problem on Windows 10. Adding dotnet path as a system varible solved my problem.
This may be helpful for others;
Right click on This PC and select properties.
Click the Advanced system settings.
Then click the Environment Variables.
In the System Variables section, find the PATH environment variable and select it. Click Edit.
Click New and paste your dotnet path (my path is C:\Program Files\dotnet)
Related
So, I just started using Android Studio. I am using windows 7 64bit on my main SSD. When I installed the IDE, I have the SDK and Android Studio saved on a secondary drive. Now I noticed that Android Studio added 3 other folders in the "Personal Folder" in my main SSD (.android, .AndriodStudio, .gradle).
Anyone know how to give these guys a different destination so I can save space on my main hard drive?
Copy those folders to wherever you want. But once you copy do the following steps.
1.) Open Windows explorer and right click on computer and select properties. In the control panel home that opened select advanced system settings in the left pane. Then select environment variables under advanced tab in the system properties window.
2.) Add a new user variable with name 'ANDROID_AVD_HOME' and value as path to /.android/avd/
3.) Similarly set GRADLE environment variables. This link might help - http://www.gradle.org/installation
4.) Start Android Studio - it will ask if you want to import config file. Give location to /.AndroidStudio/config
I hope this should work fine.
is it possible to run CBMC as stand alone witout Visual Express ? Do I need to recompile it or is
there another trick maybe ?
I only need to use CBMC to translate a function to CNF regularly, so I want to call it with
the function name, write the cnf file to disk and start again. I do not want to use Visual Studio.
It is entirely possible to run The CBMC model checker as a standalone program.
I do it weekly on both Linux and Windows 7 :)
I'm assuming you're on Windows because of Visual Studio.
Open a command prompt and navigate to the folder where cbmc.exe is, and call it like so: cbmc --help ...to see the options you have.
The user manual has a section on how to do it, in 3.2 Command line interface.
You may have to call the batch-script that sets up Visual Studio's environment for the CLI (VSVARS32.bat / vsvarsall.bat etc).
On some Windows machines, that script is placed in c:\program files\microsoft visual studio\[version]\vc\bin\ if I recall correctly.
See this MSDN page for more info on that: https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx
I'm using Visual Studio 2010 to build a program in C that can operate on a PostgreSQL database.
Everything is fine in VS, no compile errors, everything looks good.
When I click to debug and run, the code compiles, but then I get a pop up that says:
The program can't start because libpq.dll is missing from your computer
I've installed PostgreSQL and added the folder containing all the necessary files to my include and linker paths, but to no avail.
I cannot figure out why I am still getting this message?
Any suggestions?
The answer's surprisingly simple.
The issue you're seeing comes from the compiled application not being able to find the PostgreSQL libraries. The libpq.lib is used to compile the application, and it links to the DLL at run-time. You can either add it to your system wide path, or bundle the DLL with your application. (I'd add it on the development machine, and bundle the redistributable for a installer package.)
To include it in your path try:
Right click on "My Computer" and select Properties
Then Click on "Advanced System Settings".
Click the "Environment Variables" button at the bottom of the dialog box.
It will pop up a dialog with a group box labeled "System Variables". Find the one in the list box that has a Variable name of "Path".
Now, add the path of the PostgreSQL library folder to the path with a ";" separator.
Now logout or reboot. It's imperative that you at least log out of Windows and log back in for the Visual Studio debugger to pickup the additional executable module paths (that Path variable). Ideally, rebooting sends the new system path to all applications in the system at boot time.
If the Path variable has "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" in it, you would add ";C:\Program Files\PostgreSQL\libraries" to make it look like "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\PostgreSQL\libraries".
Be aware that your path will be really long in most cases. Just add it to the end.
Good luck!
I have Win10 64 bit and this worked for me.
Get portable version of HeidiSQL and copy libpg.dll from the archive to the HeidiSQL installation folder on your computer.
Works like a charm.
I created a shortcut from the application .EXE in Visual Studio Installer, but the resulting shortcut did not have the option of "Run as Administrator" when I right-clicked the shortcut icon.
The application .EXE in Program Files does allow this option on right-click. If I created the shortcut manually from the .EXE (i.e. "Create Shortcut") instead of from the deployment, then the resulting shortcut also has that option.
How to a deploy an application in Visual Studio Installer to include a shortcut that has "Run as Administrator" option enabled on right-click?
I spent ages looking for a solution to this. Amazing, really, as it must be the case for all Visual Studio installer projects.
I'm using Visual Studio 2017 Community at the time of writing and I can't see any option to do this from within the IDE.
Apparently this is an issue with the resulting .msi where the shortcut created is an "advertising shortcut". I'll leave you to discover what you want to know about that in your own time. (Personally, I don't care.)
What you need to do is force the shortcut to be "non-advertising".
This is the better of the two solutions I've found squirreled away in SO. I think it's better because it 1) doesn't include adjusting your installer project for each solution and 2) doesn't involved manually editing the .msi file after every build.
Full credit to the guys on this SO post for this solution, btw. You know who you are. I'm posting because it's not obvious from the question that it will solve this particular problem.
What you do is make a generic change to the msi creation schema file so that the change propagates to all of your future builds. You'll need Orca to make the initial change.
Download the Windows SDK Installer here.
Select "MSI Tools" in the installer.
Install Orca-x86_en-us found in {Installation Folder}\Windows Kits\10\WindowsSDK\Installers.
Find the file "Schema.msi" which is located somewhere like {Visual Studio Program Folder}\Common7\IDE\CommonExtensions\Microsoft\VSI\bin\VsdSchema.
Open "Schema.msi" in Orca.
Copy the folder to the Desktop if it is read only and replace the original after step 9.
Select the "Property" table on the left.
Add a table row with property DISABLEADVTSHORTCUTS and value "1" (true).
Save the file and close Orca.
Rebuild your installer project and (re-)deploy your application.
Enjoy the ability to "Run as administrator"!
A final note: I've found that updates to Visual Studio can overwrite the change you've made, once again removing the "Run as Administrator" context option. So check the msi file after each update.
If you have a manifest, you can require to have administrator privilege, add the following to your manifest
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
see http://msdn.microsoft.com/en-us/library/bb756929.aspx
You can also run any filetype as administrator with the help of the registry, see http://www.howtogeek.com/howto/windows-vista/add-run-as-administrator-to-any-file-type-in-windows-vista/
When I compile I often get the following error:
Error 28
Error : DEP0500 : The folder "C:\Code\Cloud\SolutionFolder\ProjectFolder\bin\Debug\AppX" could not be deleted.
Access to the path 'C:\Code\Cloud\SolutionFolder\ProjectFolder\bin\Debug\AppX\ControlsProject.Controls\Themes' is denied.
If I close down Visual Studio (2012 RC) I can delete the folder and recompile so I'm assuming VS is locking the file for some reason. Has anyone else experienced this? Has anyone found a fix?
Here is what you're probably looking for. Seems like you have two options - either re-create the solution file or use Process Explorer to close existing handles to the locked path.
Here's another option that worked for me - reset your VS settings.
http://socialeboladev.wordpress.com/2013/02/21/dep0500-and-dep1000-errors-when-deploying-windows-store-apps-from-vs/
I'm handling this problem using LockHunter.
Download LockHunter at http://lockhunter.com/download.htm.
Create a shortcut to the AppX folder on your desktop.
Whenever AppX is locked in Visual Studio open the shortcut to AppX.
Right-click AppX and select "What is locking this folder". This will open LockHunter.
In LockHunter click "Unlock it!".
After unlocking AppX go back to Visual Studio and compile/run the project.