X# program asks for .prg files which are not mine + .Net version question

This forum is meant for questions and discussions about the X# language and tools
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

X# program asks for .prg files which are not mine + .Net version question

Post by ic2 »

I decided to move all my X# projects + the supporting C# DLL project into 1 solution like I have (for most projects) everything in 1 repository in VO.

Now something weird happens. I added one project (it resides in a different directory) as existing project, it compiled.

But when I run it in the debugger (because the exe crashed when copying it into production) this happens:

1 In the call stack, I see [external code]. No idea why
2 After a few lines, this line:

IF File(cFile)
stops the debugging ans asks for FileSearch.prg (see extra info below). When I continue a few lines further it asks for string.prg.

What is wrong here (still using 2.7)

Locating source for 'C:XSharpDevRtRuntimeXSharp.CoreFunctionsFileSearch.prg'. Checksum: SHA1 {68 4f 6c d7 be 81 5a 14 b6 89 2e 56 d3 7a 53 92 80 f2 ef 3a}
The file 'C:XSharpDevRtRuntimeXSharp.CoreFunctionsFileSearch.prg' does not exist.
Looking in script documents for 'C:XSharpDevRtRuntimeXSharp.CoreFunctionsFileSearch.prg'...
Looking in the projects for 'C:XSharpDevRtRuntimeXSharp.CoreFunctionsFileSearch.prg'.
The file was not found in a project.

Second question is:

I included 3rd party DLL ChilkatDotNet47.dll. VS warns that I need to set the .Net version to 4.7, the .Net version of this lib. Fair enough (I don't see 4.8 as an option but understood that I may need to install .a NET Framework 4.8 Developer Pack).

What I want to know is: what happens with the exe and what happens with the DLL from this solution when I use them in a <4.7 environment? I saw one of our clients has an updated Server 2016 but runs .Net 4.6 while a client with a Server 2012 runs .Net 4.8. No idea why, we can have it fixed at the client, but I wonder:

1 Does the 4.7 targeted exe not start and/or does the program crash when a 4.7 targeted DLL function is called in a 4.6 environment?
2 or will it only fail when a specific 4.7 method is used which is not present in <.Net 4.7?

Dick
User avatar
robert
Posts: 4529
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

X# program asks for .prg files which are not mine + .Net version question

Post by robert »

Dick,
First question:
In the Debugger Options in VS: make sure that the checkbox for "Just My code" is selected.
If you do not select that checkbox then VS will try to debug the X# runtime DLLs
Second question:
I am not completely sure, but I think that the app will not start on a < 4.7 framework.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

X# program asks for .prg files which are not mine + .Net version question

Post by ic2 »

Hello Robert,

Thanks for the quick reply, but if you mean this, it is checked (unchanged):
VsDebugOptions.jpg
VsDebugOptions.jpg (11.61 KiB) Viewed 684 times
I haven't changed or updated anything. The only thing I tried to do is add an existing project to another solution. But even when I I restore the january version of the solution and run it from the original solution, VS keeps asking me for 'C:XSharpDevRtRuntimeXSharp.CoreFunctionsFileSearch.prg' and more.

Any other idea how to fix this?

Dick
TerryB1
Posts: 306
Joined: Wed Jan 03, 2018 11:58 am

X# program asks for .prg files which are not mine + .Net version question

Post by TerryB1 »

A wild guess - Have you checked Build Order? Dependencies?

Terry
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

X# program asks for .prg files which are not mine + .Net version question

Post by ic2 »

Hello Terry,
Terry wrote:A wild guess - Have you checked Build Order? Dependencies?
It took me some time to find these options. I also have the problem in the original solution which has just one project and hence the Project Dependencies & Build Order options aren't even present in the right mouse menu from the Solution. So that's not the problem either.

I can add that I didn't change any VS settings; another X# project can be debugged without VS stopping to ask for X# source .prg's.

I really have no idea what causes these troubles. I do know that Visual Studio causes more time consuming trouble in 1 year than VO since it came out.

Dick
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

X# program asks for .prg files which are not mine + .Net version question

Post by ic2 »

And to add one thing more: I've recreated a new X# WPF project and replaced the code with the existing code, and the project settings.

Unfortunately I've got the same result. The program is running in Debug mode and I've cleared the cache ( Tools-Options-Debugging-Symbols and click ‘Empty Symbol Cache’).
I can't think of what caused this and especially because I can debug without this problem in other programs, also X#. So any suggestion is welcome.

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

X# program asks for .prg files which are not mine + .Net version question

Post by Chris »

Hi Dick,

Can you please zip and send this new test solution you created so we can give it a try as well?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
TerryB1
Posts: 306
Joined: Wed Jan 03, 2018 11:58 am

X# program asks for .prg files which are not mine + .Net version question

Post by TerryB1 »

Looks to me as if what you are seeing is more to do with the behind the scenes logic of "What to do if a file is not found" ie Red Herrings.

I'd be tempted to try putting your "different directory project" into your "existing project directory"

Terry
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

X# program asks for .prg files which are not mine + .Net version question

Post by ic2 »

Hello Chris, Terry,

I already went back to the existing project directory with no result. But I have solved it, this is what I did:

1 I've copied the project to another Pc (with a quite old VS 2019 on it). I debugged and it did not ask for X# prg files. Even after I unchecked Enable Just My Code!
2 I compared every single option from Debugging with that Pc. Apart from 1 or 2 new additions not present in the older VS they were all the same.
3 I updated VS to the latest version. Same problem.
4 Settings -> Tools -> Import and Export Settings -> Reset all settings fixed it!
5 I re-imported the settings I started with from my previous Pc in January on my new Pc. Problem was back. Note that I did not change any of the options, or updated VS in the meantime, and that debugging has worked without this issue until a few days back. Debugging again asked for X# source prg's.
6 I repeated step 5+6 but this time, after pointing to the January export, I expanded Options and deselected Debugging options. All my settings were back and the problem was gone.
7 I also updated the other Pc's VS (note that Check for Updates said it was up to date, with a January 2019 version, but fortunately the VS Installer was a bit smarter). This Pc has the same settings imported. I've compared every single setting from Debugging with both Pc's and they were 100% the same (compared to importing all my settings, including Debug). But yet, on my main Pc it started asking for X# source all of a sudden and it does work normally again after importing untouched and always working settings but skipping Debug settings. No single setting is different but it works....

Visual Studio keeps giving me unpleasant surprises.

Dick
TerryB1
Posts: 306
Joined: Wed Jan 03, 2018 11:58 am

X# program asks for .prg files which are not mine + .Net version question

Post by TerryB1 »

Hi Dick
Have done a little digging into what could possibly lie at the root of all this. It is clearly an unacceptably long way of having to do things and quite incompatible with the concept of Rapid Application Development.

I cannot be sure, but it appears that the Windows SDK that is included with Visual Studio may not always be totally compatible with the latest Windows Upgrade. Instead, it’s header files may retain compatibility with that version of Windows which was current when the earlier version of VS was released.

If I am right, I haven’t a clue what to do about it, so I’ll leave that to you.:)

Just be prepared for future surprises, I guess.:(

Terry
Post Reply