Double reference to assembly in UI Robot but not in Studio



Hi All,

So I was implementing this nice notification system in a robot a little while ago, but first now tried to run it outside UIPath Studio using UI Robot, and I get an error I dont understand fully. I know it is about double reference to wpf but I have no clue how to fix it.

so here is the notification system I implemented:

Code of the Invoke Code


lblFname = New System.Windows.Forms.Label()
lblFname.AutoSize = True
lblFname.ForeColor = System.Drawing.Color.Black
lblFname.Location = New System.Drawing.Point(10, 10)
lblFname.Name = "lblFname"
lblFname.Size = New System.Drawing.Size(38, 13)
lblFname.TabIndex = 0
lblFname.Text = FullName.Trim

form= New System.Windows.forms.form
form.Text="TM Tand Opstart"
form.TopMost = True
form.AutoSize = False
form.BackColor = Color.FromArgb(255, 255, 255)
form.AutoScaleDimensions = New System.Drawing.SizeF(12F, 13F)
form.Font = New System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
form.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
form.ClientSize = New System.Drawing.Size(350, 75)
form.StartPosition = FormStartPosition.Manual
form.Location = New Point(Screen.PrimaryScreen.WorkingArea.Width - form.Width, 
Screen.PrimaryScreen.WorkingArea.Height - form.Height)
form.Name = "notoficationForm"
form.ControlBox = False

Here is the variables used in the code

This is the error I get
Translation of line 2 to 4 from danish:

error BC2000: Initialization of the compiler failed unexpected:
There is already a reference to the assembly in the project.
Xceed.Wpf.AvalonDock.resources. Cannot add a new reference

I am 110% sure it is the invoke code. If I comment it out, save the code and run it from the UI Robot, I get no error and rest of the code runs fine

Here is what is imported in UI Path Studio, and I guess it is the invoke code and the import list that is colliding some how in the compiled version in UI Robot

Hope some one can help me explain what to do??


Bumping again