The "GetAssemblyVersionInfo" task failed unexpectedly - OctoPack v3.0.41

Just need some guidance on how to work around this error I’m getting. Here’s the error:

C:\Builds\49\MyApp\OctopusDeploy_MyApp\Sources\Application\packages\OctoPack.3.0.41\tools\OctoPack.targets (44): The "GetAssemblyVersionInfo" task failed unexpectedly.
System.IO.FileNotFoundException: C:\Builds\49\MyApp\OctopusDeploy_MyApp\Binaries\ReleaseAsyncService\MySvc.Async.dll
   at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
   at OctoPack.Tasks.GetAssemblyVersionInfo.CreateTaskItemFromFileVersionInfo(String path) in y:\work\46cfb6001f03d701\source\OctoPack.Tasks\GetAssemblyVersionInfo.cs:line 48
   at OctoPack.Tasks.GetAssemblyVersionInfo.Execute() in y:\work\46cfb6001f03d701\source\OctoPack.Tasks\GetAssemblyVersionInfo.cs:line 40
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()

The file isn’t there, because of these post-build events:

	<Target Name="MoveAgentFiles">
		<Message Text="Moving agent files..." />
		<Move SourceFiles="@(SourceFiles)" DestinationFolder="$(SourceDir)\Agents" />
	</Target>

	<Target Name="MoveContentFiles">
		<Message Text="Moving content files..." />
		<Move SourceFiles="@(ContentFiles)" DestinationFolder="$(SourceDir)\Agents" />
		<RemoveDir Directories="$(SourceDir)\Content" />
	</Target>

	<Target Name="CopyAsyncFiles">
		<Message Text="Copying async files..."/>
		<Copy SourceFiles="@(AsyncFiles)" DestinationFolder="$(SourceDir)" />
	</Target>

Is there any way to work around this?

Hi,

Thanks for getting in touch, sadly there’s no workaround for this at the moment. Currently we call GetAssemblyVersionInfo all the time; going forward, we’ll make it that if you pass an explicit version number in, we won’t call it (so the workaround would be to pass /p:OctoPackPackageVersion=1.0.3 for example).

Here’s the bug that you can keep an eye on until it is fixed:

Paul

Thanks, Paul!