Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
9
Erster Beitrag:
vor 11 Monaten
Letzter Beitrag:
vor 11 Monaten
Beteiligte Autoren:
Ola, Danny Lauwers, Stefan Bentvelsen

[WD21] How to fix missing .NET assemblies?

Startbeitrag von Ola am 18.09.2016 21:52

[WD21] How to fix missing .NET assemblies?

Hi all,

When trying to convert the "WD XMLSign" sample program (from LST103 for WD20. It uses the .NET assemblies supplied with the operating system) to WD21, I get the following errors:

COL_XMLSIGN
Error:The 'cspparameters' type is unknown.
COL_XMLSIGN.XMLDocumentVérifieSignature, Local Procedure, line 13, column 53

The code:
clCSPParamètre is System.Security.Cryptography.cspparameters


Error:The 'RSACryptoServiceProvider' type is unknown.
COL_XMLSIGN.XMLDocumentVérifieSignature, Local Procedure, line 21, column 47

The code:
clCléRSA is System.Security.Cryptography.RSACryptoServiceProvider(clCSPParamètre)


Error:The 'RSACryptoServiceProvider' type is unknown.
COL_XMLSIGN.XMLDocumentSigne, Local Procedure, line 21, column 47

The code:
clCléRSA is System.Security.Cryptography.RSACryptoServiceProvider(clCSPParamètre)


Error:The 'StreamWriter' type is unknown.
COL_XMLSIGN.XMLDocumentSigne, Local Procedure, line 58, column 28

The code:
clWriter is System.IO.StreamWriter(clChaîneXML, Encoding.UTF8)

Error:The 'StreamReader' type is unknown.
COL_XMLSIGN.XMLDocumentSigne, Local Procedure, line 66, column 28

The code:
clReader is System.io.StreamReader(clChaîneXML)


Error:The 'MemoryStream' type is unknown.
COL_XMLSIGN.XMLDocumentSigne, Local Procedure, line 57, column 31

The code:
clReader is System.io.StreamReader(clChaîneXML)


Error:The 'cspparameters' type is unknown.
COL_XMLSIGN.XMLDocumentSigne, Local Procedure, line 13, column 53

The code:
clCléRSA is System.Security.Cryptography.RSACryptoServiceProvider(clCSPParamètre)

I already tried reloading the .NET assemblies, but it didn't help.
How can I fix these?

Best regards
Ola

Antworten:

Ola,

I fixed this kind of problems also when updating a project to V21 by removing the link to the .NET libraries (make note of what libs and version are linked to the project).

Then close the project (or complete WinDev)

Then open the project again and relink the .NET Libraries.

Hope this also works for you !

Normally the "reload .NET libraries" should fix this, but for some reason it does not (bug ?)

Danny

von Danny Lauwers - am 19.09.2016 06:59
Thanks Danny,

As I am a newbie with .NET assemblies, I have to ask:

In Windev I have the following .NET assemblies:

- System.Security
- System.Xml

so I just delete these?

In the system's List of .NET assemblies there are several libraries having the same base name:

- System.Security.ni
- System.Security.resources

- System.Xml.ni
- System.Xml.resources

Do I need to select all of these?

Ola

von Ola - am 19.09.2016 09:08
Ola,

No I only need to select the basic assemblies, so in your case

System.Security
System.XML

Hope this works for you, I have the effect that I have to do this every time when I open the project in Wx21, this was not the case in Wx20 ??

Anybody else know how to fix this permanently ?

Thanks

von Danny Lauwers - am 19.09.2016 10:44
Hi Ola,

I also use .Net libraries im my WinDev software and I have another funny thing.
When I cancel the last generation of my analysis, then it is executed OK, but also one of my .Net libraries is deleted from the project directory. I have to copy it again from elswhere to my project directory before I can fix it in the project.

When fixing doesn't work, I use the same trick as Danny, delete the library from the project-tree and make the link again.

Hope it helps you.

von Stefan Bentvelsen - am 19.09.2016 12:24
Hello Danny and Stefan

Thank you for the hints. But no luck. I deleted the assemblies, closed the project, re-opened it and added the assemblies again, Got the same errors. Plus, after running all the possible project repair and synchronization options I got an additional error:

Error:Ambiguous use of the 'XmlNode' type. Several project types (advanced types of WLanguage, classes of imported .NET assemblies or structured types of Webservice) have this name. Use the full name of the type to use.
FEN_MAIN.PROCEDURE.AfficheXML, Local Procedure, line 30, column 82

The Code:
INTERNAL PROCEDURE XMLConstruitChaînePrettyPrint(xmlElt is a XmlNode, LOCAL nNiveau is int = 0)

This was fixed by adding a "WL." prefix to XmlNode, but the other errors still exist!

I'm not very happy with WD21: my development speed is currently zero.

Best regads
Ola

von Ola - am 19.09.2016 19:19
Ola,

Maybe you need to link the .NET 2.0 assemblies instead of the default 4.x.

You can do this by using the browsing button and go to your windows folder Microsoft.NET, framework, v2.xxxx

"c:\Windows\Microsoft.NET\Framework\v2.0.50727"

And select the System.Security and System.XML, you may need to select system also if you use .NET variables.

Hope you get this working !
Danny

von Danny Lauwers - am 20.09.2016 08:57
Hi,

I had the problem that after linking the .NET assemblies correctly (no compile errors), closing the project and opening it again the .NET errors where back. Even if you closed windev, reopened it etc... I needed to remove .NET assemblies, close project/windev, relink .NET assemblies each time I opened the project to work on.

This was :mad:

Then I copied the .NET assemblies I needed from "c:\Windows\Microsoft.NET\Framework\v2.0.50727" to a subfolder of my project, and then linked these in my Windev 21 Project. Saved all, closed all.

Now I can reload my project without the .NET errors in the code. The .NET linking stays correct now !

Maybe this can also help someone with the same problem.

Danny

von Danny Lauwers - am 20.09.2016 09:03
Danny,

You're the man! That did it! Thank you!

Now, giddy-up WD21, let's ride proudly towards new calamities, disasters and disappointments!:hot:

Best regards
Ola

von Ola - am 20.09.2016 09:54
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.