login about faq

Im using VS 2015 and following the example here https://www.chilkatsoft.com/downloads_WinRT.asp to use the chilkat ftp2 component in a C#/XAML store app. I copied out the dll and winmd file into a libs directory in my project and added a reference. I also add the VC++ runtime reference. My project compiles fine, but when I access the Chilkat.FTP2 object I get an error "Requested Windows Runtime type 'Chilkat.Ftp2' is not registered."

What am I doing wrong?

asked Nov 02 '15 at 16:44

jcas1411's gravatar image

jcas1411
13


Okay, found my own solution. The issue is that C# winrt app expects a single winmd, which contains both the specification and implementation or a dll with an xml sdk. The solution to use the C++ winmd and dll was to correct the reference in my project file manually. I wish chilkat created an NuGet package for winrt (only win32 exists). If I get time I will try to create.

When adding the reference, visual studio leaves out the following

<iswinmdfile>true</iswinmdfile> <implementation>Chilkat.Windows.dll</implementation>

First, add both winmd, dll to project. Add reference under references. Open csproj file up with notepad. Search for chilkat. change

<reference include="Chilkat, Version=255.255.255.255, Culture=neutral, processorArchitecture=MSIL"> <specificversion>False</specificversion> <hintpath>LibsChilkat.WinRTChilkat.winmd</hintpath> </reference>

to

<reference include="Chilkat, Version=255.255.255.255, Culture=neutral, processorArchitecture=MSIL"> <specificversion>False</specificversion> <hintpath>LibsChilkat.WinRTChilkat.winmd</hintpath> <iswinmdfile>true</iswinmdfile> <implementation>Chilkat.Windows.dll</implementation> </reference>

This link is where I found the workaround... http://fixall.online/a-winrt-component-built-with-c-or-vb-produces-a-winmd/725444/

link

answered Nov 03 '15 at 08:42

jcas1411's gravatar image

jcas1411
13

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×131
×7

Asked: Nov 02 '15 at 16:44

Seen: 1,442 times

Last updated: Nov 03 '15 at 08:42

powered by OSQA