Cannot find dependency Microsoft.Workflow.Compiler

mcobrienmcobrien Posts: 5
edited November 1, 2010 10:38AM in SmartAssembly 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

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Michael,

    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.
  • Hi, thanks for getting back to me.

    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
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I think I may have misunderstood a bit as well. I think you were trying to say the project would not build and I was thinking it didn't run after the build. Also didn't bother to check .NET 4 because it didn't seem to me that MS would make any fundamental changes to something as new as Workflow.

    I'll see if I can reproduce this and get back to you.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Michael,

    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.
Sign In or Register to comment.