Reputation: 10255
I was trying to use MonoDevelop on Windows to develop a C# application that needs to use Excel.Interop.
However, MonoDevelop does not seem to have access to assemblies that only reside in the Windows GAC:
Is there any way to use MonoDevelop on Windows to develop with Windows-specific assemblies as well?
And yes, I am aware of SharpDevelop and C# Express, however both are missing VI-keybindings that are really important to me.
Edit: Screenshot of the expanded error:
Upvotes: 1
Views: 1766
Reputation: 16153
MonoDevelop (and Visual Studio) do not allow referencing assemblies from the GAC. At build time, assemblies are resolved from:
So, the problem depends whether you're targeting Mono or .NET - on Windows, MD can target either. In the simple case, it's probably .NET - if you don't have Mono installed, then it'll just target .NET, and the options won't show up. And Mono doesn't have WPF (Presentation*.dll) so you'd have to use .NET for this anyway. So I'll just talk about .NET.
This applies to Microsoft.Office.Interop.Excel.dll. It's possible that it's registered in an assembly folder already and MonoDevelop simply isn't finding it - MS adds new Assembly Folder registry keys occasionally, so maybe we didn't add them to MD yet - or maybe it only gets registered into an Assembly Folder if you install Visual Studio Tools for Office. You can register it pretty easily (see http://msdn.microsoft.com/en-us/library/wkze6zky(v=vs.110).aspx) or you could just reference it by path instead of by name. If you think it's registered but MD isn't picking it up, please file a bug.
PresentationCore.dll is trickier, since it's a framework assembly. MonoDevelop has an internal list of name of assemblies it knows to be in each framework, and knows where to look for then for .NET. We normally look for the 4.0 framework assemblies in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
- but I think they'll only be there if you've installed VS (including Express) or the .NET SDK. We do have a fallback do look in C:\Windows\Microsoft.NET\Framework\v4.0.30319
but it looks like that doesn't work for PresentationCore.dll, since MS seems to have put it in a WPF
subdirectory. I have fixed this in MD master, but it'll be a while until that gets into a release. For now, I would recommend installing the reference assemblies.
Upvotes: 2