File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/SourceBrowser/src/BinLogToSln Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ static void Main(string[] args)
152
152
string repoRelativePath = Path . GetRelativePath ( repoRoot , filePath ) ;
153
153
string projectRelativePath ;
154
154
string outputFile ;
155
+ string link = null ;
155
156
if ( repoRelativePath . StartsWith ( "..\\ " ) || repoRelativePath . StartsWith ( "../" ) || Path . IsPathRooted ( repoRelativePath ) )
156
157
{
157
158
string externalPath = Path . Join ( "_external" , idx ++ . ToString ( ) , Path . GetFileName ( filePath ) ) ;
@@ -162,9 +163,13 @@ static void Main(string[] args)
162
163
else
163
164
{
164
165
projectRelativePath = Path . GetRelativePath ( invocation . ProjectDirectory , filePath ) ;
166
+ if ( projectRelativePath . StartsWith ( ".." ) )
167
+ {
168
+ link = repoRelativePath ;
169
+ }
165
170
outputFile = Path . Join ( output , "src" , repoRelativePath ) ;
166
171
}
167
- project . WriteLine ( $ " <Compile Include=\" { projectRelativePath } \" />") ;
172
+ project . WriteLine ( $ " <Compile Include=\" { projectRelativePath } \" { ( link != null ? $ " Link= \" { link } \" " : "" ) } />") ;
168
173
Directory . CreateDirectory ( Path . GetDirectoryName ( outputFile ) ) ;
169
174
if ( ! File . Exists ( outputFile ) )
170
175
{
You can’t perform that action at this time.
0 commit comments