Cannot find dependency Microsoft.Workflow.Compiler
mcobrien
Posts: 5
Hi there,
I'm obfuscating a Windows Workflow app and I'm getting an error saying the Microsoft.Workflow.Compiler assembly (which is a dependency of System.Workflow.ComponentModel, which is directly linked by my target app) can't be found.
It is in the GAC though, with the right version and public key. One thing I noticed is that it has a .exe extension rather than .dll. (The full path is C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Workflow.Compiler\v4.0_4.0.0.0__31bf3856ad364e35\Microsoft.Workflow.Compiler.exe.) Could this be confusing SA somehow?
thanks
Michael
I'm obfuscating a Windows Workflow app and I'm getting an error saying the Microsoft.Workflow.Compiler assembly (which is a dependency of System.Workflow.ComponentModel, which is directly linked by my target app) can't be found.
It is in the GAC though, with the right version and public key. One thing I noticed is that it has a .exe extension rather than .dll. (The full path is C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Workflow.Compiler\v4.0_4.0.0.0__31bf3856ad364e35\Microsoft.Workflow.Compiler.exe.) Could this be confusing SA somehow?
thanks
Michael
Comments
I don't believe that SmartAssembly can pick up this dependency because Workflow.ComponentModel doesn't specifically reference the compiler executable. As far as I can tell you would be required to make sure that the end-user has .NET Framework 3.5 installed on the computer rather than rely on SA to package these Framework Class Library dependencies up for you.
According to Reflector, System.Workflow.ComponentModel does have a direct reference to the Compiler assembly. This is with .NET 4.0 btw, sorry if I didn't make that clear.
In any case I don't want to package the workflow assemblies -- I'm only obfuscating and merging my own assemblies and leaving workflow as a regular reference.
I've manually added the Assembly element with NotAvailable=1 in the SmartAssembly project file but thought this sounded like a bug.
thanks
M
I'll see if I can reproduce this and get back to you.
I have logged a bug for this ( SA-591 ). Thanks for pointing this out. The problem is during the part of the processing where the assembly dependencies are gathered. The Workflow Compiler is not in the GAC and not in the local folder, it is in the .NET Framework installation folder. This seems to be the root cause of the problem.