question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to reference System.Design

See original GitHub issue

When converting the project to netcoreapp3.0 and keeping the System.Design reference, the compiler doesn’t seem to see the reference:

CS0012 The type ‘ComponentDesigner’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <!-- ... -->
  </PropertyGroup>

  <ItemGroup>
    <Reference Include="System.Design" />
    <!-- ... -->
    <FrameworkReference Include="Microsoft.DesktopUI" />
  </ItemGroup>

</Project>

How will this work in the future?

(edit) This gets it to build:

    <Reference Include="System.Design" HintPath="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Design.dll" />

But since System.Design is heavily used at runtime, I’m doubtful that the .NET Framework’s System.Design will work.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
filipnavaracommented, Sep 18, 2018

We have similar dependencies for our custom WinForms controls too. The missing API set is nearly identical. In our case they are design-time only and we have a build option to strip them out of release builds, so we are still able to run our application on .NET Core 3 alpha today (with some additional fixes discussed in the CoreFX repository issues).

I suspect this will come up quite often and it has to be addressed in one way or another. I was hoping that this will eventually come later when the WinForms design-time support is brought in later preview. I’m taking a wait-and-see approach on this one, but wanted to express some support that the scenario is probably common.

2reactions
jnm2commented, Sep 18, 2018

Hi Olia,

Our applications depend on DevExpress’s End User Report Designer (docs). DevExpress built it on top of the System.ComponentModel/IDesignerHost/CodeDOM set of abstractions, very much like the Windows Forms designer itself.

This designer ships for our users at runtime (as the name suggests). We’ve written custom reporting elements that integrate with it. Since DevExpress based the designer heavily on System.Design, our integrations with the report designer are also tied to System.Design. We’re hoping that this doesn’t keep us from moving to .NET Core.

In this report, see especially DevExpress.XtraReports.v17.2.Extensions.dll which houses their End User Report Designer: Portability report for DevExpress dependencies.xlsx

That’s what DevExpress’s code needs. Our code, which merely integrates with DevExpress’s report designer, ends up directly using these types:

T:System.ComponentModel.Design.CollectionEditor
T:System.ComponentModel.Design.CollectionEditor.CollectionForm
T:System.ComponentModel.Design.ComponentDesigner
T:System.ComponentModel.Design.DesignerActionItem
T:System.ComponentModel.Design.DesignerActionItemCollection
T:System.ComponentModel.Design.DesignerActionList
T:System.ComponentModel.Design.DesignerActionListCollection
T:System.ComponentModel.Design.DesignerActionMethodItem
T:System.ComponentModel.Design.DesignerActionPropertyItem
T:System.ComponentModel.Design.DesignerActionTextItem
T:System.ComponentModel.Design.DesignerActionUIService
T:System.ComponentModel.Design.DesignerActionUIStateChangeEventArgs
T:System.ComponentModel.Design.DesignerActionUIStateChangeEventHandler
T:System.ComponentModel.Design.DesignerActionUIStateChangeType
T:System.ComponentModel.Design.MultilineStringEditor
T:System.ComponentModel.Design.Serialization.CodeDomSerializer
T:System.ComponentModel.Design.Serialization.CodeDomSerializerBase
T:System.ComponentModel.Design.Serialization.DesignerSerializationManager
T:System.Drawing.Design.IToolboxService
T:System.Drawing.Design.ToolboxItem
T:System.Drawing.Design.ToolboxItemCollection
T:System.Windows.Forms.Design.AnchorEditor
T:System.Windows.Forms.Design.Behavior.Behavior
T:System.Windows.Forms.Design.Behavior.BehaviorService
T:System.Windows.Forms.Design.Behavior.ControlBodyGlyph
T:System.Windows.Forms.Design.Behavior.GlyphSelectionType
T:System.Windows.Forms.Design.ControlDesigner
T:System.Windows.Forms.Design.ParentControlDesigner
T:System.Windows.Forms.Design.ScrollableControlDesigner
T:System.Windows.Forms.Design.SelectionRules

And these members:

