Jump to content

Symlinks on Windows do not work?


allthatjazz

Recommended Posts

Hi,

 

Imagine the following scenario:

 

We have company-wide coding guidelines and we designed ReSharper settings to support the developers. We created an infrastructure repository containing these (and other) settings and we XLink the infrastructure repository in every project repository. We want to automatically synchronise all changes to these settings to the developers.

ReSharper automatically imports team-wide settings if a file named SolutionName.sln.DotSettings exists. So I tried to create a symlink (in each project) to the ReSharper settings. Symlinks were created with "mklink". During checkin everything looks fine. But when you checkout a fresh copy of the project repository, the symlink is gone. An empty file is created.

 

 

Specific repository setup:

/build       (XLink to infrastructure repository)

/build/my_super_dooper_settings.DotSettings

/MySolution.sln

/MySolution.sln.DotSettings       (--> symlink to build/my_super_dooper_settings.DotSettings)

 

 

Expected behaviour:

On checkout, Plastic creates a symlink

 

 

Observed behaviour:

On checkout, Plastic creates an empty file

 

 

My questions:

  • Are symlinks on Windows supported at all? (I suppose so?)
  • Is this a bug?
  • Is there another possibility (workaround) for my scenario?

 

 

Thanks for your help!

Regards, Alex

Link to comment
Share on other sites

Hello Alex,

 

 

My questions:

  • Are symlinks on Windows supported at all? (I suppose so?)
  • Is this a bug?
  • Is there another possibility (workaround) for my scenario?

 

* Well, symbolic links are supported but only the Unix ones, Windows Junctions (similar than symlinks) are not :( sorry.

* I would say not supported rather than a bug.

* Your company is having full support purchased so email us to support at codicesoftware dot com and we'll try to find a solution.

Link to comment
Share on other sites

* Well, symbolic links are supported but only the Unix ones, Windows Junctions (similar than symlinks) are not :( sorry.

 

Actually, windows has had real symlinks, in addition to Junctions, since Vista. I'm not sure how much they are actually used though.

 

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365680(v=vs.85).aspx

http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

 

mklink defaults to creating a Symbolic Link and will only create a Junction if /j is added to the command line.

 

https://technet.microsoft.com/en-us/library/cc753194.aspx

Link to comment
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...