Asked  7 Months ago    Answers:  5   Viewed   22 times

As a long-time Visual SourceSafe user (and hater) I was discussing switching to SVN with a colleague; he suggested using Git instead. Since, apparently, it can be used as peer-to-peer without a central server (we are a 3-developer team).

I have not been able to find anything about tools that integrate Git with Visual Studio, though - does such a thing exist?

What are the technologies available for using Git with Visual Studio? And what do I need to know about how they differ before I begin?



In Jan 2013, Microsoft announced that they are adding full Git support into all their ALM products. They have published a plugin for Visual Studio 2012 that adds Git source control integration.

Alternatively, there is a project called Git Extensions that includes add-ins for Visual Studio 2005, 2008, 2010 and 2012, as well as Windows Explorer integration. It's regularly updated and having used it on a couple of projects, I've found it very useful.

Another option is Git Source Control Provider.

Tuesday, June 1, 2021
answered 7 Months ago

Visual Studio 2013 Update 2 finally added a built-in way to do this with ProjectTemplateLink

The CopyParameters attribute will enable child access to all the variables of the parent template, with the prefix of ext_.

You don't even need CustomParameters for this. Change your ProjectTemplateLink to this:

<ProjectTemplateLink ProjectName="$safeprojectname$.Interface" CopyParameters="true">

And then you can achieve your goal in the child .csproj like so:

  <ProjectReference Include="..$ext_safeprojectname$.Business$ext_safeprojectname$.Business.csproj">
Wednesday, June 23, 2021
answered 6 Months ago

You shouldn't be committing mdf files to git - they are data files for your database. git is likely complaining because the file is in use and it needs read access to be able to send the data to the repository. The simplest solution is to remove it from git with git rm. For example, at the command line:

git rm MyProject/App_Data/aspnet- MyProject-20171110110346.mdf
Friday, August 6, 2021
answered 4 Months ago

There is a bug in Visual Studio 2013 through Update 3 that will prevent you from merging in certain circumstances when you have core.autocrlf set to true yet the files in your repository are incorrectly normalized. We are comparing the contents of your working folder (which has Windows-style 'rn line endings) to the contents of your repository, which you have claimed (by setting core.autocrlf=true) have Unix style n line endings.

If, in fact, your repository contains files with rn line endings, then we will incorrect report these files as modified in your working directory and prevent the merge. (We should, of course, be looking at the timestamp in the index and not bothering to test these files at all.)

While this is a bug in Visual Studio (and will be fixed in the next Update), it is obscuring the fact that your repository is not configured correctly. You should configure a .gitattributes file and correct the line endings in your repository to avoid these sorts of problems.

In the meantime, you can use Git for Windows on the command-line to solve this problem, please be sure to configure alternate credentials in Visual Studio Team Services.

Friday, August 27, 2021
answered 4 Months ago

Thanks to Alexey I found the solution to my problem, this is what I'm using now in my .csproj file to support copying third party assemblies for Filesystem- and Webdeploy:

    <AvailableItemName Include="ThirdPartyAssemblies">
<Target Name="AfterBuild">
    <Message Text="Build | Copying third party assemblies to output folder ($(OutputPath))" Importance="high" />
    <Copy DestinationFolder="$(OutputPath)" SourceFiles="@(ThirdPartyAssemblies)" SkipUnchangedFiles="true" />
<Target Name="CopyBinFiles" AfterTargets="CopyAllFilesToSingleFolderForPackage" BeforeTargets="MSDeployPublish">
    <Message Text="Deploy | Copying third party assemblies to output folder ($(_PackageTempDir)bin)" Importance="high" />
    <Copy DestinationFolder="$(_PackageTempDir)bin" SourceFiles="@(ThirdPartyAssemblies)" SkipUnchangedFiles="true" />

From: MSBuild targets and Visual Studio 2012 issues

Monday, November 15, 2021
answered 3 Weeks ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :