|
-
Jan 15th, 2016, 06:00 AM
#1
Thread Starter
New Member
Some questions about VS2015
Good Morning
Can someone please answer these few questions :
1) Is it possible to convert easily the source code of softwares written with VB2008 into VB2015 ?
2) Is it possible to make with VB 2015 exe files redistributable ?
3) Is it possible to install in a computer (W10) both versions VB2010 and VB2015 ?
4) Is there a free version of VB 2015 ?
Many thanks.
-
Jan 15th, 2016, 08:32 AM
#2
Re: Some questions about VS2015
1. There is generally nothing to do. You can generally open a project created in one version of VS in a later version of VS and simply compile it without issue. VS may need to modify the solution and/or project, depending on the versions but that's usually it. In the rare cases where code changes are required, there's usually not much to it.
2. Yes. In most cases, you simply build your project and that creates the EXE that you deploy. If the application requires other files and/or system changes then an installer may be recommended but often times simply copying the EXE is enough.
3. Yes but, if you want to actually install them then there would have to be some difference between them or else the latter would replace the former. You'd need a difference product code in your installer or the like.
4. Yes. Both the Community Edition and Express Editions are free. Community is basically VS Professional but free under specific circumstances while Express editions are each focused on a specific language or technology and have some other limitations but are free for everyone.
-
Jan 15th, 2016, 09:31 AM
#3
Re: Some questions about VS2015
I'm going to supplment both (1) and (2) with some information that seems to slip some people's minds.
If you are using COM components, ActiveX, or 3rd party DLLs, you need to be prepared to potentially update your code or make some tweaks to your project. There are a few reasons.
One is I'm guessing you're moving to a new machine. When VS 2008 was new, it wasn't too uncommon to still have an x86 machine. .NET is versatile, and for a while defaulted to an AnyCPU setting that meant it would run as an x64 application when the machine could support it. We lost this useful default because COM and other not-.NET libraries are not that versatile, and if your application runs as x64 and tries to use an x86 DLL it will fail.
VS 2015 defaults to x86, which is the most safe option for backwards compatitiblity and guarantees Windows Desktop apps will get to keep behaving like it's 1994. But your project's probably already set to AnyCPU, that was the default for a while. Toggling it to x86 will likely "fix" any COM issues, unless you're already happily running on x64 machines. The better thing to do would be to find the 64-bit versions of your dependencies and dynamically load them from an AnyCPU assembly. But that's effort, and not a lot of people do it.
Similar problems exist with .NET DLLs: if you're using a third-party library, you have to match its CPU architecture or you're going to get weird runtime errors when they're loaded. So pay attention to your target CPU type, and be prepared to change it.
This part isn't "Why'd they botch .NET compatibility", this part is "Why wasn't Microsoft more aggressive about phasing out COM so we could adopt AnyCPU?" .NET was supposed to SOLVE these problems, not carry them forward into the future, but MS was a little to friendly for their own good.
Another potential problem is VS 2008 and VS 2015 use completely different runtimes. They're compatible, and can run on the same machine, but the older runtimes aren't installed by default on Windows 10. So you need to consider checking your project settings post-upgrade to see if it is targeting older versions, and decide what to do about that. This gets more agitating if you are using other .NET DLLs and they aren't built to run on the new runtime. You can mess with your App.Config file and *mostly* *sort of* *safely* tell it to deal, but it's still something you have to test.
That part is a bit of ".NET compatibility was poorly handled". Going forward it should be much better, as of 2013 or so they solved most of the terrible problems. But a disturbing majority still write code in VS 2010 or earlier, so we're going to be seeing these compatibility issues for decades. Lesson for yourself: always target the latest .NET Framework, and push back if you're asked to support an older one. This is impossible if you're dealing with a lot of older machines, which is a disturbing norm in our industry. At least make an effort.
But if you're not using COM/ActiveX, and your external dependencies aren't complex, it's painless. I can't think of any code changes you have to make to go from 2008 to 2015.
Last edited by Sitten Spynne; Jan 15th, 2016 at 09:37 AM.
This answer is wrong. You should be using TableAdapter and Dictionaries instead.
-
Jan 15th, 2016, 10:16 AM
#4
Thread Starter
New Member
Re: Some questions about VS2015
Thank you very much for your fast and very intersting answers to my questions.
I am not a programmer, I was only an electronic engineer and musician, but I have written (in VB 2008 ) and released several softwares for musicians. After I have installed Windows 10 in my computer, some of these softwares no longer work and I am very worried. My goal is not to resume programming in VB2008 or VB2010 but to be able to continue developping these softwares. If I can do it in VB2015 without having to rewrite the entire source code I will be very happy. I do not use COM or ActiveX, so, your kind answer let me believe that VB2015 will be the solution to my problems. Thanks again.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|