Trying to run the default Vulcan sample

Have some feedback and input to share?
Don't be shy and drop us a note. We want to hear from you and strive to make our site better and more user friendly for our guests and members a like.
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

Trying to run the default Vulcan sample

Post by George »

Hi,

today, I downloded the XSharp Public Beta 7 and I created a new VS2015 Project via 'Vulcan Application'.
The compilation was successful but trying to run the compiled App, the attached error appeared.

Alternatively, I changed the Start() function's code with this one:

FUNCTION Start() AS VOID
VulcanLoader.InitVulcan() // required for VO/Vulcan database support

LOCAL a := {} as ARRAY
AADD(a, "One")
AADD(a, "Two")

LOCAL n AS INT
FOR n:=1 upto ALen(a)
Console.WriteLine((string)a[n])
NEXT

Console.WriteLine("Press any key to continue...")
Console.ReadKey()

this code runs without problems.

1. I expected a compiler warning for mixing INT and DWORD (ALen function) in the statement:
FOR n:=1 upto ALen(a)
but finally, not.
Please note I didn't add any compiler switch.


2. Is-there a problem with the statement:
Console.WriteLine("Hello World today is " + (STRING) Eval(cbMacro))
?

regards
George
Program.PNG
Program.PNG (112.88 KiB) Viewed 872 times
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Trying to run the default Vulcan sample

Post by robert »

George,

1) We suppress the errors that you are mixing INT and DWORD for this particular example. This happens a lot in user code

2) The Vulcan template was added "Last minute". There is a problem in the example. Change the codeblock from

cMacro := "{||Today()}"

to


cMacro := "{||DToC(Today())}"

and it should work

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

Trying to run the default Vulcan sample

Post by George »

Thanks Robert

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

Trying to run the default Vulcan sample

Post by George »

Robert,

I guess the X# WinForm is not compatible with the Vulcan WinForm code.

The question is:

Is-there an easy way to import a Vulcan project to XSharp or to change the .vnproj file to .xsproj ?

thanks and regards
George
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Trying to run the default Vulcan sample

Post by robert »

George
I have a cery crude tool that does this. Give me a day or two to tidy that and i will upload iT.

Ok?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

Trying to run the default Vulcan sample

Post by George »

Thank you Robert

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

Trying to run the default Vulcan sample

Post by George »

Hi Robert,

first of all thank you for the quick response: the XPorter is already in the public download area.

I downloaded the XPorter and I tried it in 2 situations:

1. I created a new Vulcan WindowsForms sample then converted it to X#.
The new .xsproj opened without problem and the .sln file saved with a new filename.
Then I quit VS2015 and open it again using the new .sln file.
Tying to compile I got the error explained into the attached:
Compiling xsproj.PNG

2. I run the XPorter for a small sized Vulcan solution, but including 3rd party libraries like DevExpress and a Vulcan DLL created by me (all my programs share this DLL).
Trying to open the .xsproj, I got the error explained into the attached:
Opening xsptoj.PNG

The 2nd case solution file is also attached here.

Now another (3rd !) question:
After installing the X# 0.2.7, I realized that every time I try to press <Enter> at the end of a program's code line into the VS2015 Editor, the attached error appears:
Edit a Vulcan prg.PNG
Please note this side-effect appears only in Vulcan solutions (I tried 3 of my solutions).
Never on empty line nor at the start of any code line.

I already did:
C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDE>devenv /setup
without any chance.

thanks and regards
George
Compiling xsproj.PNG
Compiling xsproj.PNG (59.89 KiB) Viewed 872 times
Opening xsptoj.PNG
Opening xsptoj.PNG (4.89 KiB) Viewed 872 times
CustomersContractsLicenses.xsproj.TXT
(17.1 KiB) Downloaded 140 times
Edit a Vulcan prg.PNG
Edit a Vulcan prg.PNG (3.47 KiB) Viewed 872 times
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Trying to run the default Vulcan sample

Post by robert »

George,

