Winform 3rd Party assemblies not added to References

This forum is meant for questions and discussions about the X# language and tools
Jamal
Posts: 314
Joined: Mon Jul 03, 2017 7:02 pm

Winform 3rd Party assemblies not added to References

Post by Jamal »

I am using DevExpress components, when I add a control to a C# Winform, VS adds the assemblies automatically to the References list.
In X#, the form shows the control properly however the assemblies are not added to the References list, so for someone like me who got used to C#, I clicked Compile and immediately greeted with the following errors:
4-30-2019 04-04-03 PM.jpg
4-30-2019 04-04-03 PM.jpg (34.45 KiB) Viewed 314 times
Not sure if it's a feature of DevExpress controls or a VS feature to add the assemblies automatically. I think X# should do the same.

C# winform adds referenced assemblies when a control is dragged and dropped on the form like this (example):
4-30-2019 04-11-09 PM.jpg
4-30-2019 04-11-09 PM.jpg (19.88 KiB) Viewed 314 times
Jamal
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

Winform 3rd Party assemblies not added to References

Post by George »

Jamal,

I am also using DevExpress (16.2) with VS2017, X# 2.0.1.0, but I haven't this problem.

The 5 DevExpress references appear after putting a PictureEdit and a SimpleButton on a WinForm..

Also, the licenses.licx automatically contains:
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v16.2, Version=16.2.12.0, Culture=neutral, PublicKeyToken=…

on Form save.

The same exactly test I did with VS2015 and it works correctly.

George
Jamal
Posts: 314
Joined: Mon Jul 03, 2017 7:02 pm

Winform 3rd Party assemblies not added to References

Post by Jamal »

George,

I create a new X# winform project, added DevExpress PictureEdit control, X# this time added DevExpress.XtraEditors.v18.2 reference, but not all required assemblies such as: DevExpress.Utils.v18.2, then clicking Compile gives 12 errors. Some errors are:

Code: Select all

Severity	Code	Description	Project	File	Line	Suppression State
Error	XS0012	The type 'DevExpress.Utils.IImageCollectionHelper' is defined in an assembly that is not referenced. You must add a reference to assembly 'DevExpress.Utils.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a'.	DevExpressWinformTest	C:XporterOutputDevExpressWinformTestForm1.Designer.prg	36	
Error	XS0012	The type 'DevExpress.Utils.Controls.ControlBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'DevExpress.Utils.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a'.	DevExpressWinformTest	C:XporterOutputDevExpressWinformTestForm1.Designer.prg	41	

4-30-2019 05-38-03 PM.jpg
4-30-2019 05-38-03 PM.jpg (79.44 KiB) Viewed 314 times
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

Winform 3rd Party assemblies not added to References

Post by George »

Jamal,

I did exactly the same steps again in a new project.

I pressed the Compile button without saving the WinForm first.
The compilation was successful, then I saw all references was in-place.

I tried both Simple WinForm as well as WinForm with designer file.

Is-it perhaps related to DevExpress 18.2 (I am using 16.2) ?

George
Jamal
Posts: 314
Joined: Mon Jul 03, 2017 7:02 pm

Winform 3rd Party assemblies not added to References

Post by Jamal »

Goerge,

Thanks for testing. It could be that I am using a later version of DevExpress but I have no issues when using C# winforms. Maybe the X# team can take a look. They have a free trial at: https://www.devexpress.com/subscriptions/dxperience.xml

Jamal
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Winform 3rd Party assemblies not added to References

Post by Chris »

Thanks Jamal, will have a look. I have the trial version 17.1 and do not see this problem, but maybe it's only with the newest one. Anything I might need to be careful of when uninstalling 17.1 or installing 18.2?

Also does this problem happen with all DevExpress controls, or with specific ones?
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Jamal
Posts: 314
Joined: Mon Jul 03, 2017 7:02 pm

Winform 3rd Party assemblies not added to References

Post by Jamal »

Chris,

I am not sure about the trial behavior, but I think if the installer find an old version, it updates it.

Now, comparing the X# .xsproj file with the C# csproj, I see differences which might be causing the issues I am seeing:

C#

Code: Select all

<ItemGroup>
    <Reference Include="DevExpress.Data.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
    <Reference Include="DevExpress.Printing.v18.2.Core, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
    <Reference Include="DevExpress.Sparkline.v18.2.Core, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
    <Reference Include="DevExpress.Utils.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
    <Reference Include="DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
    <Reference Include="System" />
    <Reference Include="System.ComponentModel.DataAnnotations" />
    <Reference Include="System.Core" />
    <Reference Include="System.Data.Linq" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
