Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.1k views
in CompleteFTP by (340 points)
Hi,
I installed the trial version of CompleteFTP and wrote some File system extensions with reference to Windows Azure dll. I used .net framework 4.0. After adding the extension, I tried to create folder and it gave me an error \"System.BadImageFormatException: This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.\" I cannot debug the code as well.

Then I tried the examples which is framework 2.0 and they worked well. By converting them to 3.5 and 4.0 they stopped working.

So Is there a way I can add higher .net framework reference in my project? Does CompleteFTP support extensions using .net framework 3.5 or higher?

Thanks in advance.

3 Answers

0 votes
by (161k points)
Yes, you can do this by editing the CompleteFTPService.exe.config file. The trick is to remove the following line:

<supportedRuntime version="v2.0.50727" />

leaving only the other supportedRuntime element as follows:

<startup>
<supportedRuntime version="v4.0" />
</startup>

(Add the v4.0 line above if that isn't in your release).
0 votes
by (340 points)
Yes, you can do this by editing the CompleteFTPService.exe.config file. The trick is to remove the following line:

<supportedRuntime version="v2.0.50727" />

leaving only the other supportedRuntime element as follows:

<startup>
<supportedRuntime version="v4.0" />
</startup>

(Add the v4.0 line above if that isn't in your release).


Thanks for the reply. It still didn't work now, I'm not sure if it's because of the way I did it.

I found the file and deleted the line, it won't let me save. Then I stopped FTP service and restarted the server, still wouldn't save. Finally I copied the file somewhere else, did the change, and replaced the original one with admin permission.

Then I tried to create folder in CompleteFTP it showed the same error. I realized maybe the config file is not used, so I opened it and now I can do whatever I want and save the file. Even if I delete the config, server can start/stop with no problem, but it seems to be using .net 2.0 still.

I think it's something I did wrong but don't have a clue. Thanks for your help!
0 votes
by (340 points)
Oh sorry, my version is not exactly 4, it's v4.0.30319.

Now it works when I rebuild my project with .net 3.5.

Categories

...