EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Compiling on WinRT

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#21986
Posted: 10/15/2012 02:25:13
by Rajen Kishna (Basic support level)
Joined: 10/12/2012
Posts: 20

We're facing an issue when compiling on WinRT using the SecureBlackbox.dll library from the NET_45_WinRT folder. The error we're getting is:

Code
Error   1   Cannot find type System.Security.Cryptography.SymmetricAlgorithm in module mscorlib.dll.   INGTabletTest

In WinRT this namespace doesn't exist, so the error make sense, but why is SBB still using that library for Symmetric encryption? There are libraries available in WinRT to do the same, so I would assume SBB should use these?

http://canbilgin.wordpress.com/2012/10/03/simple-aes-symmetric-key-encryption-in-winrt/
#21987
Posted: 10/15/2012 02:29:24
by Eugene Mayevski (EldoS Corp.)

Please check if sample projects compile for you. It seems that wrong set of assemblies is loaded by the compiler (most likely Win32 assemblies are taken from GAC no matter that you referenced assemblies from specific folder).


Sincerely yours
Eugene Mayevski
#21988
Posted: 10/15/2012 02:36:30
by Rajen Kishna (Basic support level)
Joined: 10/12/2012
Posts: 20

Thanks again for your fast reply, Eugene. It seems I posted the question prematurely, as I just figured out it was another library that was causing the issue.

Apologies!
#21991
Posted: 10/15/2012 03:57:23
by Rajen Kishna (Basic support level)
Joined: 10/12/2012
Posts: 20

Seems like I spoke too soon, when I try to reference the library for WinRT, compilation works fine, but I get the following error when trying to actually use the API (runtime):

Code
Could not load file or assembly 'SecureBlackbox, Version=10.0.226.0, Culture=neutral, PublicKeyToken=5a62fa96d0ac431a' or one of its dependencies. The system cannot find the file specified.

When I change the Copy Local attribute of the reference to True, I get the following error during compilation:

Code
Error   1   The "GenerateResource" task failed unexpectedly.
System.InvalidOperationException: Item named 'iso-8859-8-i:TPlISO_8859_8i' of type 'System.IO.UnmanagedMemoryStream' cannot be added to the resource file because it is not serializable.
   at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo reader, IResourceWriter writer)
   at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(ReaderInfo reader, String filename)
   at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFileOrDir)
   at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass, Boolean extractingResWFiles, String resWOutputDirectory)
   at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass, Boolean extractingResWFiles, String resWOutputDirectory)
   at Microsoft.Build.Tasks.GenerateResource.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()   App2


Any ideas?
#21992
Posted: 10/15/2012 04:05:43
by Eugene Mayevski (EldoS Corp.)

The change to Copy Local step is correct.
The issue with resources was addressed between updates. Build 226 (release) should have it resolved. Did you install pre-release versions before? Please check the exact build number of SecureBlackbox assemblies.


Sincerely yours
Eugene Mayevski
#21993
Posted: 10/15/2012 04:11:28
by Rajen Kishna (Basic support level)
Joined: 10/12/2012
Posts: 20

I'm definitely using 10.0.226.0 (also see the first error message above when Copy Local is False).

Never had other versions installed, so that can't be the issue. I can upload a sample project if needed, but it seems I'm getting the GenerateResource error with 10.0.226.0.
#21994
Posted: 10/15/2012 04:30:23
by Ken Ivanov (EldoS Corp.)

It looks like the compiler picks a wrong set of SecureBlackbox DLLs instead of WinRT ones - presumably, from the GAC. We've just been able to reproduce the issue on one of our test machines and are looking into it at the moment.

Meanwhile, please try the following temporary solution:

1. Uninstall SecureBlackbox,
2. Perform a search on entire drive for SecureBlackbox*.dll files and delete all the found occurrences (VS2012 does extensive caching so there can be loads of them),
3. Install SecureBlackbox from scratch and ensure you *only specify the WinRT set of assemblies to be installed*.

Once you re-installed the product, the assemblies should be referenced and used fine.
#21998
Posted: 10/15/2012 04:55:35
by Ken Ivanov (EldoS Corp.)

Update: the conflict is caused by assemblies targeting "big" .NET 4.5 framework. I.e. you can install all other sets of assemblies but the .NET 4.5 / Win32 set to be able to use WinRT assemblies without fail. We will fix this in the next SecureBlackbox update in some way.
#22000
Posted: 10/15/2012 05:53:34
by Rajen Kishna (Basic support level)
Joined: 10/12/2012
Posts: 20

Thanks for the clarification. I copied the assemblies to a different directory and uninstalled SBB, which seems to have done the trick.
#29516
Posted: 05/21/2014 07:42:32
by Brad Billman (Basic support level)
Joined: 05/21/2014
Posts: 1

Is there any fruit from this? I have yet to find an SFTP client for WindowsRT but would love to have one. Thanks
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 3302 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!