[英]How do I add a reference to a Windows Universal C++ project
I am new on windows universal apps and Visual Studio 2015 projects and I can't find how to add a reference to the C++ project.我是 Windows 通用应用程序和 Visual Studio 2015 项目的新手,我找不到如何添加对 C++ 项目的引用。 I want to use LINQ and the namespace System.Linq can't be found.
我想使用 LINQ,但找不到命名空间 System.Linq。
I can't find how to add a reference to the C++ project.
我找不到如何添加对 C++ 项目的引用。 I want to use LINQ and the namespace System.Linq can't be found.
我想使用 LINQ,但找不到命名空间 System.Linq。
You cannot reference a .NET assembly LINQ to a UWP C++ project.不能将 .NET 程序集 LINQ 引用到 UWP C++ 项目。 You can only reference the UWP Windows Runtime Component to it.
您只能将 UWP Windows 运行时组件引用到它。
Right-click on "References" in the solution explorer, and click "Add reference" in the pop-up menu.右键单击解决方案资源管理器中的“引用”,然后在弹出菜单中单击“添加引用”。 That will open the reference manager where you can select the reference you need.
这将打开参考管理器,您可以在其中选择所需的参考。 You can read more about the topic in this MSDN article .
您可以在这篇 MSDN 文章中阅读有关该主题的更多信息。
You No need to add additional reference to 'System.Linq' by default it is there.默认情况下,您无需添加对“System.Linq”的额外引用,它就在那里。 just add
using System.Linq;
只需
using System.Linq;
添加using System.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.