116 questions
1
vote
1
answer
37
views
How to get the value of a runtime property back into a design time property?
I have something like
public class A
{
public string FullName { get; set; }
}
A class that I don't want to change.
In a PropertyGrid I want it too look like this:
In the PropertyGrid it would look ...
2
votes
1
answer
51
views
How to get a runtime list into a PropertyGrid?
Assembly A:
public class Data
{
public string Text {get; set;}
}
Inside Assembly B ( references A):
List<string> stringList = GetSomeStringsAtRunTime();
Data obj = new Data();
propertyGrid....
0
votes
0
answers
45
views
Unable to use ArrayEditor class in WinForms application with Microsoft.WinForms.Designer.SDK in .NET 9
In a simple .NET 9 Winforms application, I have tried to create a custom class which is derived from ArrayEditor class, and it works only before I added the Microsoft.WinForms.Designer.SDK in my ...
0
votes
1
answer
102
views
VB.NET System.ComponentModel.Component.Site tag cannot be serialized, because it's an interface
Imports System.IO.Ports
Imports System.Data.SqlClient
Imports System.Collections.ObjectModel
Imports System.Data.Common
Imports Microsoft
Imports System.Data.SqlTypes
Imports System.Xml
Imports System....
7
votes
3
answers
7k
views
Why is an Azure Function on .NET 6 looking for System.ComponentModel Version 6.0.0.0?
I am deploying an Azure Function called "Bridge" to Azure, targeting .NET 6. The project is referencing a class library called "DBLibrary" that I wrote, and that library is ...
0
votes
2
answers
365
views
Simple application with opening webpage in VB
I would like to create simple exe app in VB, which will open default browser with specified page. I have this code
Public Class Form1
Private Sub Label1_Click(sender As Object, e As EventArgs) Handles ...
0
votes
0
answers
180
views
Winform Surface Designer how to generater resx file from component serializer
I am currently using the System.ComponentModel.Design.Serialization namespace to generate C# code. This code is compiled later by another application.
var manager = new ...
0
votes
0
answers
374
views
How to read the parts definition of Assembly from an AssemblyCatalog
I have a C# project runs on both .NET framework 4.6.2 and .NET core 3.1 with a most sharable code. When running in .NET framework, It is loading both the assembly and its parts definition from the x86 ...
2
votes
1
answer
1k
views
Entity Framework 6 not compatible with Data Annotations from system.componentmodel.annotations(net standard compatible) assembly?
I'm trying to use Entity Framework with a set of entities defined as a part of net standard2.0 nuget package. The project that uses Entity framework is a net472 project. When I'm building the model in ...
0
votes
1
answer
1k
views
Validating Form Data For null values in web api
I have class like
public class MyClass
{
public object Jobj{get; set;}
public string summary{get; set;}
public string someMethod()
{
//Do some work
return "";
}
}
and a post ...
0
votes
2
answers
1k
views
How to get TableName and Key field value from an object we are using in C#
I have a following like classes which i am using as model for entity framework core for one of my table.
After saving i am passing the object for some sort of caching work.
How can i get the TableName ...
4
votes
2
answers
301
views
Properties Window does not display events for 3rd level nested components unless a 2nd level nested component has an event
I have two System.ComponentModel classes, ComponentA and ComponentB:
public class ComponentA : Component
{
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ...
4
votes
0
answers
203
views
F# script cannot find type in referenced assembly
I'm using Core 3.1 to build a C# WPF MVVM application. I have a base view model class that implements IDataErrorInfo and works fine. This uses a reference to System.ComponentModel.
I'm using F# to ...
3
votes
0
answers
68
views
Evaluate custom model attribute in more generic way
I have a data model like below. One of its properties has been decorated with custom attribut - "Mergable":
public class Example
{
[Browsable(false)]
[Mergable(false)]
public int ...
2
votes
3
answers
9k
views
Could not load file or assembly System.ComponentModel.Annotations, Version=4.2.0.0
I realise this question has been asked, but I have tried all of the suggested solutions I can find.
I have a Load Testing project (with a .loadtest file and class that inherits from Microsoft....