Browse Source

Fixed SD2-588. Type resolution service no longer returns types from the Microsoft.VSDesigner assembly. This stops the forms designer from using Microsoft's data adapter designers.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@804 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 20 years ago
parent
commit
7a74150303
  1. 22
      src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/TypeResolutionService.cs

22
src/AddIns/DisplayBindings/FormDesigner/Project/Src/FormDesigner/Services/TypeResolutionService.cs

@ -12,6 +12,7 @@ using System.Collections.Specialized; @@ -12,6 +12,7 @@ using System.Collections.Specialized;
using System.Drawing;
using System.ComponentModel;
using System.ComponentModel.Design;
using ICSharpCode.Core;
namespace ICSharpCode.FormDesigner.Services
{
@ -51,6 +52,9 @@ namespace ICSharpCode.FormDesigner.Services @@ -51,6 +52,9 @@ namespace ICSharpCode.FormDesigner.Services
if (name == null || name.Length == 0) {
return null;
}
if (IgnoreType(name)) {
return null;
}
try {
Assembly lastAssembly = null;
foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
@ -97,5 +101,23 @@ namespace ICSharpCode.FormDesigner.Services @@ -97,5 +101,23 @@ namespace ICSharpCode.FormDesigner.Services
{
ICSharpCode.Core.LoggingService.Warn("TODO: Add Assembly reference : " + name);
}
/// <summary>
/// HACK - Ignore any requests for types from the Microsoft.VSDesigner
/// assembly. There are smart tag problems if data adapter
/// designers are used from this assembly.
/// </summary>
bool IgnoreType(string name)
{
int idx = name.IndexOf(",");
if (idx > 0) {
string[] splitName = name.Split(',');
string assemblyName = splitName[1].Substring(1);
if (assemblyName == "Microsoft.VSDesigner") {
return true;
}
}
return false;
}
}
}

Loading…
Cancel
Save