Compare files in Visual Studio easier - c#

Does anyone know of an extension/add-in to visual studio 2015 that lets me mark two (different) files in solution explorer, right-click, and display the same Compare window used with source control?
I can use compare on one file and get the dialog window where I can replace the TFS path with a path to the second file, but this is a time-consuming operation as I tend to compare quite often (I have an external tool that updates two or more data files in my project).

I can recommend you CodeCompare.
The free version has a ton of features and has an amazing visual studio and eclipse integration. The option for comparing is mind bogeling. Trully amazing tool that actually also looks very nice.
It is a standalone tool, but also integrates seamless into VS

Related

Wrap C# application in .msi installer

I have created a C# application in Visual Studio 2017. Now I would like to distribute my application as a single windows installer file.
I was hoping for a simple one-click solution (select all the files I want to include -> voila! there's the installer). But it seems to be not that easy :-(
I often read that Visual Studio supports setup projects. But that does not seem to be the case anymore, right?
Third party tools are either very complicated (e.g. Wix, Inno Setup) or very expensive (e.g. Advanced Installer).
Is there really no simple way to wrap some files in an .msi Windows installer?
Does Microsoft provide no tooling to create such installers?
At one point, Microsoft did remove the "Visual Studio Installer Project" support from Visual Studio1. And then they later relented and added support back. I can't remember which versions didn't have support, I think it was 2012 and 2013.
These days (for VS2017), to get the Visual Studio Installer Project support, you add it from the marketplace:
This extension provides the same functionality that currently exists in Visual Studio 2015 for Visual Studio Installer projects. To use this extension, you can either open the Extensions and Updates dialog, select the online node, and search for "Visual Studio Installer Projects Extension," or you can download directly from this page.
Personally, however, I'd go with WIX. It does have a learning curve but I think it's learning worth doing.
1For what I personally see as very good reasons. You had to have a full-blown install of Visual Studio to make them work, they didn't really integrate with MSBuild, which makes them a pain if/when you want to move to automating your builds.
VS Installer Projects: Several good answers already - worth trying out. As stated by others you can use Microsoft Visual Studio 2017 Installer Projects - as limited as they are (bullet list form). They feature some pre-requisite functionality as I recall. I have limited experience with the tool. Could work for something very simple, but you will quickly discover limitations.
WiX: Personally I would use WiX since it is also free and flexible - it takes some effort, but is very capable. Here is a WiX quick start tip answer (frankly not my favorite answer, but it has been upvoted more than usual and updated frequently - hopefully it still has its essence of helpfulness).
IsWiX: There is also IsWix - a GUI tool to help create WiX setups (Chris Painter's work). His WiX tutorials and a quick youtube demo.
Et Al: The commercial tools (Installshield, Advanced Installer (see Bogdan's answer in this "thread"), PACE Suite, etc...) are also good - your time costs too. Can be shocking once you add it up - and you will definitely get running quicker with a commercial tool. How to create windows installer (links to pretty comprehensive lists of tools and some MSI information). Further links below.
Other than that, I'll just link to a few pre-existing answers with info about various tools:
Quick review of different MSI tools
What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc
or very expensive (e.g. Advanced Installer).
There is a also a free edition which includes a Visual Studio extension for Advanced Installer, which you can use to build MSI packages.
The following tutorial shows how you can use the features from the free edition ("Simple" project type):
https://www.advancedinstaller.com/user-guide/tutorial-ai-ext-vs.html
https://www.advancedinstaller.com/user-guide/tutorial-simple.html
P.S. I work on the team building Advanced Installer.

Visual Studio - Can I view the code of an older version of a project?

I made the mistake of changing a subroutine in a project and publishing it. Now I want to revert back to the older subroutine. Is it possible to find the older project and retrieve the older subroutine?
Team Foundation Server can do this for you. You can now be set up without any hassle on your developement machine. The integration in the VS Team Explorer is seamless. Very easy to handle. See this guide for working with source control projects
https://msdn.microsoft.com/en-us/library/ms181384.aspx
Even easier and not so much overhead on your machine: sign up for Visual Studio Online (free for a 5 user team). The cloud source control is set up in minutes. If you are not against saving your data in the cloud give it a try.
https://www.visualstudio.com/en-us/products/what-is-visual-studio-online-vs.aspx
The alternatives (SVN, GIT) are also very good (consider reading about the difference of central and decentral source control) but need a little more knowledge and a good workflow.
If you happen to have lost changes before installing version control there's nothing you can do in visual studio. You can try a restore on file level (the option would be previous versions in the windows explorer)
as source code is plain text. There`s a "previous version" mechanism of windows explorer! Just go to the properties of your project folder
Note: previous version / shadow copying must have been enabled before or else the tab will be blank.
No, it is not possible unless you have stored your code in source control. It sounds like you have not yet done this, so I suggest using this is a (harsh) lesson and make the next move the one to install some kind of SCM.
You can signup for a free version of TFS online from microsoft the will integrate directly into Visual Studio. That will allow you to instantly check in changes and view the history of files and in this case, get a previous version of a file.
https://www.visualstudio.com/en-us/products/what-is-visual-studio-online-vs.aspx

install manually my word add-in VSTO (Ribbon)? built with c#

Is it possible to manually install my word add-in?
Visual Studio is preparing an installation file for word add-in and it worked great but i want to build more complex installation file. if i knew how to do it manually it would be very easy to build my own installer.
Sure its possible.
If you use Visual Studio 2013, you have two common options to deploy your addin.
One is to use publishing, also known as, Click-Once, this basically does all the dirty work for you, and leaves you with an executable that helps you deploy it on your target machines by simply double clicking it.
The other method is to use the InstallShield.
Go to File > Add > New Project > Other Project Types > Setup and Deployment > Installshield ...
You most likely do not have install shield installed, so once you try to choose that project a webpage will pop up, asking you to register (quickly and freely) to download and install Install-Shield limited edition - do it, its quite fast.
When its done, you may add a setup project to your solution.
now this part is very user-friendly, and allows you to build a custom install to your liking.
Notice that the free "limited edition" as they call it, gives you quite a lot of features, so it should be enough for light weight word addin.
Now, placing the focus on the Word Addin, the whole idea of the install is to place about 4 registry values into the deployed machine to point to the dll you compiled, and describe it.
You can find all the information you need by following microsoft's step-by-step guide on deploying an addin. its very fun and simple. really!
https://msdn.microsoft.com/en-us/library/ff937654.aspx
Good Luck !

visual studio: what is sourcesafe?

what is sourcesafe?
i am trying to download it to see if it will work well with c# because someone told me to download it for a job, but i don't even understand what it is?
is it built into the visual studio ide or what?
SourceSafe is a poor and obsolete source control system.
It can store an application's source code and show revision history, and allow multiple developers to work on the same project efficiently.
It has been replaced by Team Foundation Server.
Sourcesafe is a version control system from Microsoft, some would say not a very good one. It's not part of Visual studio however it does integrate into it. MS have now replaced VSS in their Team System version of Visual Studio.
Source control is a great idea, and experience with them will definitely help your Job hunting, but don't constrain yourself to Sourcesafe, also checkout (pun intended) systems like Subversion etc.

Can I work with Visual Studio Project and Solution files in a team using Subversion?

We're a team of students doing a software project. As some of us don't use Windows, but the product needs to run on Windows and .NET, we want to develop on MonoDevelop and Visual Studio which both use Visual Studio files; language of choice is C#.
My question is: Can we check in the solution and project files into our repository without the possibility of severe conflicting problems? Example: Two guys add a new file to the same project, save and commit their changes. Will the project file get a conflict?
SVN works great with Visual Studio and the related Project/Solutions files. The Project files are just XML and the Solution files are a structured text file. If changes are made to the same project/solution file from two different people the second person will get a conflict notice. Warning, it can be tricky to merge project and solution files. Sometimes it's easier to just toss the changes and add the files back manually then check in again.
You could try Agent SVN plugin. It integrates with VS 2005, VS 2008 and VS 2010 and it also has a import wizard feature that makes it easy to import the solution and all project files into the SVN repository.
I use this free Visual Studio plugin http://ankhsvn.open.collab.net/ for working with SVN repo ...
VisualSVN integrates well into VS.

Categories

Resources