C
C#2y ago
Micychalek

❔ I am having some trouble running my project in Visual Studio after re installing system.

I am getting 2 errors and 2 warnings Severity Code Description Project File Line Suppression State Error CS0029 Cannot implicitly convert type 'string[]' to 'System.Windows.Forms.ComboBox.ObjectCollection' ICY CSharp src C:\Users\Admin\Desktop\TweakerV2\Icy\ICY CSharp src\ICY CSharp src\Hardware.Designer.cs 223 Active Severity Code Description Project File Line Suppression State Error CS0029 Cannot implicitly convert type 'string[]' to 'System.Windows.Forms.ComboBox.ObjectCollection' ICY CSharp src C:\Users\Admin\Desktop\TweakerV2\Icy\ICY CSharp src\ICY CSharp src\Hardware.Designer.cs 241 Active Severity Code Description Project File Line Suppression State Warning CS0169 The field 'registry.defaultValue' is never used ICY CSharp src C:\Users\Admin\Desktop\TweakerV2\Icy\ICY CSharp src\ICY CSharp src\registry.cs 54 Active Severity Code Description Project File Line Suppression State Warning The referenced component 'System.Security.Cryptography.Primitives' could not be found. ICY CSharp src
any help will be apprecitated
7 Replies
Micychalek
MicychalekOP2y ago
I did some research but nothing helped
TheBoxyBear
TheBoxyBear2y ago
What is the code in the lines with errors? For the combobox, the items should be added with Items.Add, not with direct assignment You shouldn't touch the form designer files anyway. The code is auto generated from the visual designer, but you can change it in this case to fix it
Micychalek
MicychalekOP2y ago
this.GPUdropdown.BackColor = System.Drawing.Color.Transparent; this.GPUdropdown.BorderRadius = 3; this.GPUdropdown.DisabledColor = System.Drawing.Color.Gray; this.GPUdropdown.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); this.GPUdropdown.Items = new string[] { "NVIDIA", "AMDRadeon"}; this.GPUdropdown.Location = new System.Drawing.Point(235, 255); this.GPUdropdown.Name = "GPUdropdown"; this.GPUdropdown.NomalColor = System.Drawing.Color.RoyalBlue; this.GPUdropdown.onHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255))))); this.GPUdropdown.selectedIndex = 0; this.GPUdropdown.Size = new System.Drawing.Size(132, 35); this.GPUdropdown.TabIndex = 49; this.GPUdropdown.onItemSelected += new System.EventHandler(this.GPUdropdown_onItemSelected); // // CPUdropdown // this.CPUdropdown.BackColor = System.Drawing.Color.Transparent; this.CPUdropdown.BorderRadius = 3; this.CPUdropdown.DisabledColor = System.Drawing.Color.Gray; this.CPUdropdown.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); this.CPUdropdown.Items = new string[] { "Intel", "AMD"}; this.CPUdropdown.Location = new System.Drawing.Point(429, 255); this.CPUdropdown.Name = "CPUdropdown"; this.CPUdropdown.NomalColor = System.Drawing.Color.RoyalBlue; this.CPUdropdown.onHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255))))); this.CPUdropdown.selectedIndex = 1; this.CPUdropdown.Size = new System.Drawing.Size(131, 35); I highlited the error lines
TheBoxyBear
TheBoxyBear2y ago
Right so just replace with Items.AddRange(new string[]...)
Micychalek
MicychalekOP2y ago
what do I exactly replace
TheBoxyBear
TheBoxyBear2y ago
The lines with errors Instead of CPU/GPUdropdown.Items =
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server