简体   繁体   English

如何解决命名空间中找不到的'CrmServerLoginControl'?

[英]How to resolve 'CrmServerLoginControl' not found in namespace?

I've created a project using the XRM tooling common login control template in Visual Studio tergating the .Net 4.5 framework. 我使用Visual Studio中的XRM工具通用登录控制模板创建了一个项目,该模板与.Net 4.5框架相关。 But after the second time running the app the compiler tells me that the login control can't be found in the namespace: 但在第二次运行应用程序后,编译器告诉我在命名空间中找不到登录控件:

Error 15 The tag 'CrmServerLoginControl' does not exist in XML namespace 'clr-namespace:Microsoft.Xrm.Tooling.CrmConnectControl;assembly=Microsoft.Xrm.Tooling.CrmConnectControl'. 错误15 XML命名空间'clr-namespace中不存在标记'CrmServerLoginControl':Microsoft.Xrm.Tooling.CrmConnectControl; assembly = Microsoft.Xrm.Tooling.CrmConnectControl'。 Line 24 Position 10. 第24行位置10。

Debugging steps: 调试步骤:

I've tried the following in order to resolve the namespace: 我已尝试以下方法来解析命名空间:

  • Removing the assembly path from the namespace declaration 从命名空间声明中删除程序集路径
  • Cleaning and rebuilding the solution 清洁和重建解决方案
  • Removing and re-adding the control from my xaml markup 从我的xaml标记中删除并重新添加控件

Question: 题:

Does anyone know how to debug this issue further? 有谁知道如何进一步调试此问题?

Code: (namespace and control declaration) 代码:(命名空间和控制声明)

xmlns:CrmLoginCtrl="clr-namespace:Microsoft.Xrm.Tooling.CrmConnectControl;assembly=Microsoft.Xrm.Tooling.CrmConnectControl"


<CrmLoginCtrl:CrmServerLoginControl Name="CrmLoginCtrl"
                                            Grid.Row="1"
                                            Margin="10,5"
                                            VerticalAlignment="Bottom"
                                            ShowTitle="False" />

Old question, but commenting here as it was missing the answer. 老问题,但在这里评论,因为它错过了答案。

Check the References folder, within your Visual Studio project. 检查Visual Studio项目中的References文件夹。 If various Dynamics 365 SDK references are showing warnings, take the following steps. 如果各种Dynamics 365 SDK引用显示警告,请执行以下步骤。

  • Right Click the references Folder Select 'Manage Nuget Packages" 右键单击引用文件夹选择“管理Nuget包”
  • Ensure that the SDK packages are displayed, If there are issues then 确保显示SDK包,如果有问题
  • You should have the option to "Restore" the connections, at the top right of the Dialog. 您应该可以选择“恢复”对话框右上角的连接。
  • Click Restore and once completed, close the Nuget manager dialog. 单击“还原”,完成后,关闭“Nuget管理器”对话框。

You should now be able to build the project without the error. 您现在应该能够在没有错误的情况下构建项目。

Note, All of this has a pre-requisite of having the Nuget packet manager installed, which is documented. 注意,所有这些都具有安装Nuget数据包管理器的先决条件,这已记录在案。

Hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM