ElinamLLC / SharpVectors

SharpVectors - SVG# Reloaded: SVG DOM and Rendering in C# for the .Net.
https://elinamllc.github.io/SharpVectors/
BSD 3-Clause "New" or "Revised" License
715 stars 136 forks source link

Cannot use SharpVectors with Fody.Costura #199

Closed MihailsKuzmins closed 3 years ago

MihailsKuzmins commented 3 years ago

In one of my projects I use Fody.Costura to generate a single file and SharpVectors to render svg images, but it looks like SharpVectors library is not compatible with Fody.Costura because in many places assembly.Location is used. Fody.Costura does not tolerate it (https://github.com/Fody/Costura/issues/251#issuecomment-524191388)

I have looked at usages of assembly.Location and it looks like only the executing or entry assembly is used. Therefore, there is a workaround. It is possible to use AppDomain.Current.BaseDirectory. AppDomain is compatible with Fody.Costura and produces the same output as assembly.Location.

So, could it be possible to use AppDomain.Current.BaseDirectory instead? If you find it difficult, I could try to prepare a PR ๐Ÿ˜ƒ.

ใใ‚Œใงใฏใ€็ด ๆ•ตใชใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ€ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™ใ€‚ใ‚ˆใไฝฟใฃใฆใ€ๅฅฝใใงใ™ใ‚ˆใ€‚ใŠๆ‰‹ไผใ„ใŒๅฟ…่ฆใ ใฃใŸใ‚‰ใ€ๆ•™ใˆใฆใใ ใ•ใ„ใพใ›ใ‚“ใ‹ใ€‚

ใ‚ˆใ‚ใ—ใใŠ้ก˜ใ„ใ—ใพใ™ใ€‚ ใƒŸใ‚ทใƒฃใ€‚

paulushub commented 3 years ago

ใ‚ˆใไฝฟใฃใฆใ€ๅฅฝใใงใ™ใ‚ˆใ€‚ใŠๆ‰‹ไผใ„ใŒๅฟ…่ฆใ ใฃใŸใ‚‰ใ€ๆ•™ใˆใฆใใ ใ•ใ„ใพใ›ใ‚“ใ‹ใ€‚

ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™ใ€‚็ขบ่ชใ—ใพใ™ใ€‚ใพใšใ€ŒFody/Fody.Costuraใ€ใซใคใ„ใฆใ€‚

MihailsKuzmins commented 3 years ago

ใใฎๅ•้กŒใฎ็‚บใฎใ€ŒPRใ€ใฎๆ”ฏๅบฆใŒใงใใพใ—ใŸใ€‚ @paulushubใ•ใ‚“ใ€่ฆ‹ใฆใ‚‚ใ‚‰ใˆใพใ›ใ‚“ใ‹ใ€‚ ใ€ŒPRใ€ใฎ็•ชๅทใฏ #200 ใงใ™ใ€‚

MihailsKuzmins commented 3 years ago

ใŠไน…ใ—ใถใ‚Šใงใ™ใญใ€‚ @paulushubใ•ใ‚“ใ€ใ„ใคNuGetใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ‚’ๅค‰ๆ›ดใ—ใพใ™ใ‹ใ€‚ใ“ใฎๅค‰ๆ›ดใ‚’ๆŒใฃใฆใ„ใ‚‹ใฎใงใ™ใ‹ใ‚‰ใ€‚ ใจใ‚Šใ‚ใˆใšใ€ใ€Œsubmoduleใ€ใ‚’ไฝฟใฃใฆใ„ใพใ™ใŒใ€ใƒ“ใƒซใƒ‰ใฏๆ•ฐๅˆ†ใ‚’ใ‹ใ‹ใ‚Šใพใ™ใ€‚ไพฟๅˆฉใ˜ใ‚ƒใชใ„ใงใ™ใ‚ˆใญใ€‚:cry:

paulushub commented 3 years ago

@MihailsKuzmins ็”ณใ—่จณใ‚ใ‚Šใพใ›ใ‚“ใญ๏ผNuGetใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ‚’ๆ›ดๆ–ฐใ—ใพใ—ใŸใ€‚

MihailsKuzmins commented 3 years ago

@MihailsKuzmins ็”ณใ—่จณใ‚ใ‚Šใพใ›ใ‚“ใญ๏ผNuGetใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ‚’ๆ›ดๆ–ฐใ—ใพใ—ใŸใ€‚

@paulushubใ•ใ‚“ใ€่ฌใ‚‰ใชใใฆใ‚‚ใ„ใ„ใงใ™ใ€‚NuGetใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ‚’ๆ›ดๆ–ฐใ—ใฆใใ‚Œใฆใ€ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ—ใŸใ€‚ใŠ็–ฒใ‚Œๆง˜ใงใ—ใŸใ€‚