M:System.ComponentModel.Design.CollectionEditor.#ctor(System.Type)
M:System.ComponentModel.Design.CollectionEditor.CollectionForm.#ctor(System.ComponentModel.Design.CollectionEditor)
M:System.ComponentModel.Design.CollectionEditor.CollectionForm.OnEditValueChanged
M:System.ComponentModel.Design.CollectionEditor.CollectionForm.get_Items
M:System.ComponentModel.Design.CollectionEditor.CollectionForm.set_Items(System.Object[])
M:System.ComponentModel.Design.CollectionEditor.get_Context
M:System.ComponentModel.Design.ComponentDesigner.#ctor
M:System.ComponentModel.Design.ComponentDesigner.GetService(System.Type)
M:System.ComponentModel.Design.ComponentDesigner.InitializeNewComponent(System.Collections.IDictionary)
M:System.ComponentModel.Design.ComponentDesigner.PostFilterAttributes(System.Collections.IDictionary)
M:System.ComponentModel.Design.ComponentDesigner.PostFilterProperties(System.Collections.IDictionary)
M:System.ComponentModel.Design.ComponentDesigner.get_Component
M:System.ComponentModel.Design.ComponentDesigner.get_Verbs
M:System.ComponentModel.Design.DesignerActionItemCollection.#ctor
M:System.ComponentModel.Design.DesignerActionItemCollection.Add(System.ComponentModel.Design.DesignerActionItem)
M:System.ComponentModel.Design.DesignerActionList.#ctor(System.ComponentModel.IComponent)
M:System.ComponentModel.Design.DesignerActionList.GetService(System.Type)
M:System.ComponentModel.Design.DesignerActionList.get_Component
M:System.ComponentModel.Design.DesignerActionList.set_AutoShow(System.Boolean)
M:System.ComponentModel.Design.DesignerActionListCollection.#ctor(System.ComponentModel.Design.DesignerActionList[])
M:System.ComponentModel.Design.DesignerActionListCollection.Insert(System.Int32,System.ComponentModel.Design.DesignerActionList)
M:System.ComponentModel.Design.DesignerActionListCollection.get_Item(System.Int32)
M:System.ComponentModel.Design.DesignerActionMethodItem.#ctor(System.ComponentModel.Design.DesignerActionList,System.String,System.String)
M:System.ComponentModel.Design.DesignerActionMethodItem.#ctor(System.ComponentModel.Design.DesignerActionList,System.String,System.String,System.String)
M:System.ComponentModel.Design.DesignerActionPropertyItem.#ctor(System.String,System.String)
M:System.ComponentModel.Design.DesignerActionTextItem.#ctor(System.String,System.String)
M:System.ComponentModel.Design.DesignerActionUIService.HideUI(System.ComponentModel.IComponent)
M:System.ComponentModel.Design.DesignerActionUIService.Refresh(System.ComponentModel.IComponent)
M:System.ComponentModel.Design.DesignerActionUIService.ShowUI(System.ComponentModel.IComponent)
M:System.ComponentModel.Design.DesignerActionUIService.add_DesignerActionUIStateChange(System.ComponentModel.Design.DesignerActionUIStateChangeEventHandler)
M:System.ComponentModel.Design.DesignerActionUIService.remove_DesignerActionUIStateChange(System.ComponentModel.Design.DesignerActionUIStateChangeEventHandler)
M:System.ComponentModel.Design.DesignerActionUIStateChangeEventArgs.get_ChangeType
M:System.ComponentModel.Design.DesignerActionUIStateChangeEventHandler.#ctor(System.Object,System.IntPtr)
M:System.ComponentModel.Design.Serialization.CodeDomSerializer.#ctor
M:System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.Object)
M:System.ComponentModel.Design.Serialization.CodeDomSerializer.Serialize(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.Object)
M:System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.String,System.CodeDom.CodeExpression)
M:System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetExpression(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.Object)
M:System.ComponentModel.Design.Serialization.CodeDomSerializerBase.SerializeToExpression(System.ComponentModel.Design.Serialization.IDesignerSerializationManager,System.Object)
M:System.ComponentModel.Design.Serialization.DesignerSerializationManager.#ctor
M:System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateSession
M:System.ComponentModel.Design.Serialization.DesignerSerializationManager.get_Errors
M:System.Drawing.Design.IToolboxService.AddToolboxItem(System.Drawing.Design.ToolboxItem)
M:System.Drawing.Design.IToolboxService.GetToolboxItems
M:System.Drawing.Design.IToolboxService.RemoveToolboxItem(System.Drawing.Design.ToolboxItem)
M:System.Drawing.Design.ToolboxItem.get_TypeName
M:System.Windows.Forms.Design.AnchorEditor.#ctor
M:System.Windows.Forms.Design.Behavior.Behavior.#ctor(System.Boolean,System.Windows.Forms.Design.Behavior.BehaviorService)
M:System.Windows.Forms.Design.Behavior.Behavior.FindCommand(System.ComponentModel.Design.CommandID)
M:System.Windows.Forms.Design.Behavior.BehaviorService.GetNextBehavior(System.Windows.Forms.Design.Behavior.Behavior)
M:System.Windows.Forms.Design.Behavior.BehaviorService.PopBehavior(System.Windows.Forms.Design.Behavior.Behavior)
M:System.Windows.Forms.Design.Behavior.BehaviorService.PushBehavior(System.Windows.Forms.Design.Behavior.Behavior)
M:System.Windows.Forms.Design.Behavior.BehaviorService.get_CurrentBehavior
M:System.Windows.Forms.Design.Behavior.ControlBodyGlyph.#ctor(System.Drawing.Rectangle,System.Windows.Forms.Cursor,System.ComponentModel.IComponent,System.Windows.Forms.Design.ControlDesigner)
M:System.Windows.Forms.Design.ControlDesigner.#ctor
M:System.Windows.Forms.Design.ControlDesigner.OnDragDrop(System.Windows.Forms.DragEventArgs)
M:System.Windows.Forms.Design.ControlDesigner.OnDragEnter(System.Windows.Forms.DragEventArgs)
M:System.Windows.Forms.Design.ControlDesigner.OnDragLeave(System.EventArgs)
M:System.Windows.Forms.Design.ControlDesigner.OnDragOver(System.Windows.Forms.DragEventArgs)
M:System.Windows.Forms.Design.ControlDesigner.OnGiveFeedback(System.Windows.Forms.GiveFeedbackEventArgs)
M:System.Windows.Forms.Design.ControlDesigner.OnSetCursor
M:System.Windows.Forms.Design.ControlDesigner.get_Control
M:System.Windows.Forms.Design.ControlDesigner.get_ParticipatesWithSnapLines
M:System.Windows.Forms.Design.ControlDesigner.get_SelectionRules
M:System.Windows.Forms.Design.ControlDesigner.set_AutoResizeHandles(System.Boolean)
M:System.Windows.Forms.Design.ParentControlDesigner.#ctor
M:System.Windows.Forms.Design.ParentControlDesigner.Dispose(System.Boolean)
M:System.Windows.Forms.Design.ParentControlDesigner.Initialize(System.ComponentModel.IComponent)
M:System.Windows.Forms.Design.ParentControlDesigner.InitializeNewComponent(System.Collections.IDictionary)
M:System.Windows.Forms.Design.ParentControlDesigner.OnDragDrop(System.Windows.Forms.DragEventArgs)
M:System.Windows.Forms.Design.ParentControlDesigner.OnDragEnter(System.Windows.Forms.DragEventArgs)
M:System.Windows.Forms.Design.ParentControlDesigner.OnDragLeave(System.EventArgs)
M:System.Windows.Forms.Design.ParentControlDesigner.OnDragOver(System.Windows.Forms.DragEventArgs)
M:System.Windows.Forms.Design.ParentControlDesigner.OnPaintAdornments(System.Windows.Forms.PaintEventArgs)
M:System.Windows.Forms.Design.ScrollableControlDesigner.#ctor
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to reference System.Design #221 - dotnet/winforms
When converting the project to netcoreapp3.0 and keeping the System.Design reference, the compiler doesn't seem to see the reference:.
Read more >
A System Design Reference Model
The reference model can be used to find similarities and dissimilarities between different design pro- cesses, and to find possible connections between ...
Read more >
Formal Methods in System Design Referencing Guide ...
This is the Citationsy guide to Formal Methods in System Design citations, reference lists, in-text citations, and bibliographies.
Read more >
Reference - System Design - GitBook
Reference. ​The System Design Primer | by @donnemartin on GitHub - Learn how to design large-scale systems. Prep for the system design interview....
Read more >
How to reference system.design in a client profile project?
Simply put: you can't. You'll have to either change the target framework or re-implement the control for the client profile.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found