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

TOPIC:

X# program asks for .prg files which are not mine + .Net version question 26 Apr 2021 19:40 #18184

  • ic2's Avatar

  • ic2

  • Topic Author


  • Posts: 938
  • 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:\XSharp\DevRt\Runtime\XSharp.Core\Functions\FileSearch.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:\XSharp\DevRt\Runtime\XSharp.Core\Functions\FileSearch.prg' does not exist.
    Looking in script documents for 'C:\XSharp\DevRt\Runtime\XSharp.Core\Functions\FileSearch.prg'...
    Looking in the projects for 'C:\XSharp\DevRt\Runtime\XSharp.Core\Functions\FileSearch.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

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

    X# program asks for .prg files which are not mine + .Net version question 26 Apr 2021 21:14 #18185

  • robert's Avatar

  • robert


  • Posts: 2174
  • 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

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

    X# program asks for .prg files which are not mine + .Net version question 26 Apr 2021 21:32 #18186

  • ic2's Avatar

  • ic2

  • Topic Author


  • Posts: 938
  • Hello Robert,

    Thanks for the quick reply, but if you mean this, it is checked (unchanged):



    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:\XSharp\DevRt\Runtime\XSharp.Core\Functions\FileSearch.prg' and more.

    Any other idea how to fix this?

    Dick
    Attachments:

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

    X# program asks for .prg files which are not mine + .Net version question 27 Apr 2021 09:37 #18196

  • Terry's Avatar

  • Terry


  • Posts: 228
  • A wild guess - Have you checked Build Order? Dependencies?

    Terry

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

    X# program asks for .prg files which are not mine + .Net version question 27 Apr 2021 11:20 #18197

  • ic2's Avatar

  • ic2

  • Topic Author


  • Posts: 938
  • 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

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

    X# program asks for .prg files which are not mine + .Net version question 27 Apr 2021 14:11 #18207

  • ic2's Avatar

  • ic2

  • Topic Author


  • Posts: 938
  • 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

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

    X# program asks for .prg files which are not mine + .Net version question 27 Apr 2021 16:36 #18210

  • Chris's Avatar

  • Chris


  • Posts: 2495
  • Hi Dick,

    Can you please zip and send this new test solution you created so we can give it a try as well?
    XSharp Development Team
    chris(at)xsharp.eu

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

    X# program asks for .prg files which are not mine + .Net version question 28 Apr 2021 10:58 #18220

  • Terry's Avatar

  • Terry


  • Posts: 228
  • 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

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

    X# program asks for .prg files which are not mine + .Net version question 29 Apr 2021 01:03 #18232

  • ic2's Avatar

  • ic2

  • Topic Author


  • Posts: 938
  • 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

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

    X# program asks for .prg files which are not mine + .Net version question 30 Apr 2021 15:45 #18259

  • Terry's Avatar

  • Terry


  • Posts: 228
  • 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

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

    X# program asks for .prg files which are not mine + .Net version question 03 May 2021 11:35 #18263

  • ic2's Avatar

  • ic2

  • Topic Author


  • Posts: 938
  • Hello Terry,

    Terry wrote: Have done a little digging into what could possibly lie at the root of all this.
    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.


    That is very interesting! Did you retain links to where this has been written?

    It would explain why the project used to debug ok with the same settings earlier.

    I would say it's some kind of corruption in the saved settings file which is triggered by specific code only, as debugging worked with other projects (X# and C#). And also because rebuilding the project didn't help, so it's not in the project itself.

    Dick

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

    X# program asks for .prg files which are not mine + .Net version question 03 May 2021 19:49 #18280

  • Terry's Avatar

  • Terry


  • Posts: 228
  • Hi Dick

    This info came from: Windows Internals Part 1 Seventh Edition (see details Amazon)

    Not exactly those words, but ties up with what I remember reading elsewhere.

    I would agree with what you suggest - corruption in saved settings - and for reasons you suggest.

    Terry

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

    • Page:
    • 1