how to refer 3rd party dll's to silverlight application? - dll

I am new to silverlight. I have a silverlight application and i need to refer some 3rd party dll's for some functionality. If i try to add reference for few dll's i get the below error:
You cant add reference as the dll was not built against silverlight runtime.Silverlight projects will work with silverlight only.
For few dll's i get the error below:
A reference to dll cannot be added. Please make sure that the file is accessible, and that it has a valid assembly or COM component.
How do i solve this?

Silverlight has it's own target in .NET. As such, any assemblies a Silverlight application references has to be built with the Silverlight target. Ask the vendor if they have a Silverlight build.

Related

How do I know if an application uses Silverlight?

I am looking at a legacy .NET application and need to know if it is using Silverlight. If it is, I need to migrate the code to WPF, XAML, or HTML5.
Is there a specific set of namespaces and references that tell me that this is a Silverlight application?
Some indicators:
the ProjectTypeGuids element in the .csproj/.vbproj files contains the Silverlight project GUID: {A1591282-1198-4647-A2B1-27E5FF5F6F3B}
the System.* dependencies, when observed in the property grid in Visual Studio, would have version 5.0.5.0 or similar.
You can see a Silverlight project property with bellow link
Silverlight project property

VS2015 C++ DLL and such with Add Reference

I have three VS2015 projects (DLL, C++ App & C# App)
I created the DLL and targeted v4.5 Framework
I created the C++ Application and targeted the v4.5 framwork and then was able to add reference without an issue.
I create the C# Application and targeted the v4.5 framework and then the Add reference fails with check your assembly or COM message.
Both applications have the DLL project added to the solution.
What else can I check as to why my C# process can't add reference?
Thanks,
Mark
I got around it using PInvode and the C# project didn't need to Add Reference afterall. I had to manually edit out the Precompiled header stuff to force that NotUsing. Thanks for the quick response... just had a quick turn around for my boss. Handed a working Cipher DLL for use with both C++ and C# in his project.

Xamarin Forms how to consume a wcf service

I've created a Xamarin project which added the following projects to the solution:
Xamarin.UI(Portable)
Xamarin.UI.Droid
Xamarin.UI.iOS
Xamarin.UI.UWP
Xamarin.UI.Windows (Windows 8.1)
Xamarin.UI.WindowsPhone (Windows Phone 8.1)
I am having problems creating a client which can consume my WCF service.
1) Firstly the current Xamarin project template doesn't reference System.ServiceModel assembly in the PCL therefore I cannot right click the PCL and Add Service Reference to my project. When I manually add a reference to System.ServiceModel from this location - C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5 the menu item for create service reference pops up. When I click Go in the Add Service Reference dialog I get the following error:
"This service cannot be consumed by the current project. Please check if the project target framework supports this service type."
The PCL targets are as follows:
.NET Framework 4.5
ASP.NET Core 1.0
Windows 8
Windows Phone 8.1
Xamarin.Android
Xamarin.iOS
Xamarin.iOS
I don't know how to get this working ?
2) Secondly the work around I use is to create the client with SlSvcUtil.exe
Add the generated code to my PCL along with a reference to System.ServiceModel and everything builds ok. The problem is that when I run the code it flags up type reference errors ! Should I be manually adding the reference to System.ServiceModel anyway? What am I doing wrong in this scenario? Am I missing some steps?
I've checked the Xamarin docs but it seems that I can't find detailed instructions on this.
Please help me out ! Thanks:)
PCL and WCF should be supported. Alternatively, you could get this to work manually with HttpClient, etc. But maybe if you can use the shared project instead of PCL, that would be easier. Otherwise you'd have to also use DependencyService, create interfaces, etc. for each platform.

3rd Party DLLs with asp.net core

I would like to use a 3rd party wrapper dll in an asp.net core project. (Emgucv)
The Problem is: The .net Wrapper expects several DLLS in \x86 or \x64 folder in a traditional .net \bin directory.
I tried packing the two folders in a nugetpackage and adding that to my project, but that does not seem to help.
I have no clue how this could work out in asp.net core.... or if there even is a way?
Will it work to create an additional ("oldschool") net dll, handling my 3rd party stuff?

Microsoft.Http.dll does not exist

I need to use the REST feature, HttpMultipartMimeForm, which I believe belongs to Microsoft.Http.dll. But in my .Net 4.0 project I couldn't find it anywhere. I do have my project's Target framework configured as .Net Framework 4, not ..Client Profile, and as an evidence, I do have the System.ServiceModel.Web assembly in the available .net reference list. But I still don't have the Microsoft.Http.dll and therefore, don't have the class I need. I think I may be able to get the dll if I download and install WCF REST Starter Kit but why do I have to do that? .Net 4 is supposed to have it as part of standard, isn't it?
It's now called MultipartFormDataContent and it is in System.Net.Http. You can get the nuget from here http://nuget.org/packages/Microsoft.Net.Http/2.0.20710.0