|
| Iniciado por Wilfried.Boes, 13,may. 2010 23:27 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 13,mayo 2010 - 23:27 |
I'am testing WinDev 12 Express with .Net assemblies
When I try to add a W-language eventhandler to a .Net event, compilation is OK but when I run the code, an error occurs on the add_Event call.
THe error is very strange because it suggests that WinDev runtime tries to load a .Net assembly with the name of the application directory.
Thanks for any suggestion.
Wilfried
The code:
dlg is object VCmdCallbackEventHandler dynamic = DotNetDelegate("VCmdCallback", "VivaUtils.VCmdCallbackEventHandler") cb is object VCmdCallback dynamic = new VCmdCallback() cb:add_Event(dlg)
The error
Error at line 52 of Click Days process. Unable to create <CWLDelegate_void_VCmdCallbackEventHandler_object_VIVA03_D_VI_TagList> object (<> assembly) Unable to open <F:\WinDev Projects\EXPRESS_My_Project\Exe\> assembly Error returned by .NET Framework: System.IO.FileNotFoundException: Could not load file or assembly 'file:///F:\WinDev Projects\EXPRESS_My_Project\Exe\' or one of its dependencies. The system cannot find the file specified. File name: 'file:///F:\WinDev Projects\EXPRESS_My_Project\Exe\' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at CDotNetLoader.vpiLoadAssembly(CDotNetLoader* , SByte* pszFileName, CXError* pclErreur)
=== Pre-bind state information === LOG: User = DEMOS\User LOG: Where-ref bind. Location = F:\WinDev Projects\EXPRESS_My_Project\Exe\ LOG: Appbase = file:///F:/WinDev 12 Express/Programs/ LOG: Initial PrivatePath = NULL Calling assembly : (Unknown). === LOG: This bind starts in LoadFrom load context. WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load(). LOG: No application configuration file found. LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Attempting download of new URL file:///F:/WinDev Projects/EXPRESS_My_Project/Exe/. ERR: Failed to complete setup of assembly (hr = 0x80070002). Probing terminated.
Technical Information
Project : EXPRESS_test3
Dump error of module <WD120NET2.DLL> <12.00Be>.
- WL Call: Processing <EXPRESS_Window1.Days>, line <52>, thread <0>
- Level: fatal error (EL_FATAL)
- Error Code: 200007
- WD55 Error Code: 0
- No system error code
- No system error message
- What happened? Unable to create <CWLDelegate_void_VCmdCallbackEventHandler_object_VIVA03_D_VI_TagList> object (<> assembly) Unable to open <F:\WinDev Projects\EXPRESS_My_Project\Exe\> assembly Error returned by .NET Framework: System.IO.FileNotFoundException: Could not load file or assembly 'file:///F:\WinDev Projects\EXPRESS_My_Project\Exe\' or one of its dependencies. The system cannot find the file specified. File name: 'file:///F:\WinDev Projects\EXPRESS_My_Project\Exe\' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at CDotNetLoader.vpiLoadAssembly(CDotNetLoader* , SByte* pszFileName, CXError* pclErreur)
=== Pre-bind state information === LOG: User = DEMOS\User LOG: Where-ref bind. Location = F:\WinDev Projects\EXPRESS_My_Project\Exe\ LOG: Appbase = file:///F:/WinDev 12 Express/Programs/ LOG: Initial PrivatePath = NULL Calling assembly : (Unknown). === LOG: This bind starts in LoadFrom load context. WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load(). LOG: No application configuration file found. LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Attempting download of new URL file:///F:/WinDev Projects/EXPRESS_My_Project/Exe/. ERR: Failed to complete setup of assembly (hr = 0x80070002). Probing terminated.
- No debug information
- Attached Information: EIT_PILEWL : Click Days (EXPRESS_Window1.Days), ligne 52 EIT_COMPOSANT :
EIT_DATEHEURE : 13/05/2010 14:42:29
- Identifier in .err: 200007
-------------------------------------- Sub-error #1 --------------------------------------
Dump error of module <WD120NET2.DLL> <12.00Be>.
- Level: fatal error (EL_FATAL)
- Error Code: 200007
- WD55 Error Code: 0
- No system error code
- No system error message
- What happened? Unable to open <> assembly Error returned by .NET Framework: System.ArgumentException: String cannot have zero length. at System.Reflection.AssemblyName..ctor(String assemblyName) at System.Reflection.Assembly.LoadWithPartialNameInternal(String partialName, Evidence securityEvidence, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadWithPartialName(String partialName) at CDotNetLoader.vpiLoadAssemblyFromGAC(CDotNetLoader* , SByte* pszFileName, CXError* pclErreur)
- No debug information
- No attached information
- Identifier in .err: 200007
-------------------------------------- Sub-error #2 --------------------------------------
Dump error of module <WD120NET2.DLL> <12.00Be>.
- Level: fatal error (EL_FATAL)
- Error Code: 200007
- WD55 Error Code: 0
- No system error code
- No system error message
- What happened? Unable to open <> assembly Error returned by .NET Framework: System.ArgumentException: String cannot have zero length. at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at CDotNetLoader.vpiLoadAssemblyWithFullPath(CDotNetLoader* , SByte* pszFileName, CXError* pclErreur)
- No debug information
- No attached information
- Identifier in .err: 200007
-------------------------------------- Sub-error #3 --------------------------------------
Dump error of module <WD120NET2.DLL> <12.00Be>.
- Level: fatal error (EL_FATAL)
- Error Code: 200007
- WD55 Error Code: 0
- No system error code
- No system error message
- What happened? Unable to open <> assembly Error returned by .NET Framework: System.ArgumentException: String cannot have zero length. at System.Reflection.AssemblyName..ctor(String assemblyName) at System.Reflection.Assembly.LoadWithPartialNameInternal(String partialName, Evidence securityEvidence, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadWithPartialName(String partialName) at CDotNetLoader.vpiLoadAssemblyFromGAC(CDotNetLoader* , SByte* pszFileName, CXError* pclErreur)
- No debug information
- No attached information
- Identifier in .err: 200007 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 30,enero 2012 - 14:22 |
Same problem here just that it happens only in the project configuration for a Windows Service, the normal client configuration does not throw the error and works fine. Even if the windows service is executed as an application the error persists. There are no differences between the project configurations except of course one is "windows service" and the other one is "windows executable", same build folders, different install folders. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 30,enero 2012 - 14:29 |
One more observation: - When the cleint configuration is generated a .dll library with the same name as the executable is also created. For the Windows Service executable this file is not created, if the .dll form the cleint isntallation is copied to the service installation and renamed to "executable_name".dll the assembly is found and loaded.
What is this dll sicne the actual assembly used by the project is a completly different dll always present in all instalations? |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 2 mensajes |
|
| Publicado el 01,mayo 2019 - 12:26 |
I have the same problem using WinDev 22.
MyDelegate = DotNetDelegate(Glb_MsSqlJournalNotifications.WL_OnJournalChanged, "WLCallback") gives:
Dump of the error of 'wd220net4.dll' module (22.0.9.0). Identifier of detailed information (.err): 200007 Debugging information: System.ArgumentException: String cannot have zero length. at System.Reflection.AssemblyName..ctor(String assemblyName) at System.Reflection.Assembly.LoadWithPartialName(String partialName) at CDotNetLoader.__pclLoadAssemblyFromGAC(CDotNetLoader* , Char* pszFileName, CXError* pclErreur) |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 2 mensajes |
|
| Publicado el 02,mayo 2019 - 11:09 |
Problem solved: In Visual Studio when creating a class library one should opt to create a .NET Framework Class Library - not .NET standard Class Library.
BR, Rene |
| |
| |
| | | |
|
| | | | |
| | |
|