Giter VIP home page Giter VIP logo

Comments (6)

augustoproiete avatar augustoproiete commented on June 27, 2024

Related thread:
https://groups.google.com/forum/#!topic/exceldna/ZUd1kckJblA

from exceldna.

henningniss avatar henningniss commented on June 27, 2024

Below is a reproduction scenario.

(0. Get Portable.Licensing using NuGet.)

  1. Compile the cs file to a dll
  2. Pack with ExcelDnaPack to an xll
  3. Copy the xll file to a directory without System.Xml.Linq.
  4. Start Excel with the xll and inspect the debug output.

This uses reproduction scenario uses Portable.Licensing as an example, but I am sure other libraries referencing portable versions of GAC'ed dll's would illustrate the problem just as well.

DNA:
<DnaLibrary Language="CS" RuntimeVersion="v4.0">
<ExternalLibrary Path="MyAddIn.dll" Pack="true" />
<Reference Path="Portable.Licensing.dll" Pack="true" />
</DnaLibrary>

CS:

using System;
using System.Diagnostics;
using ExcelDna.Integration;
using Portable.Licensing;

namespace MyAddIn
{
  public sealed class MyAddInHelper : IExcelAddIn
  {
    public void AutoOpen()
    {
       Debug.WriteLine("In AutoOpen()");
       try
       {
          var contents = "<?xml version=\"1.0\" encoding=\"utf-8\"?><gibberish />";
          var license = License.Load(contents);
       }
       catch (Exception e)
       {
          Debug.WriteLine("Exception: {0}", e.Message);
          throw;
       }
    }

    public void AutoClose()
    {
       Debug.WriteLine("In AutoClose()");
    }
  }
}

from exceldna.

konne avatar konne commented on June 27, 2024

Hi henningniss ,
What I miss in your DNA File is the bouncing castle dll, but I didn't test your problem till now.
If you like you can also check my branch version. https://github.com/konne/ExcelDna I have changed the whole area for finding the right assembly and I also solved the issue with portable dlls (I had the problem with autofac)
If you don't get your test working with my branch I will try to test this in the end of week and debug into this issue.

bye
Konrad

from exceldna.

henningniss avatar henningniss commented on June 27, 2024

Hi Konrad

Forgive my ignorance, but I thought that Bouncy Castle (to the extent that I knew of its existence) was already part of the Portable.Licensing dll, and hence not required as a separate dependency.

I'll try to find some time to test your branch as well.

Henning

from exceldna.

stonefly avatar stonefly commented on June 27, 2024

any update on this issue?

from exceldna.

govert avatar govert commented on June 27, 2024

I've not had a closer look at this yet.

from exceldna.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.