Giter VIP home page Giter VIP logo

excelrna.extensions.hosting's Introduction

Welcome to GitHub Pages

You can use the editor on GitHub to maintain and preview the content for your website in Markdown files.

Whenever you commit to this repository, GitHub Pages will run Jekyll to rebuild the pages in your site, from the content in your Markdown files.

Markdown

Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for

Syntax highlighted code block

# Header 1
## Header 2
### Header 3

- Bulleted
- List

1. Numbered
2. List

**Bold** and _Italic_ and `Code` text

[Link](url) and ![Image](src)

For more details see GitHub Flavored Markdown.

Jekyll Themes

Your Pages site will use the layout and styles from the Jekyll theme you have selected in your repository settings. The name of this theme is saved in the Jekyll _config.yml configuration file.

Support or Contact

Having trouble with Pages? Check out our documentation or contact support and we’ll help you sort it out.

excelrna.extensions.hosting's People

Contributors

altso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gi82

excelrna.extensions.hosting's Issues

Unpacked XLL throws Assembly could not be loaded from resources

I'm getting this error when running the sample project.
I upgraded to ExcelDna 1.6.0 as well with no luck.
When running the packed version it seems to work fine.
However, while debugging, launching the unpacked version I get the error below.

ExcelDna.Integration Warning: 1 : Assembly SYSTEM.RUNTIME.COMPILERSERVICES.UNSAFE could not be loaded from resources.
ExcelDna.Integration Error: 1 : DnaLibrary AutoOpen Error : TargetInvocationException - Exception has been thrown by the target of an invocation.

Also, when running the packed version, I get this error when closing excel:

Managed Debugging Assistant 'LoaderLock' 
Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.

To be honest I'm not really sure if this is an ExcelDna issue or an issue that is caused by this package.

This is my csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net48</TargetFramework>
    <ExcelAddInExplicitRegistration>true</ExcelAddInExplicitRegistration>
    <ExcelDnaAllowPackageReferenceProjectStyle>true</ExcelDnaAllowPackageReferenceProjectStyle>
    <!-- We don't need the extra 'ref' directory and reference assemblies for the Excel add-in -->
    <ProduceReferenceAssembly>false</ProduceReferenceAssembly>

    <!-- We need all dependencies to be copied to the output directory, as-if we are an 'application' and not a 'library'.
         This property also sets the CopyLockFileAssemblies property to true. -->
    <EnableDynamicLoading>true</EnableDynamicLoading>

    <!-- Enables cross-platform resource packing implementation when executing on Windows. -->
    <!-- Default value: false -->
    <ExcelDnaPackManagedResourcePackingOnWindows>true</ExcelDnaPackManagedResourcePackingOnWindows>

    <!-- Enables packing native libraries from .deps.json. -->
    <!-- Default value: true -->
    <ExcelDnaPackNativeLibraryDependencies>true</ExcelDnaPackNativeLibraryDependencies>

    <!-- Enables packing managed assemblies from .deps.json. -->
    <!-- Default value: true -->
    <ExcelDnaPackManagedDependencies>true</ExcelDnaPackManagedDependencies>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="ExcelDna.AddIn" Version="1.6.0" />
    <PackageReference Include="ExcelDna.Integration" Version="1.6.0" />
    <PackageReference Include="ExcelDna.IntelliSense" Version="1.6.0" />
    <PackageReference Include="ExcelRna.Extensions.Hosting" Version="1.0.5" />
    <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
    <PackageReference Include="Microsoft.Extensions.Logging.TraceSource" Version="7.0.0" />
    <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="System.Windows.Forms" />
  </ItemGroup>

  <Target Name="ExcelDnaIncludeReferences" DependsOnTargets="ExcelDnaBuild" BeforeTargets="ExcelDnaPack">
    <!-- read existing content -->
    <XmlPeek XmlInputPath="%(ExcelDnaFilesToPack.OutputDnaFileName)" Query="//*[local-name()=&quot;DnaLibrary&quot;]/*">
      <Output TaskParameter="Result" PropertyName="Peeked" />
    </XmlPeek>

    <!-- find all dependencies -->
    <ItemGroup>
      <ExcelDnaReferences Include="@(ReferenceCopyLocalPaths->'&lt;Reference Path=&quot;%(Filename)%(Extension)&quot; Pack=&quot;true&quot; /&gt;')" Condition="'%(Extension)' == '.dll'" />
    </ItemGroup>

    <!-- combine existing content with the required dependencies -->
    <PropertyGroup>
      <ExcelDnaReferencesXml>@(ExcelDnaReferences)</ExcelDnaReferencesXml>
      <ConcatenatedNodes>$(Peeked.Replace(";",""))$(ExcelDnaReferencesXml.Replace(";",""))</ConcatenatedNodes>
    </PropertyGroup>

    <!-- update .dna file -->
    <XmlPoke Value="$(ConcatenatedNodes)" XmlInputPath="%(ExcelDnaFilesToPack.OutputDnaFileName)" Query="//*[local-name()=&quot;DnaLibrary&quot;]">
    </XmlPoke>

    <Message Text="Patched %(ExcelDnaFilesToPack.OutputDnaFileName)." Importance="High" />
  </Target>

</Project>

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.