Microsoft WebMatrix comes with an awesome Windows Explorer context menu option that allows you to open a folder as a website project. Are there any extensions or scripts I can use to add a similar option to do the same with Visual Studio?
I found a small project that does just what you're asking for:
The complete code can be downloaded here. Once you have the code
downloaded and compiled, to add the “Open as Website” option to the
Windows Explorer context menu you'll need to run the .reg file
included in the download. This adds a registry entry in
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\ that runs the
program, passing in the path folder of that was just right-clicked.
You will need to customize this .reg file before you run it, putting
in the path to the program. You'll also need to specify the path to
dump the project files. I chose the folder C:\Documents and
Settings\Scott\My Documents\Visual Studio
2005\Projects\TempWebsiteProjects, but any path should suffice.
Take a look here for the full instructions: http://scottonwriting.com/sowblog/archive/2005/12/05/163132.aspx
Related
I tried to create a MSI installer for a simple windows project with basic set up. When I ran the built msi file it is not installing anything in the target location neither creating a desktop icon. Though I can find an entry in control panel. I am using VS 2013, not able to understand why it is not creating anything.
Thanks for help.
You should say what you actually did. It won't install anything to the target system unless you put files (or project output) in the Application Folder in the setup project, and it won't create a desktop shortcut unless you right-click the executable in the Application Folder view, create shortcut, then drag and drop the shortcut to the Desktop folder, again this is in the setup project's File System view.
Start here, old but still they way they work:
https://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/
I developed a Qt5 application for Windows on Visual Studio. I installed Qt Visual Studio addin, and add resource files using Qt resource editor. It works when I execute my program by clicking Start Debugging button. However, when I try to start the program by clicking the .exe file, all the icons are missing. Where should I put the resource files?
The resource files are embedded in your executable. The reason for icons not showing up is something different, probably related to missing plugins (e.g. if you use .svg files you will need to deploy the respective qsvg plugins from {QTDIR}/plugins/iconengines or {QTDIR}/plugins/imageformats).
The reason why this is working when starting from Visual Studio is that it automatically adds your Qt directory to the path.
I ran into some troubles when creating an installer for my Visual Studio 2010 solution (which has multiple projects) so I thought I'd make a quick guide to how I got it working...
Here is how I did it:
Create a new Visual Studio Installer project which is located under
Installed Templates/Other Project Types/Setup and Deployment/Visual Studio Installer.
Make sure you add it to you current solution, you can do this by right clicking on the solution name in the solution explorer and clicking Add>New Project
From there select Setup Wizard, give it a name and click OK
A wizard will open, click Next
then select Create a setup for a Windows application
then click Next again. Select all of the groups you want to include, namely: Content Files, Source Files, Primary Output
Then click Finish
In the solution explorer you will see a bunch of buttons find the one that's tool tip says File System Editor and click it. You will see three folders in the file system editor, the only one we really care about is the Application Folder. That folder is where your projects build output should be.
To add files to it if they are not already there right click > Add > File...
Note: You cannot add entire folders (which sucks) and the folder structure in the Application Folder should be identical to that in your projects build.
You should create each folder and then add the files to it.
If you have multiple projects you should set the build directory to the same folder under the release build settings. To do this, open your solution, and for each project, right click/Properties go to the Compile tab, set it's configuration to Releaseand its Build output path to some folder (same for each project) (If you have an XNA project make sure its Content Build/Configuration is also set to Release).
Now select Release from the drop down menu on the tool bar (it most likely says Debug now)
Right click on your solution on the solution explorer and click Build Solution
Now all of your solutions built files will appear in the folder you chose in the compile tab. All of these files are what needs to be added to the Setup Projects Application Folder (in the same structure)
Customise the installer: click on the project name in the solution explorer and look through it's properties, change what you want (i.e Author, Manufacturer, Title - these make a difference to the installers output directory and text)
Build the installer project (same way as mentioned above) and you are done.
Feel free to comment with questions
I'm building an application which is written with Qt in Visual Studio 2008. Everything is OK and I can run the output, but the executable file depends on some other files to be loaded at run-time. These files need to be copied along with the .EXE file every time they are changed, as I need to run the released output outside the IDE.
Is it possible to copy some files/folder in the output directory right besides the .EXE file during project build-time?
Here is how it's done:
Go to your solution explorer and open project properties
Select "Build events" tab
Enter post build command. You can also use Macros (not sure for VS2008. VS2010 already supports them)
Here is good resource for build events from where you can continue further:
http://msdn.microsoft.com/en-us/library/42x5kfw4(v=vs.80).aspx
If using Visual Studio right mouse click the file you want copied to the output folder, select Properties. In the Advanced section, the second option is: Copy to Output Directory. By default this is "Do not copy". Select the other options as desired such as "Copy always" or 'Copy if newer". These properties will be saved to your .csproj file.
I have created a Windows setup file for my Windows project in Visual Studio 2010. This setup file is running properly and installed the software in the computer. But for running this software I need another exe file to run. I want to add this external exe file into my setup project so that when my software will install the other software will be installed too.
If you just want to add another file that will be deployed on the target machine when installing you can go to your project, File Setup tab, right click on the folder that you want to add the file to (eg. Application Folder), in the context menu click Add - File and browse to the file that you want to add. It can be any external file from your computer.
That file will get installed along with your application.
Edit - To get to the File Setup tab right click on your project in the solution explorer and select View - File System.
Edit 2 - In order to add a custom prerequisite to your setup project have a look at this question.
I presume you're using a "Setup Project" (vs. InstallShield, for example).
It sounds like you want a "custom action":
http://msdn.microsoft.com/en-us/library/bbd7cck3.aspx
http://www.simple-talk.com/dotnet/visual-studio/visual-studio-setup---projects-and-custom-actions/
<= Look for "calling an executable as a custom action"
In VS2010, I had 3 Projects outputting 2 DLLs & 1 EXE, and a 4th Project as Setup Project. To add the DLLs & EXE in setup.exe file, this is how I did it,
Right Click on your Setup Project,
Right Click->View->File System->Application Folder
In the Application Folder pane, Right Click->Add->Project Output
Select the required project from the drop down Project list and select "Primary Output".
That should be it.