BerndK / SvgToXaml

Smart Tool to view svg-files and convert them to xaml for use in .NET
Other
886 stars 164 forks source link

PixelsPerDip not found #24

Closed sommmen closed 3 years ago

sommmen commented 3 years ago

Hello, to run the project i had to uncoment the following line, not sure what the implications are though:

        private static void FilterPixelsPerDip(XElement drawingElement)
        {
            var glyphRuns = drawingElement.Descendants(NsDef + nameof(GlyphRun)).ToList();
            foreach (var glyphRun in glyphRuns)
            {
                XAttribute pixelsPerDipAttr = null; // glyphRun.Attribute(nameof(GlyphRun.PixelsPerDip));
                if (pixelsPerDipAttr != null)
                    pixelsPerDipAttr.Remove();
            }
        }

1>D:\Projects\Hmi.Ushape\Tools\Tdc.FlagScraper\SvgToXaml\SvgConverter\ConverterLogic.cs(520,82,520,94): error CS0117: 'GlyphRun' does not contain a definition for 'PixelsPerDip'

I am running on netFx4.6.1 rather than netFx4.6.2. The project seems to build and run fine after my uncomment however.

BerndK commented 3 years ago

Can't you use .Net 4.6.2 or newer like 4.7.x?

sommmen commented 3 years ago

@BerndK hm.. I moved to use the prebuilt binaries instead. Maybe put a big fat 'don't use 4.6.1 to build' in the readme, so me and people like #22 dont get confused. Anyways, thanks for your attention.