Home > other >  How to convert project from vb to c#?
How to convert project from vb to c#?

Time:01-10

my question is do I need to convert or make any changes to web.config file of solution (web application) of vb or only if I convert the .vb files to .cs files that will be enough? And if any other changes I have to make or any suggestions please do tell me, this is my first time with vb so I am not that knowledgeable.

CodePudding user response:

Well, you no doubt starting a whole new project from scratch. I would let it create it own web.config. And then say in settings create your conneciton strings etc. (assuming you using settings). And setting up references etc. will also often put assembly references in that web config. You might be able to just copy the whole web config, and do the reverse (remove some things).

I would actually start with a fresh web config, since it would be a chance to leave behind a lot of stuff and things that often get built up over the years. However, I don't really see what the benefits are of spending that money to convert from vb to c#. If I was spending that kind of money, then I would make the jump to mvc and the newer .net stack.

So, you probably can just copy the web config over, but I would take this opportunity to start with a fresh one, and then wind up adding the little bits and parts you need as you convert to c#. That way you wind up with a much cleaner web.config file.

so you can and should be able to just copy the config file over to the new project - but I would not for above reasons.

As noted, I can't see how this cost can be justified unless you migration is to a newer technology anyway.

CodePudding user response:

only changing the code-behind files worked for me, did not change the config file.

  •  Tags:  
  • Related