I'm writing a converter from HTML to FlowDocument - an XSD that defined the elements and attributes of a FlowDocument would be invaluable, if anyone knows of one.
The Flow Document schema uses the namespace of Windows Presentation Foundation. You can find the XSD in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas (location can be slightly different depending on version of Visual Studio). It is called wpfe.xsd.
However, I cannot find FlowDocument or other elements defined there. In fact, I cannot find it in any of the XSD's defined there, so that is not really helping.
Microsoft redefined the target namespace in this document from http://schemas.microsoft.com/client/2007 to http://schemas.microsoft.com/winfx/2006/xaml/presentation, which is very unfortunate, because that means that the schema does not match even the target namespace. Some discussion on this can be found in this thread and in this Microsoft page on Silverlight (similar story).
Long story short, unless you can find it embedded in one of the .NET libraries, you may be out of luck and the closest you can get is XAML, which is defined in xaml2006.xsd in the same location.
Related
Of all the methods to get our Illustrator files into pretty XAML, I've found that using Expression Design 4 makes the nicest vectors for me.
However, this is not the case when using WinRT libraries, such as those in my Windows Phone 8.1 project.
Exporting as WPF Resource Dictionary uses libraries that can't be found. Of course, the Silverlight exports also don't work.
i.e. With the WPF Resource Dictionary I get:
The type 'GeometryDrawing' was not found.
The type 'DrawingGroup' was not found.
The type 'DrawingBrush' was not found.
Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
i.e. With the Silverlight I get:
The text associated with this error code could not be found.
Failed to assign to property 'Windows.UI.Xaml.UIElement.Clip' because the type 'Windows.UI.Xaml.Media.PathGeometry' cannot be assigned to the type 'Windows.UI.Xaml.Media.RectangleGeometry'.
Taking an Illustrator to SVG and then to XAML seems like a worse option.
Has anyone found a way around using their of these two as options?
Or another way using Expression Design?
Or another tool etc?
tia
How can one programmatically determine which type libraries (GUID and version) a given native, VB6-generated DLL/OCX depends on?
For background: The VB6 IDE chokes when opening a project where one of the referenced type libraries can't load one of its dependencies, but it's not so helpful as to say which dependency can't be met--or even which reference has the dependency that can't be met. This is a common occurrence out my company, so I'm trying to supplement the VB6 IDE's poor troubleshooting information.
Relevant details/attempts:
I do have the VB source code. That tells me the GUIDs and versions as of a particular revision in the repo, but when analyzing a DLL/OCX/TLB file I don't know which version of the repo (if any--could be from a branch or might never have been committed to a branch) a given DLL/OCX corresponds to.
I've tried using tlbinf32.dll, but it doesn't appear to be able to list imports.
I don't know much about PE, but I popped open one of the DLLs in a PE viewer and it only shows MSVBVM60.dll in the imports section. This appears to be a special quirk of VB6-produced type libraries: they link only to MSVBVM60 but have some sort of delay-loading mechanism for the rest of the dependencies.
Even most of the existing tools I've tried don't give the information--e.g., depends.exe only finds MSVBVM60.dll.
However: OLEView, a utility that used to ship with Visual Studio, somehow produces an IDL file, which includes the importlib directives. Given that VB doesn't use IDL files, it's clearly generating the information somehow. So it's possible--I just have no idea how.
Really, if OLEView didn't do it I'd have given it up by now as impossible. Any thoughts on how to accomplish this?
It turns out that I was conflating basic DLL functionality and COM. (Not all DLLs are COM DLLs.)
For basic DLLs, the Portable Executable format includes a section describing its imports. The Optional Header's directory 1 is about the DLL's imports. Its structure is given by IMAGE_IMPORT_DESCRIPTOR. This is a starting point for learning about that.
COM DLLs don't seem to have an equivalent as such, but you can discover which other COM components its public interface needs: for each exposed interface, list out the types of their properties and their method arguments, and then use the Registry to look up where those types come from. tlbinf32.dll provides some of the basic functionality for listing members, etc. Here's and intro to that.
I'm trying to have Sandcastle generate .xml files that can be used for intellisense with my solution, that contains a lot of different projects.
To do this, I enabled the IntelliSense component, and it seems to kind of work: it at least removes all private and internal members, which Visual Studio does not do by default, as I'm not generating documentation for anything but public members.
However, all the generated .xml files have lost the remarks section the .xml files have originally. Is there a way to preserve this information in Sandcastle with this component?
I ended up writing a tool to merge the additional info back into the xml file for IntelliSense.
How are those files constallated and where can I find more information about them?
It is recent version of Visual Studio I'm using.
The different system assemblies live in the Global Assembly Cache (GAC).
You do not normally need direct access to these files - see How to: Add or Remove References By Using the Add Reference Dialog Box on MSDN.
The assemblies that are in the GAC will appear on the .NET tab of the dialog.
To use a namespace directly in the class (so you do not need to fully qualify it), use the Imports statement.
Is there a list of all the predefined defines that Visual Studio declares for you when you compile a project?
Obviously DEBUG or RELEASE are quite obvious but is there other defines that get declared automatically, for example when creating a Console Application or a Window Application or if the resulting assembly will be a DLL or an exe file.
Is there a list that contains them all?
It's just a bunch of properties set up in .NET framework .target files. To figure what exactly you need - you could track down chain of called targets and see what exactly affect one or another output.
And if you dig deeper - you will see that there is pretty big list and it also condition'ed - some properties defined if other properties set to specific value etc.
What exactly you want to do with such list ? Do you want it just for studying or you have concrete task?