The X# is very verbose and includes so much more XML properties:

Code: Select all

<ItemGroup>
    <Reference Include="DevExpress.Data.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
      <Name>DevExpress.Data.v18.2</Name>
      <SpecificVersion>False</SpecificVersion>
      <AssemblyName>DevExpress.Data.v18.2.dll</AssemblyName>
      <HintPath>....Program Files (x86)DevExpress 18.2ComponentsBinFrameworkDevExpress.Data.v18.2.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="DevExpress.Printing.v18.2.Core, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
      <Name>DevExpress.Printing.v18.2.Core</Name>
      <SpecificVersion>False</SpecificVersion>
      <AssemblyName>DevExpress.Printing.v18.2.Core.dll</AssemblyName>
      <HintPath>....Program Files (x86)DevExpress 18.2ComponentsBinFrameworkDevExpress.Printing.v18.2.Core.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="DevExpress.Sparkline.v18.2.Core, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
      <Name>DevExpress.Sparkline.v18.2.Core</Name>
      <SpecificVersion>False</SpecificVersion>
      <AssemblyName>DevExpress.Sparkline.v18.2.Core.dll</AssemblyName>
      <HintPath>....Program Files (x86)DevExpress 18.2ComponentsBinFrameworkDevExpress.Sparkline.v18.2.Core.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="DevExpress.Utils.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
      <Name>DevExpress.Utils.v18.2</Name>
      <SpecificVersion>False</SpecificVersion>
      <AssemblyName>DevExpress.Utils.v18.2.dll</AssemblyName>
      <HintPath>....Program Files (x86)DevExpress 18.2ComponentsBinFrameworkDevExpress.Utils.v18.2.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="DevExpress.XtraEditors.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
      <Name>DevExpress.XtraEditors.v18.2</Name>
      <SpecificVersion>False</SpecificVersion>
      <AssemblyName>DevExpress.XtraEditors.v18.2.dll</AssemblyName>
      <HintPath>....Program Files (x86)DevExpress 18.2ComponentsBinFrameworkDevExpress.XtraEditors.v18.2.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="mscorlib" />
    <Reference Include="System" />
    <Reference Include="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
      <Name>System.ComponentModel.DataAnnotations</Name>
      <SpecificVersion>False</SpecificVersion>
      <AssemblyName>System.ComponentModel.DataAnnotations.dll</AssemblyName>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <Name>System.Data.Linq</Name>
      <SpecificVersion>False</SpecificVersion>
      <AssemblyName>System.Data.Linq.dll</AssemblyName>
    </Reference>
    <Reference Include="System.Xml" />
    <Reference Include="System.Core" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
  </ItemGroup>
In one reference it, X# lists the wrong version info. I checked the path and that's the only DLL found and it should be 18.2.8.0, which C# includes includes correctly as shown above.

Code: Select all

<Reference Include="DevExpress.XtraEditors.v18.2, Version=18.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
VS in C# flavor adds the following XML properties ONLY if they are updated in the Properties window. For example:

Code: Select all

<Reference Include="DevExpress.Printing.v18.2.Core, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference> 
Basides in C# Specific Version properties defaults to True. In X# it default to False.

Hope this gives some clues.

Jamal
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

Winform 3rd Party assemblies not added to References

Post by George »

Chris,

each version of DevExpress installation is side by side, except for the same major version.
If you upgade from 17.1.5 to 17.1.6 then overwrites the older.
But, for 17.1 and 18.2, they will be present independently.

George
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Winform 3rd Party assemblies not added to References

Post by Chris »

Thanks guys, I tested with DevExpress 18.2 and it seems to be working fine here, same as with 17.1. Jamal, which exact version of VS are you using?
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Jamal
Posts: 314
Joined: Mon Jul 03, 2017 7:02 pm

Winform 3rd Party assemblies not added to References

Post by Jamal »

Chris,

This is my VS info:

Microsoft Visual Studio Professional 2017
Version 15.9.10
VisualStudio.15.Release/15.9.10+28307.557
Microsoft .NET Framework
Version 4.8.03752

X# Visual Studio Project System 2.0.1.0

I will uninstall DevExpress and reinstall. Will report back...

Jamal
Post Reply