I’m trying to create dynamically generated code based on user input (just like a mini-compiler). But my problem is that i need to use the PresentationFramework.dll assembly inside the dynamic code, and i don’t know how to reference it.
I have already tried Assembly.Load() and Assembly.Loadfrom(). But all i get is an error saying:
“Assembly not found”
I am used to doing this with the IDE (right click references and then add), but now i need to find some way to do this through code.
I need the assembly to use System.Windows.Shell to create custom jumplists.
This isn’t just happening for this specific assembly, but for several others too. But this is the most important one, so if someone could help me with this i would be thankful.
So the baseline is: I need to use the namespace System.Windows.Shell. I need to reference this namespace fully through code (no IDE). How can this be done? And is it even possible?
I’m using Visual Studio 2010 Ultimate (C#).
Thanks in advance!
It depends on the version of PresentationFramework you want when you need to add it as a reference. Basically, you will find it in :
(for 64-bit compilation, or 32-bit on a 32-bit OS)
or
(for 32-bit compilation or 32-bit on a 64-bit OS)
These are only the root folders. From here, you can go for example in “v3.0” or “.NETFramework\v4.0” for example.
So you just need to add a reference to a full “[path]\PresentationFramework.dll” instead of just “PresentationFramework.dll”, for example: