fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Vulcan Runtime example

Vulcan Runtime example 3 years 2 weeks ago #1

Hi,

I tried the 'Vulcan Runtime' example in XIDE and VS2015.

In XIDE worked by:
1. Adding a Reference to VulcanRT (not the VulcanRTFuncs)
2. Using the 'USING':
#USING System
#USING System.Collections.Generic
//#USING System.Linq
//#USING System.Text
//#USING Vulcan
//#USING VulcanRTFuncs
#USING XSharpVulcanTest
//#USING STATIC VulcanRTFuncs.Functions // allows us to use methods of this class as if they were functions

but it wasn't possible to enable the VulcanRTFuncs and use the:
//#USING STATIC VulcanRTFuncs.Functions // allows us to use methods of this class as if
in this case, appears the error:
"error VN2700: expecting ID, found 'STATIC' 13,8 File1.prg XSharpVulcanTest
Build failed"


In VS2015, I succeeded to build the project, (but the result didn't run) with the warning:
1>
Build started: Project: UseVulcan, Configuration: Debug Any CPU
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "VulcanRTFuncs", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
1> UseVulcan -> C:\Users\George\Documents\Visual Studio 2015\Projects\XSharp\UseVulcan\bin\Debug\UseVulcan.exe
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

At that time, I reference also the Vu;canRTFuncs.


Then, I tried to correct it using the XIDE's experience, but now I get:
1>
Build started: Project: UseVulcan, Configuration: Debug Any CPU
1>Program.prg(23,37): error XS0246: The type or namespace name '__VODATE' could not be found (are you missing a using directive or an assembly reference?)
1>Program.prg(23,26): error XS0103: The name 'Today' does not exist in the current context
1>Program.prg(27,29): error XS0246: The type or namespace name '__VODATE' could not be found (are you missing a using directive or an assembly reference?)
1>Program.prg(34,25): error XS0103: The name 'Today' does not exist in the current context
1>Program.prg(34,20): error XS0103: The name 'DTOS' does not exist in the current context
1>Program.prg(39,15): error XS0103: The name 'SubStr' does not exist in the current context
1>Program.prg(43,15): error XS0103: The name 'At' does not exist in the current context
1>Program.prg(47,57): error XS1955: Non-invocable member 'Empty' cannot be used like a method.
1>Program.prg(49,57): error XS1955: Non-invocable member 'Empty' cannot be used like a method.
1>Program.prg(53,15): error XS0103: The name 'Pow' does not exist in the current context
1>Program.prg(57,21): error XS0246: The type or namespace name '__Array' could not be found (are you missing a using directive or an assembly reference?)
1>Program.prg(58,15): error XS0103: The name 'ArrayNew' does not exist in the current context
1>Program.prg(59,10): error XS0103: The name 'AAdd' does not exist in the current context
1>Program.prg(60,10): error XS0103: The name 'AAdd' does not exist in the current context
1>Program.prg(61,10): error XS0103: The name 'AAdd' does not exist in the current context
1>Program.prg(62,64): error XS0103: The name 'ALen' does not exist in the current context
1> XSharp Compilation time: 00:00:03.1294744
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #2

Hi George,

The error message (which starts with "VN") when compiling from XIDE means that it comes from the vulcan compiler, not the X# one. I think you are using a normal app for testing, not a standalone .prg file, is that correct? In this case, you need to open the app properties and set the language of the app to X# (combo box next to the app name). You will also need to set the platform target to x86, use references to both VulcanRT and VulcanRTFuncs and also copy them to the \bin folder, so the app can find and load them at runtime.

For VS, the best way to run the sample(s) is to go to the \Users\Public\Documents\XSharp\Examples folder and just open Examples.sln. Then you can run any of the samples you want without needing to copy/paste code, add references etc, they are already setup. I just tested the vulcan runtime (BYOR) sample, seem to be working fine.

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #3

Chris wrote: For VS, the best way to run the sample(s) is to go to the \Users\Public\Documents\XSharp\Examples folder and just open Examples.sln. Then you can run any of the samples you want without needing to copy/paste code, add references etc, they are already setup.

Chris

Good tip, works a treat. Any chance we might see XIDE learning to read sln? Would make life easier ;)

HAND
Karl

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #4

Hi Karl,

Reading and maintaining it, absolutely not! :-)
But I want to make XIDE be able to read .sln files with its projects and create a XIDE project file which can be used side by side but totally independent of the VS project system. For now, I'll just create a XIDE project file for the X# samples, will send it in the next days.

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #5

Hi Chris,

for the XIDE you are right: the selected language was Vulcan.NET.
Now it works after choosing x86 in properties and selecting X#.

The VS2015 also worked as you described.

thanks
George

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #6

I am also happy for the: using
instead of: #using

as well as for the VAR type and the Generics creation!

regards
George

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #7

Following the X# examples project, I succeded to modify the my most important project Library (referenced by all my projects) from .vnproj targeting .NET 4 to .xsproj.

The project opens correctly, but I cannot build it targeting .NET 4.

Errors:

Severity Code Description Project File Line Suppression State
Error MSB4036 The "CreateXSharpManifestResourceName" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\MSBuild\14.0\bin" directory. Softway.Common C:\Program Files (x86)\MSBuild\XSharp\XSharp.targets 61
Warning MSB3253 The currently targeted framework ".NETFramework,Version=v4.0" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "CrystalDecisions.CrystalReports.Engine, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. Softway.Common C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 1819
Warning MSB3253 The currently targeted framework ".NETFramework,Version=v4.0" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "CrystalDecisions.Enterprise.Framework, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. Softway.Common C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 1819
Warning MSB3253 The currently targeted framework ".NETFramework,Version=v4.0" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "CrystalDecisions.Enterprise.InfoStore, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. Softway.Common C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 1819
Warning MSB3253 The currently targeted framework ".NETFramework,Version=v4.0" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "CrystalDecisions.ReportSource, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. Softway.Common C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 1819
Warning MSB3253 The currently targeted framework ".NETFramework,Version=v4.0" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "CrystalDecisions.Shared, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. Softway.Common C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 1819
Warning MSB3253 The currently targeted framework ".NETFramework,Version=v4.0" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "CrystalDecisions.Windows.Forms, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project. Softway.Common C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 1819



Also, the same error appears when if I select: <inherit from parent or project defaults>.

Please note I don't reference to System.Web at all into my project.
Even I add a reference to it, the same error appears.

regards
George

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #8

I remember that I had the same problem to compile this Library with Vulcan 4 for .NET 4.
Then, I set targeting frameworg 4.5 and it worked.

The problem is the existance of Crystal libraries (.NET 2) that request for the System.Web.
The System.Web cannot anyway be referenced into the project.

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #9

Hi George!

In principle, this should work fine, as I tried creating a CLR2 library that uses classes from the System.Web assembly, then referenced it and used it from a X# project in VS and it worked fine.

I'd suggest doing your test step by step: first just create a small X# project that references some Crystal library and uses something from it. I that works try referencing more, add some of your real code etc. I think this will probably reveal what went wrong with your first attempt, too.

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #10

George,

The "CreateXSharpManifestResourceName" error is correct. This is a task which is included in the XSharp.Targets file but is not implemented (yet) in the XSharp.Build.dll.

I had totally forgotten about this task.

This is the task that generates managed resources for .resx files.
We do not have support for .resx files yet, since that also requires the code generator for the code behind prg.

Did you have an .resx file in your project ?
I am almost certain that this particular error will disappear if you exclude the .resx files.


Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #11

Robert,

I have no .resx file.
I try to compile a small project (attached) without success.

The same project compiles perfectly in XIDE !

regards
George
Attachments:

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #12

George wrote: The same project compiles perfectly in XIDE !

Has anyone successfully "added") the xsprj file?
BTW, Chris, some words of wisdom, please: i see XIDE asks for "*.viprj" files and writes a new made project with the same ending ;), is this be design?

Nevertheless, - selecting "all files", i could click the xsprj, but then got only an icon in the project pane in XIDE, and furthermore, can't "remove" it later on from the list - editing the cpc cured that, but...

Please Log in or Create an account to join the conversation.

Last edit: by FFF.

Vulcan Runtime example 3 years 2 weeks ago #13

Hi Karl,

When George says "the same project compiles in XIDE", he means that similar code works ok, not the same physical project files etc. There's no way no import a project like that in XIDE, there exists some preliminary support for importing VO-style apps only, but this won't work at all in your case, only way is to create a new app and just add (or share) the same files that the VS project uses.

As for the ".viproj" extension (also ".viapp" etc), obviously they are leftovers form the VIDE days :-). I will change them eventually to ".xiproj" etc, just wanted to avoid any issues with existing projects before the first public release. Now that things are less hectic, I'll look into making that change and other planned fixes.

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Vulcan Runtime example 3 years 2 weeks ago #14

>create a new app and just add (or share) the same files that the VS project uses.

the XIDE's share option is just great!

regards
George

Please Log in or Create an account to join the conversation.

  • Page:
  • 1