Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

MSB4018: The "CompileWorkflowTask" task failed unexpectedly.

$
0
0
Hi There,

 I'm trying to compile a Solution with a few projects in it via MSBuild on a windows 2008 machine (32bit). THis exact same process used to work on a 2003 enterprise machine without a hitch. On 2008 it fails on a couple of places. One of them is When it tries to compile a Sequential WOrkflow task from a project.

"T:\Adm\msbuild\AppSoftware.target" (AppSoftware_All target) (1) ->
"T:\AppSoftware\App.DotNet.BuildSolution\Developer.sln" (default target) (8) ->
"T:\AppSoftware\Server\Components\BatchServicesScheduler\App.Server.Components.csproj" (default target) (71) ->
(WorkflowCompilation target) ->
  C:\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets(127,5): error MSB4018: The "CompileWorkflowTask" task failed unexpectedly.
C:\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets(127,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
C:\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets(127,5): error MSB4018:    at System.Environment.GetEnvironmentVariable(String variable, EnvironmentVariableTarget target)
C:\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets(127,5): error MSB4018:    at System.Workflow.ComponentModel.Compiler.CompileWorkflowTask.Execute()
C:\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets(127,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)


This runs as a scheduled task that triggers a batch file that SUBSTitutes a folder to a drive (T:) and calls MSBUILD with a project (AppSoftware.target). This AppSoftware calls (among many other lines) the following: 

<

 

MSBuildProjects ="$(AppSoftwarePath)\App.DotNet.BuildSolution\Developer.sln"Properties ="Configuration=$(TRG)"StopOnFirstFailure ="true"ContinueOnError ="false"/>

 This Solution file has about 70 projects, all c# (WebProjects, Silverlight projects, etc).

 WHen this runs on its own (from the scheduled task), that error comes up, if I run this as a logged in user (command line OR IDE) the compilation goes through.
 I'm not sure what needs to be setup on the Scheduler for this not to happen. THis is how my Scheduler is setup (Which i think is right):

 Author: Administrator
 When RUnning task, use acct: Administrator
 Run whether is logged or not (Not store password is UNCHECKED)
 Run with Highest priviledges CHECKED
 HIdden UNCHECKED
 Configure for Windwos 2008
 Action->Start Program->batchfile.bat


Did anyone have such problem or knows how can I solve this one?
THanks,
Marcelo

Viewing all articles
Browse latest Browse all 2763

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>