i need to develop a Visual Studio Extension, but even if looked around i didn't find a sample on how reference VS tool window (in my case pending changes) to customize it and add some extra features.
Could someone maybe give a an hint or url where i can look for this ?
Thanks in advance
Since you pending changes is a Team Explorer Tool Window, If you want to add custom button to Team Explorer, please refer to:
https://social.msdn.microsoft.com/Forums/en-US/198f36bf-0606-4b99-b736-1a786cdf5183/how-to-add-a-custom-button-in-teamexplorer-queryresultgrid-toolbar-and-workitem-toolbar?forum=vsx
If you want to add other features, I would suggest that you can create a custom tool window, add the feathers as you want, Get the Pending Changes information via IPendingChangesExt , and here is a sample about HOWTO: Get the Pending Changes in the Team Explorer of Visual Studio from a package
Related
I'm sure I used to be able to see the name of the current class and method when editing vb.net files - I can't see anything similar in VS 2015 Update 3.
Does anyone know if there's a plugin that would show me this info? Being able to see the name of the current region would be brilliant, too.
Thanks.
You don't need a plug-in; this feature is built into Visual Studio and has been since at least VS 2005. (Actually, it originated in the classic Visual Basic editor and was ported over to Visual Studio when the IDEs were integrated.) I'm not sure how it got disabled on your machine, since it is enabled by default.
Go to Tools → Options → Text Editor → Basic (or any language you want), and ensure that the "Navigation bar" option at the bottom is checked.
This will give you a bar at the top of your text editor window that displays the class and method names. It doesn't, however, display the region.
You can see the current region in "Visual Assist" extension.
You should download it from Nuget.(Tools --> Extension And Updates and then search the Visual Assist).
After you'll install it, You'll see a new tab called: "VA Outline" it's located near the Solution Explorer tab.
I've been given a folder with many .cs files and a .sln to work on with the express interest of designing a GUI for the entire project. The only problem is, I don't know how.
I have both Visual Studio 2010 and SharpDevelop 4.4 at my disposal; though I'd like to learn both evenly if possible, because I like open-source IDEs, but value experience in Visual Studio as well.
I can't find any information on how to enable design mode in this situation because of how narrow my experience is with the tools; You see, I know to right-click on a .cs file in order to view its code or design in Visual Studio 2010... but that isn't available here. The only item I can see is "view code", which is not what I'm trying to do.
If I can't enable the form, I'm wondering if I can just... create a new one? Since one does not exist?
Thank you for your help.
EDIT: A screenshot of what I see (blurred for security)
Abstract answer
The designer only makes sense for some types of files. For example, Windows Forms designer exists for classes that inherit System.Windows.Forms.Control, and when the relevant attributes for that file are set in the project.
Practical answer
Make sure you have a project that allows Forms (like "Windows Forms Application" or "Windows Forms Control Library"), create one if needed.
In project tree, right-click on the project and use some "add new ..." in the context menu.
There, choose "Form" or "Control" depending on your intent. It should create and configure what's needed, and you'll be able to use the designer.
In Visual Studio you can switch between text and designer with a shortcut key (F7, Shift-F7) or context menu. In sharpdevelop use the "Source" and "Design" tabs.
In SharpDevelop if there is a designer available for the file then you can open the designer by:
Open the file into the text editor.
Click the Design tab at the bottom of the text editor.
I recently created a Windows application project using C#. I have completed all the codings. Now i have to deploy the project. So, i created the SETUP of the project using the visual studio's SETUP PROJECT from the Menu. It works fine, i dont have any kind of issues with it. But the genreral setup i get after deploying the poroject is MSi and it looks very simple.
But the thing i need to know is that, is there any way to create a custom setup? The thing i mean to say is that i want to add logo for my project inside the installer. And certain things like during the installation process, the wizzard should ask for user name and password and few more things like these. For eg: if you are insalling a software like visual studio or some other software the installation wizzard is very catchy and the look & feel is good. Similarly i want to get a setup for my project.
Im not sure how to achieve this.
I tried using the installer class of the visual studio project and im not sure if its the correct option for me so instead of wasting time i just thought to ask it here?
I thought that there may be few third party tools for achieveing this. I tried InnoSetup 5.2 but there i have to write programs manually which is similar to pascal.
Also i heard about the tool called as InstallShield, but it costs and im looking for a free alternative.
Is there any third party tool or software for creating SETUP of visual studio projects.? Or is there any method which i can follow to obtain my customized setup?
You can use a Microsoft Setup project or WIX (easily integrate with Visual Studio).
Both are free.
You can do almost all of your customization in setup project by adding custom actions.
WIX (window installer xml) is the better option. You can do a complete customization from wix but it take some time to understand as it is totally based on XML. Microsoft office 2007 and later setups are based on wix.
The difference between wix and Setup project is that you have more control over the GUI of setup in wix than setup project and wix allow much more customization then setup project.
Take a look at this step by step tutorial for wix.
go through topics here Deployment Tasks and Walkthroughs - setup projects are very flexible especially with custom actions. you definitely can setup your own images and tune UI.
If you use Visual Studio MSI
For the first question about adding Icon (based on SplashBitmap), see this MSDN page.
For the second question about authentification input, refer to this other MSDN page.
You can especially use Action personalized, you can follow these steps:
Select the Installer project custom actions in the Solution Explorer. On the View menu, point to Editor, and choose Custom Actions.
The Custom Actions Editor appears.
In the Custom Actions Editor, select the Install node. On the Action menu, choose Add Custom Action.
In the dialog box, select an item in the project, double-click Application Folder.
Select the Primary output from OpenWeb (Active).
Click OK to close the dialog box.
In the Properties window, select the InstallerClass property and set its value to false.
In the Build menu, choose Build Custom Action Installer.
I have a custom dialog in my Visual Studio Seup project and need to know how to make the field required, so the user cannot progress (click next), if they don't enter a value into the textbox.
It's very rare to someone use Visual Studio Setup Project in order to make it's custom Setup ... normally we would use WIX or any other tool for builind the setup if the "normal" Visual Studio does not fit our needs.
Scott Guthrie has a old post about creating custom actions... maybe it would be a good read for you.
This can be done by configuring some control events and creating a small message box custom action. You can find the generic approach here:
http://setupanddeployment.com/installation-user-interface/validate-user-input-installation/
Visual Studio setup projects do not support this directly, but you can edit your MSI with Orca. Another solution would be to use a setup authoring tool which allows you to modify control events.
I must have done something wrong. I have a C# project in Visual Studio 2008. All of a sudden I see a lock on my classes and when I hover the class names on the top tab I see the class name as : C:\Myprojects\Oder.cs[Read Only] !
Has something weird like that happened to you before?
In my case it was a ReSharper 9.0/9.1 related issue. After clearing the ReSharper cache, I was able to edit files in my solution again.
Clearing the ReSharper cache can be done here: ReSharper -> Options -> Environment -> General and click: Clear Caches and restart your visual studio.
(The image is contained within the first of the linked JetBrains articles).
JetBrains instructions:
Ultimate Guide to Speeding Up ReSharper (and Visual Studio) - Performance degradation after ReSharper upgrade
ReSharper Online Documentation
A couple of possibilities spring to mind:
Have you added the project to source control?
Have you marked the project folder (and all it's sub folders) as read only?
Of course, someone else may have done either of these things if they have had access to your machine.
One Possible stupid thing.
Your project is still running and you forgot that. Stop debugging (CTRL + F5)
How do I know. Guess..
Restarting my computer worked for me. My project became read only in between compiles - suddenly I couldn't save changes to files, Visual Studio started presenting me with 'save as' dialog boxes, and SVN couldn't commit or clean the project because "sqlite could not write to readonly database." Checking the file properties on the files in Windows Explorer showed that none of them were marked read-only. I was able to make a backup copy of the project, then I restarted and it was fine.
Restart your Visual Studio and add the project again. Worked for me.
Close, then reopen the file.
Still a pain, but at least it's less costly than completely closing visual studio.
You can try: file -> Source Control -> Go online
IDE-integrated source control?
Sounds like your source files are or have been under source control. Many source control systems will set files to read-only when they haven't been checked out for editing.
Total Commander makes it really easy to change file attributes recursively, but most likely Windows can also do this :)
Much in line with what Morten Mertner said, (if you by chance are using TFS Source Control like I am) I did a manual checkout of the file and it resolved the issue for me.
For me the problem is that the files are locked while the application is running.
In this state, Visual Studio 2013 displays the lock icon in the file tab and when you try to edit the file, a dialog box with this message appears:
Changes are not allowed for this module as it was not built for changes while debugging or the target .NET runtime version does not support it.
In Visual Studio 2015 as well, the lock icon appears in the file tab when the application is running. but the dialog box and message are not displayed.
Stopping the application causes the file to become unlocked.