@@ -27,10 +27,7 @@ public class UpdateAssemblyInfo : Task
27
27
public string ProjectFile { get ; set ; }
28
28
29
29
[ Required ]
30
- public string ProjectDir { get ; set ; }
31
-
32
- [ Required ]
33
- public string Configuration { get ; set ; }
30
+ public string IntermediateOutputPath { get ; set ; }
34
31
35
32
[ Required ]
36
33
public ITaskItem [ ] CompileFiles { get ; set ; }
@@ -138,14 +135,14 @@ void CreateTempAssemblyInfo(CachedVersion semanticVersion, Config configuration)
138
135
var assemblyInfo = assemblyInfoBuilder . GetAssemblyInfoText ( configuration ) ;
139
136
140
137
string tempFileName , tempDir ;
141
- if ( string . IsNullOrEmpty ( ProjectDir ) || string . IsNullOrWhiteSpace ( ProjectDir ) )
138
+ if ( IntermediateOutputPath == null )
142
139
{
143
140
tempDir = TempFileTracker . TempPath ;
144
141
tempFileName = string . Format ( "AssemblyInfo_{0}_{1}.g.cs" , Path . GetFileNameWithoutExtension ( ProjectFile ) , Path . GetRandomFileName ( ) ) ;
145
142
}
146
143
else
147
144
{
148
- tempDir = Path . Combine ( ProjectDir , "obj" , Configuration ) ;
145
+ tempDir = Path . Combine ( IntermediateOutputPath , "obj" , assemblyInfo ) ;
149
146
Directory . CreateDirectory ( tempDir ) ;
150
147
tempFileName = string . Format ( "GitVersionTaskAssemblyInfo.g.cs" ) ;
151
148
}
@@ -154,4 +151,4 @@ void CreateTempAssemblyInfo(CachedVersion semanticVersion, Config configuration)
154
151
File . WriteAllText ( AssemblyInfoTempFilePath , assemblyInfo ) ;
155
152
}
156
153
}
157
- }
154
+ }
0 commit comments