I am attempting to use a VSPackage to create a Tool window for visual studio 2010. I have all of that created. For my project I am attempting to access TFS 2010. For example when working on a project some files might get checked out and I make changes on them that I don't necessarily want to check in later. Rather that going through tfs and selecting all of the files I don't want to check in(can be very time consuming) I would like to be able to filter files / add files to a "do not check in" type of list. So basically If a add a file / filter for files to not check in. I want some way of connecting to the event of when someone wants to check in, the plugin / tool window can automatically deselect all of the files in the filter/ file list that I have set up. I have a good idea of what I want to do. I just need a good place to start in order to communicate with tfs. So I know I would need to be able to access my collections and also be notified of when someone wants to check in files/ that way I can modify the check in status of the file that I do not want to check in. Hopefully I made sense with all of that. Any help would be MUCH appreciated!!
The class TeamFoundationServerExt (http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.teamfoundation.teamfoundationserverext.aspx) may provide what you're looking for.
It contains the current TFS context inside Visual Studio - eg. the team project to which you're connected in Team Explorer.
From there you can get the VersionControlServer object, which in turn exposes check-in related events. More details in http://blogs.msdn.com/b/buckh/archive/2012/01/25/how-to-get-the-tfs-objects-used-in-our-own-ui-integration.aspx.
The blog post mentioned above has a nice code sample.
One last thing: If the files you're trying to filter out can be defined via regular expressions, you can use the Forbidden Patterns check-in policy, part of the Team Foundation Server Power Tools.
Related
I am working on a project and have scoured the internet for answers on this topic but could not find a single answer, not even an open source solution.
Maybe you guys could help me out.
In visual studio you can open the database connection window by browsing View -> server explorer -> add connection. that is all well and known but what if I wanted to open that same form from code or a certain API. I cant seem to figure it out but there must be some sort of way to access this form pragmatically since its native to Visual Studio.
For all who are unsure what form I'm talking about, here's a snippet:
So my question to you is, how can I , through code, open this window? If there is nothing built into Visual Studio and C#, do you know of any open source software that accomplishes this or will I have to recreate it with a windows form application?
I think you would need to build the form yourself if you need any custom logic etc in which case you could use the ConnectionStringBuilder classes and pass the validated fields from your custom form to the relevant builder class to generate the connection string. Visit here for more information.
Microsoft also has library on nuget that you could use, although it's deprecated so use with caution. The nuget file, which you can download manually, also contains the source code so perhaps you could use this to jump start your own UI component. https://www.nuget.org/packages/DataConnectionDialog
In our college they have competition--students have to develop and show some code. It has a cash prize. I have done an entry as a website (C#) using asp.net. The problem is that my website is in the computer laboratory of the college, so anybody can open Visual Studio and copy my project or edit it.
I want to protect my project. Is there any way to put password for the project alone in Visual Studio? To make it attractive I have hosted the website in the IIS of the server, so by using the IP adresss I can run the project anywhere with intranet access.
When I put a lock like EasyFileLocker, I am unable to open and run the project using the IP address.
I want to run my project anywhere in the intranet, but also protect its code.
How can I do that?
Presuming your source code is somewhere safe (if not, then put it somewhere safe over which you have control), then the deployed end result need not expose the source code in its raw format; you can pre-compile ASP.NET websites entirely (such that even the markup can't be edited on the server - at least not very easily) - do this by selecting the pre-compilation options on the deploy screen, being sure to uncheck "allow this website to be updatable".
the exact method of specifying the right build options differs between VS versions, but the options are the same ultimately: Precompile, (Don't) Allow precompiled site to be updatable.
The result is the code of your website ending up in binaries, including the page markup (the files still exist, but simply as placeholders with their substance missing.) For someone to get at your code, they'd need to reflect your binaries.
I am usually using Setup and Deployment template provided by visual studio. Is it possible to enhance default forms provided in that. or is there anything else to create the customized and attractive installer.
Aim :
1. I like to ask the user for pre-requested information to initialize the application during the installation process.
2. I like to prevent app.config by toching from user.
3. I like verify the collect the connection information during installation as well as like to verify that by connecting with given data source.
please provide good direction if i am in wrong path. - thanks
Wix is what you need
Yes, you can do all these things with the built in setup project in Visual Studio.
You can add a new user interface dialog box with text boxes, check boxes etc.
Write a custom action the handles these values and store them in some configuration file.
The app.config shouldn't be touched by the user anyway. If you are using the built in configuration classes in .NET, the user settings will be stored in a separated file in the user's application data folders.
As in #1, you can use custom actions for this kind of functionality.
The built in setup project has very little/no means of customizing the look and feel. For that you will have to use either 3rd party components/installers or use WiX and design setup screens/dialogs by yourself.
I use Inno Setup (http://www.innosetup.com/isinfo.php), its free and very configurable, it can also run your own applications as helpers to do very specific tasks.
Why not try other install systems like InstallShield or, if you really want to customize go for NSIS (Nullsoft Scriptable Install System)? NSIS Download
I have written the code and finished the project. It is a window app in c#. I also have a database in sql server 2005 which I used it in the application. I need to create a setup for it so that any user can install it in his machine. build->publish and then following the wizard is the right way perhaps.. but what about the database?
The same database I made won't be in all computers, so I need that database also bind with my application.
Here is a link to some intro level tutorials, this should get you started. I would focus on creating some sample "Hello World" type applications before you dive into database programming. If you don't start small with this stuff, it can get frustrating.
http://msdn.microsoft.com/en-us/library/aa288436%28VS.71%29.aspx
it sounds like you are looking for basic information on setting up a project, to truly document this is going to take a lot more than a post.
The basic project setup, is done via Visual Studio and the "File" -> "New" -> "New Project" option. You can then select the type of project you need and that will then setup the project for you.
For the database conection, you will want to look into the items in the System.Data.SqlClient namespace.
I'm an IT Professional with a background with developing ASP/VBscript/SQL web applications. I want to take some training and get up to speed with Visual Studio 2008 and C# so that I can take over a project at work and make updates/bug fixes in house rather than calling in a third party.
The web application I'll be working on was developed in Visual Studio 2005 with a mix of C# code and some Ajax.
When I load the source code into Visual Studio 2008 I received a warning that the Source Control Plugin wasn't installed. It's looking for SourceSafe which I don't have. Is this necessary to use?
I'm starting a training course in February called Introduction to Visual Studio C# 2008. Well this be adequate to get me going in the right direction to be able to update, fix, and make minor changes to our web application? This is a big opportunity for me and I don't want to blow it.
Thanks!
SourceSafe is a Software Configuration Management tool from Microsoft, and is not required. I WOULD recommend using some form of SCM, but flavor is a matter of preference.
If the pop-ups are annoying to you and you would like to disable them, then removing the SourceSafe bindings from the project should stop them.
From http://weblogs.asp.net/bkcarroll/archive/2004/03/08/86059.aspx :
Solution:
1 - Go to the folder containing the solution files and delete the following:
mssccprj.scc
MyProject.vssscc
vssver.scc
2 - Open MyProject.sln in your favorite text editor and remove the following section:
GlobalSection(SourceCodeControl) = preSolution
...
EndGlobalSection
3 - Go to the folder containing the project files and delete the following:
MyProject.vbproj.vspscc
mssccprj.scc
vssver.scc
4 - Open MyProject.vbproj in your text editor and remove the following lines:
SccProjectName = "SAK"
SccLocalPath = "SAK"
SccAuxPath = "SAK"
SccProvider = "SAK"
Now you can open the solution/project with no source control errors.
As far as the class goes, if you're already familiar with ASP/VBScript, you can probably pick up a C# class and figure out the rest. If not, I would suggest going for an ASP focused class that utilizes a C# back-end.
I would expect that a course named "Introduction to Visual Studio C# 2008" would probably not cover Ajax technologies, so you might want to look for some additional resources on that topic. (It might not even cover ASP.NET in significant depth, so I'd advise checking the syllabus, and if the ASP.NET coverage is weak then prepare for some additional learning on that topic as well.)
Re the Source Safe plug-in: you will need this if you want to work on the code base (so you can check in and out of the existing VSS repository). You will not need it just to browse the code.
Well James that is up to you. I am not familer with the course but if you apply yourself and pay attention I'm sure you can achive your goal. Do not be afraid to move beyond just course work to learn new things. There is a lot of information about Visual Studio on the internet.
SourceSafe is not required to use Visual Studio.
Learning the basics of VS will definitely allow you to update and fix your web apps. VS allows you to work with all the technologies you mentioned all in one environment. Although ASP/VBScript are "legacy" at this point, there is still support for them in the VS environment.
James I'd suggest that you look at the free resources (video and textual) available to you on ASP.NET. I would presume that once you've read a few tutorials and watched some videos + taken your training course you should be able to maintain the code base. Add in the fact that sites like StackOverflow have a large .NET community and there are always people willing to help.
Good luck