Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Can Not Compile The GXSerial Csharp Sample

Can not compile the GXSerial csharp Sample

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By minhvc , 27 September, 2012

I have downloaded GXSerial in Gurux Media components. When I open the GXSerial csharp Sample project it have 25 errors. Some of them :

Error 4 'Gurux.Serial.GXSerial' does not contain a definition for 'SendSync' and no extension method 'SendSync' accepting a first argument of type 'Gurux.Serial.GXSerial' could be found (are you missing a using directive or an assembly reference?) C:\Program Files\Gurux\GuruxSerial\GXSerial csharp Sample\Form1.cs 243 35 GXSerial csharp Sample

Error 5 The type or namespace name 'VariantType' does not exist in the namespace 'Gurux.Common' (are you missing an assembly reference?) C:\Program Files\Gurux\GuruxSerial\GXSerial csharp Sample\Form1.cs 243 72 GXSerial csharp Sample

Error 7 'Gurux.Serial.GXSerial' does not contain a definition for 'SendSync' and no extension method 'SendSync' accepting a first argument of type 'Gurux.Serial.GXSerial' could be found (are you missing a using directive or an assembly reference?) C:\Program Files\Gurux\GuruxSerial\GXSerial csharp Sample\Form1.cs 249 35 GXSerial csharp Sample

I have setup installed GXDLMSDirector.exe, and I found
in Gurux.Serial.dll v 7.0.0.3 Gurux.Serial.GXSerial not have SendSync method.
How can I use the sample?

minhvc

13 years 8 months ago

To Mikko, can you help me?

To Mikko, can you help me?

Profile picture for user Administrator

Administrator

13 years 8 months ago

GXSerial sample

Hi,

You are using old 6.0 Serial port sample.
Download new sample here:

gurux.svn.sourceforge.net/svnroot/gurux/GXCom/GXMedias/Gurux.Serial/GXSerial csharp Sample

Download newest source codes from the Medias also.

BR,

Mikko

minhvc

13 years 8 months ago

I have updated the newest

I have updated the newest version and when I compile it have some errors:

Error 10 'Gurux.Common.GXCommon' is inaccessible due to its protection level ....\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 287 38 Gurux.Serial_2008

namespace Gurux.Common
{
internal class GXCommon {}
}
namespace Gurux.Serial
{
class ReceiveThread
{
public bool Receive(ReceiveParameters args)
{
////
terminator = GXCommon.GetAsByteArray(args.Eop);//this error because can not use GXCommon in Gurux.Common
////
}
}
}
we can change internal class GXCommon {} to public class GXCommon ?

minhvc

13 years 8 months ago

When I try public class

When I try public class GXCommon it have errors:
Error 3 'Gurux.Common.GXCommon' does not contain a definition for 'GetAsByteArray' ...\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\Shared\GXSynchronousMediaBase.cs 46 39 Gurux.Serial_2008

Error 4 'Gurux.Common.GXCommon' does not contain a definition for 'IndexOf' ...\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\Shared\GXSynchronousMediaBase.cs 129 43 Gurux.Serial_2008

Error 5 'Gurux.Common.GXCommon' does not contain a definition for 'ByteArrayToObject' ...\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\Shared\GXSynchronousMediaBase.cs 152 36 Gurux.Serial_2008

Error 6 'Gurux.Common.GXCommon' does not contain a definition for 'TraceWriteLine' ....\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 257 55 Gurux.Serial_2008

Profile picture for user Kurumi

Kurumi

13 years 8 months ago

GXSerial sample

Hi,

This sounds strange. I can't find code that is causing problems to you.
Try to download latest version from SVN.
https://gurux.svn.sourceforge.net/svnroot/gurux/GXCom/GXMedias/Gurux.Se…

We updated SVN to newest version and it caused problems, but everything should be OK now.

BR,

Mikko

minhvc

13 years 8 months ago

GXSerial csharp Sample link

GXSerial csharp Sample link Gurux_SVN\GXCom\Gurux.Common\Development project not Gurux_SVN\GXCom\Gurux.Communication\Development
and the newest version of Gurux.Common is Gurux_SVN\GXCom\Gurux.Communication\Development ?

minhvc

13 years 8 months ago

In reply to GXSerial sample by Kurumi

Yes I have updated SVN to

Yes I have updated SVN to newest version. I have found
GetAsByteArray, IndexOf, ByteArrayToObject, TraceWriteLine functions have implementation in GXCommon of Gurux_SVN\GXCom\Gurux.Communication\Development but not in class GXCommon in Gurux_SVN\GXCom\Gurux.Common\Development.
and the GXSerial csharp Sample solution link to Gurux_SVN\GXCom\Gurux.Common\Development not Gurux_SVN\GXCom\Gurux.Communication\Development.
I opended it with GXSerial csharp Sample_2008.sln by VS2008.

minhvc

13 years 8 months ago

At revision: 387 in folder :

At revision: 387
in folder : Gurux_SVN\GXCom\GXMedias\Gurux.Serial\GXSerial csharp Sample
I open GXSerial csharp Sample_2008.sln with VS2008
There are 3 project:
Gurux.Common_2008 project in folder \Gurux_SVN\GXCom\Gurux.Common\Development

Gurux.Serial_2008 project in folder \Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development

GXSerial csharp Sample project in and \Gurux_SVN\GXCom\GXMedias\Gurux.Serial\GXSerial csharp Sample
I rebuil all and it have 12 errors

Error 3 'Gurux.Common.GXCommon' does not contain a definition for 'GetAsByteArray' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\Shared\GXSynchronousMediaBase.cs 46 39 Gurux.Serial_2008
Error 4 'Gurux.Common.GXCommon' does not contain a definition for 'IndexOf' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\Shared\GXSynchronousMediaBase.cs 129 43 Gurux.Serial_2008
Error 5 'Gurux.Common.GXCommon' does not contain a definition for 'ByteArrayToObject' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\Shared\GXSynchronousMediaBase.cs 152 36 Gurux.Serial_2008
Error 6 'Gurux.Common.GXCommon' does not contain a definition for 'TraceWriteLine' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 257 55 Gurux.Serial_2008
Error 7 'Gurux.Common.GXCommon' does not contain a definition for 'IndexOf' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 264 26 Gurux.Serial_2008
Error 8 'Gurux.Common.GXCommon' does not contain a definition for 'GetAsByteArray' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 264 66 Gurux.Serial_2008
Error 9 'Gurux.Common.GXCommon' does not contain a definition for 'TraceWriteLine' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 282 51 Gurux.Serial_2008
Error 10 'Gurux.Common.GXCommon' does not contain a definition for 'IndexOf' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 287 47 Gurux.Serial_2008
Error 11 'Gurux.Common.GXCommon' does not contain a definition for 'GetAsByteArray' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 287 87 Gurux.Serial_2008
Error 12 'Gurux.Common.GXCommon' does not contain a definition for 'GetAsByteArray' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 1455 37 Gurux.Serial_2008
Error 13 'Gurux.Common.GXCommon' does not contain a definition for 'TraceWriteLine' E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\GXSerial.cs 1460 43 Gurux.Serial_2008
Error 14 Metadata file 'E:\Minhvc\ES_MeterReading\Gurux_SVN\GXCom\GXMedias\Gurux.Serial\Development\bin\Debug\Gurux.Serial.dll' could not be found GXSerial csharp Sample

Profile picture for user Kurumi

Kurumi

13 years 8 months ago

Problem solved.

Hi,

As I said before we updated SVN to newest version and it caused problems.
Download latest source codes from Gurux Common.
Everything works after that.

BR,

Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin