将可移植类库(以 DLL 形式)添加到 Xamarin Studio [英] Add Portable Class Library (in DLL form) to Xamarin Studio

查看:94
本文介绍了将可移植类库(以 DLL 形式)添加到 Xamarin Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 Visual Studio 2012 构建了一个可移植类库,该类库也将在 Xamarin Studio 中构建.我想将从该 PCL(从解决方案的 bin 目录)构建的 DLL 添加到 Xamarin Studio 5.3 中的现有(Android 应用程序)项目.

我注意到根据 Xamarin 的文档,这通常是可能的.例如,从

  1. 点击.Net Assembly

  1. 选择Browse(在对话框的右下角)

I have built a Portable Class Library with Visual Studio 2012 that will also build in Xamarin Studio. I would like to add the DLL built from that PCL (from the bin directory of the solution) to an existing (Android app) project in Xamarin Studio 5.3.

I notice that according to documentation from Xamarin, this is generally possible. For example, from this page:

The output from a PCL (ie. the resulting assembly DLL) can also be added as a reference to most projects. This makes PCL an ideal way to ship cross-platform components and libraries.

If I simply right click in the solution tree and add the file, this does not seem to be usable by the project.

What is the correct way to add this resulting DLL based on a PCL to my Xamarin project?

解决方案

If you look under the solution explorer on the left, you can right click on References and select Edit References. Then go to .Net Assembly and Browse to navigate to the desired *.dll file. Select the file and click Add.

This is the simplest way there may be more

  1. Right click References

  1. Click .Net Assembly

  1. Choose Browse (at the bottom right of dialog)

这篇关于将可移植类库(以 DLL 形式)添加到 Xamarin Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