@@ -128,27 +128,22 @@ public void InnerExecute()
128
128
129
129
void CreateTempAssemblyInfo ( CachedVersion semanticVersion , Config configuration )
130
130
{
131
- var assemblyInfoBuilder = new AssemblyInfoBuilder
132
- {
133
- CachedVersion = semanticVersion
134
- } ;
135
- var assemblyInfo = assemblyInfoBuilder . GetAssemblyInfoText ( configuration ) ;
136
131
137
- string tempFileName ;
138
- string tempDir ;
139
132
if ( IntermediateOutputPath == null )
140
133
{
141
- tempDir = TempFileTracker . TempPath ;
142
- tempFileName = string . Format ( "AssemblyInfo_{0}_{1}.g.cs" , Path . GetFileNameWithoutExtension ( ProjectFile ) , Path . GetRandomFileName ( ) ) ;
134
+ var tempFileName = string . Format ( "AssemblyInfo_{0}_{1}.g.cs" , Path . GetFileNameWithoutExtension ( ProjectFile ) , Path . GetRandomFileName ( ) ) ;
135
+ AssemblyInfoTempFilePath = Path . Combine ( TempFileTracker . TempPath , tempFileName ) ;
143
136
}
144
137
else
145
138
{
146
- tempDir = Path . Combine ( IntermediateOutputPath , "obj" , assemblyInfo ) ;
147
- Directory . CreateDirectory ( tempDir ) ;
148
- tempFileName = string . Format ( "GitVersionTaskAssemblyInfo.g.cs" ) ;
139
+ AssemblyInfoTempFilePath = Path . Combine ( IntermediateOutputPath , "GitVersionTaskAssemblyInfo.g.cs" ) ;
149
140
}
150
141
151
- AssemblyInfoTempFilePath = Path . Combine ( tempDir , tempFileName ) ;
142
+ var assemblyInfoBuilder = new AssemblyInfoBuilder
143
+ {
144
+ CachedVersion = semanticVersion
145
+ } ;
146
+ var assemblyInfo = assemblyInfoBuilder . GetAssemblyInfoText ( configuration ) ;
152
147
File . WriteAllText ( AssemblyInfoTempFilePath , assemblyInfo ) ;
153
148
}
154
149
}
0 commit comments