1) This seems to be a problem in your Assemblyinfo.prg. Can you show me that code ?
2) I can reproduce the problem. I will see if I can find the cause of it. That may be a challenge, since I do not have most of the external DLLs that are references in the project file.
3) I assume this is Vulcan 4? Are you also using the VulcanProductivity extension?
Is this a solution with only Vulcan projects or are there also X# projects in the solution?
And if Vulcan and X# are both in the solution, do these projects share the same source files ?

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Trying to run the default Vulcan sample

Post by robert »

George,

I found the cause of the problem for #2: there is a bug in the Ms MPF code that sets dependencies between items and its children.

When a child item (a resx in this case) is located in subfolder (for example Edit Forms in your project) then it looks for the parent item in the main folder of the project and cannot find the parent.
The MPF code does not display a nice error message but simply throws an exception.

I have changed this for the next build:
- It looks in the right folder
- When it fails to find the parent it no longer produces an exception but shows an error message describing the problem.

This fix will be included in the next build.
For now you should be able to work around this by:
- either removing the RESX files from the XSProj file
- Moving all forms and their resx files into the root of the (Vulcan) project and then reconvert the project

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
George
Posts: 106
Joined: Thu Nov 05, 2015 9:17 am

Trying to run the default Vulcan sample

Post by George »

Robert,

Case 2:

>For now you should be able to work around this by:
- either removing the RESX files from the XSProj file
- Moving all forms and their resx files into the root of the (Vulcan) project and then reconvert the project

I confirm that the Project is correctly opened now after moving all the Forms (and other source code files) to the root.
Compiling the converted project (X# now), the following error appears:

C:UsersGeorgeDocumentsVisual Studio 2015ProjectsXSharpProject CustomersContractsLicenses_GlobalVariables.prg(5,27): error XS0434: The namespace 'Softway' in 'Softway.Common, Version=1.5.1.1, Culture=neutral, PublicKeyToken=null' conflicts with the type 'Softway' in 'Softway.Common, Version=1.5.1.1, Culture=neutral, PublicKeyToken=null'

I suppose you already explained why:
> I can reproduce the problem. I will see if I can find the cause of it. That may be a challenge, since I do not have most of the external DLLs that are references in the project file.


Case 1:

>1) This seems to be a problem in your Assemblyinfo.prg. Can you show me that code ?

////////////////////////////////////////////////////////////////////////////////
// AssemblyInfo.prg

#using System.Reflection
#using System.Runtime.InteropServices

//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitleAttribute( "WindowsFormsApplication1" )]
[assembly: AssemblyDescriptionAttribute( "" )]
[assembly: AssemblyConfigurationAttribute( "" )]
[assembly: AssemblyCompanyAttribute( "" )]
[assembly: AssemblyProductAttribute( "WindowsFormsApplication1" )]
[assembly: AssemblyCopyrightAttribute( "Copyright © 2016" )]
[assembly: AssemblyTrademarkAttribute( "" )]
[assembly: AssemblyCultureAttribute( "" )]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisibleAttribute( false )]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: GuidAttribute( "6335bf01-7915-4301-a27d-f98870e60f4b" )]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersionAttribute( "1.0.*" )]
[assembly: AssemblyFileVersionAttribute( "1.0.*" )]


Case 3:

>3) I assume this is Vulcan 4? Are you also using the VulcanProductivity extension?

Yes, it is the last Vulcan 4.
No, I dont't use the VulcanProductivity extension. I remove-it almost since the installation of Vulcan 4 and VS2015 because I had (and still have) many problems (the VS2015 get stuck frequently and restarts) even after the unistallation of VulcanProductivity extension.

>Is this a solution with only Vulcan projects or are there also X# projects in the solution?

Yes. It contains a single Vulcan Project.

>And if Vulcan and X# are both in the solution, do these projects share the same source files ?

I load either the Vulcan or the X# Project. They are 2 different solutions sharing the same source.

thank you for your immediate action.

George
Post Reply