cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11825) Windows dll file won't be copied as resource while adding custom plugin to a UWP project
Date Wed, 05 Oct 2016 16:16:20 GMT

    [ https://issues.apache.org/jira/browse/CB-11825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15549188#comment-15549188
] 

ASF GitHub Bot commented on CB-11825:
-------------------------------------

GitHub user daserge opened a pull request:

    https://github.com/apache/cordova-windows/pull/199

    CB-11825 Windows dll file won't be copied as resource while adding cu…

    …stom plugin to a UWP project
    <!--
    Please make sure the checklist boxes are all checked before submitting the PR. The checklist
    is intended as a quick reference, for complete details please see our Contributor Guidelines:
    
    http://cordova.apache.org/contribute/contribute_guidelines.html
    
    Thanks!
    -->
    
    ### Platforms affected
    Windows
    
    ### What does this PR do?
    Changing Package action from Content to None because Content does not work for Mobile
- dlls were not being packaged into appx
    
    ### What testing has been done on this change?
    Manual and auto tests
    
    ### Checklist
    - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA
database
    - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file
paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [x] Added automated test coverage as appropriate for this change.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/daserge/cordova-windows CB-11825

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-windows/pull/199.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #199
    
----
commit 8349e0c069dd8847237fbd27effb273d86f31504
Author: daserge <v-seshak@microsoft.com>
Date:   2016-10-05T16:01:26Z

    CB-11825 Windows dll file won't be copied as resource while adding custom plugin to a
UWP project
    
    Changing Package action from Content to None because Content does not work for Mobile
- dlls were not being packaged into appx

----


> Windows dll file won't be copied as resource while adding custom plugin to a UWP project
> ----------------------------------------------------------------------------------------
>
>                 Key: CB-11825
>                 URL: https://issues.apache.org/jira/browse/CB-11825
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugins, Windows
>    Affects Versions: 6.3.1
>         Environment: Windows10 UWP projects
>            Reporter: Szabolcs Kubovics
>            Priority: Critical
>             Fix For: 6.3.2
>
>
> I have created a custom plugin which uses a Windows Runtime Component (e.g. "foo.winmd")
file. In this winmd I have a referenced library class (e.g. "bar.dll").
> My plugin.xml looks like:
> <platform name="windows">
>   ...  
>   <resource-file src="windows/windows10/bin/SayHelloLib.dll" target="plugins/com.plugin.test.myPlugin/SayHelloLib.dll"
versions="&lt;=0.0"/>
>   <framework src="windows/windows10/bin/Plugin.Test.winmd"/>
> </platform>
> With Cordova 6.2.0 the resource file will be copied to the target place and if I add
the plugin to a cordova project the winmd file will find it.
> With Cordova 6.3.1 the mentioned dll file won't be copied and I get FileNotFoundException
(because it is not there).
> "Exception calling native with command :: SayHelloToName :: sayHello ::exception=WinRTError:
The system cannot find the file specified.
> System.IO.FileNotFoundException: Could not load file or assembly 'SayHelloLib, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the
file specified.
>    at Plugin.Test.TestPlugin.getName(String name)
> cordova.js (993,13)"
> I created a test package to easily reproduce this scenario. The test application can
be downloaded from the external issue URL.
> - SayHelloLib: the library which is referred in the winmd (output of PluginProject solution)
> - PluginProject: contains the plugin proxy and the dll resource as cross referenced project
(just for convenience)
> - MyPlugin: the custom plugin, contains the plugin .js and .xml files and windows specific
resources from PluginProject solution
> - www: the index.html, it has to be copied to the www folder of the newly created Cordova
project
> Repro steps:
> 1) build PluginProject project on x64 platform
> 2) copy built files:
> 	PluginProject\MyTestPlugin\windows\src\myPlugin_proxy.js -> MyPlugin\windows\src
> 	PluginProject\Plugin.Test\Plugin.Test.UWP\bin\x64\Debug\Plugin.Test.winmd -> MyPlugin\windows\windows10\bin

> 	PluginProject\Plugin.Test\Plugin.Test.UWP\bin\x64\Debug\SayHelloLib.dll -> MyPlugin\windows\windows10\bin

> 3) cordova create Cordova631 cordova631.test.plugin Cordova631
> 4) cd Cordova631
> 5) cordova platform add windows
> 6) cordova plugin add com.plugin.test.myPlugin --searchpath <path_to_MyPlugin_folder>
> 7) copy file:
> 	www\index.html -> Cordova631\platforms\windows\www
> 8) build the CordovaApp.sln on x64 platform
> 9) start the application
> 10) write something in the "Name" textbox
> 11) click "Say hello" button



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message