无法显示自定义控件 [英] Custom controls cannot be displayed

查看:65
本文介绍了无法显示自定义控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述






最近,我的项目中的设计器拒绝加载除了许多自定义控件之间共享的基本自定义用户控件。整个项目构建和运行没有错误。以下是生成的ActivityLog.xml(https://www.dropbox.com/s/nrdkqjcl1zozvl2/ActivityLog.xml?dl=0)
的链接。它似乎与"Microsoft Data Transformation Services Designer"有关。但我不确定如何解决这个问题。





任何帮助都是非常感谢。



我按照https://stackoverflow.com/questions/36010177/error-when-previewing-mvc-views-给出的答案in-visual-studio-2015,现在控制部分加载。也就是说,控件将加载一个继承自前面提到的
基本自定义控件的自定义控件,但没有特定于此新自定义控件。


现在,当程序运行时,控件就像在设计器中一样(这是空的)。但是,当我检查CustomControl.Designer.cs文件时,自动生成的代码的所有
都应该如此,但它不会出现在设计器中或运行应用程序时。

解决方案

嗨Ricky890710,


欢迎来到MSDN论坛。


你最近是否安装了任何扩展或Windows补丁?


你可以在安全模式下启动VS(devenv / SafeMode),这可能会阻止所有第三-party VSPackages在Visual Studio启动时加载,从而确保稳定的
执行。如果它在安全模式下工作正常,这意味着已安装的扩展可能会损坏VS,请转到工具扩展和更新...并逐个删除所有已安装的扩展以查找罪魁祸首。


根据错误消息"CreateInstance软件包[Microsoft Data Transformation Services Designer]来源失败,请尝试删除或
重命名以下文件夹:



  • C:\ Users \<您的用户名称> \ APPData \本地\ Microsoft \\\VisualStudio \14.0
  • C:\ Users \<您的用户名> \ AppData \ Rooaming\Microsoft \ VisualStudio \\\ 2014.0

如果它仍然没有不行,您可以尝试修复Visual Studio 2015。


问候,


Judyzh


Hi,

Recently the designer in my project refuses to load for all but a base custom user control that is shared between many custom controls. The entire project builds and run without errors. Here is a link to the ActivityLog.xml (https://www.dropbox.com/s/nrdkqjcl1zozvl2/ActivityLog.xml?dl=0) that was generated. It appears to be related to "Microsoft Data Transformation Services Designer" but I am unsure of how to fix the issue.

Any help is greatly appreciated.

I followed the answer given at https://stackoverflow.com/questions/36010177/error-when-previewing-mvc-views-in-visual-studio-2015 and now the control partially loads. That is, the control will load a custom control that inherits from the aforementioned base custom control, but nothing specific to this new custom control.

Now, when the program runs, the control appears as it does in the designer (this is, empty). However, when I check the CustomControl.Designer.cs file, all of the automatically generated code is there like it should be, but it does not appear in the designer or when the application is run.

解决方案

Hi Ricky890710,

Welcome to the MSDN forum.

Have you been installing any extension or windows patches lately?

You could start VS in safe mode (devenv /SafeMode), which could prevent all third-party VSPackages from loading when Visual Studio starts, thus ensuring stable execution. If it works fine in safe mode, that means the installed extensions may be corrupted the VS, please go to Tool—Extensions and Updates… and remove all installed extensions one by one to find the culprit.

According to the error message "CreateInstance failed for package [Microsoft Data Transformation Services Designer] Source", please have a try with delete or rename the following folders:

  • C:\Users\<your users name>\AppData\Local\Microsoft\VisualStudio\14.0
  • C:\Users\<your users name>\AppData\Roaming\Microsoft\VisualStudio\14.0

If it still doesn’t work, you could try to repair Visual Studio 2015.

Regards,

Judyzh


这篇关于无法显示自定义控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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