Can this be done? I have a copy of Visual Studio 2005, but many of the machines that I need my app to run on are unable to install 2.0 at this time. Is there an option that I can use to fall back to previous versions?
Printable View
Can this be done? I have a copy of Visual Studio 2005, but many of the machines that I need my app to run on are unable to install 2.0 at this time. Is there an option that I can use to fall back to previous versions?
In practice only if you do have VB2003.net
In theory you do not need a designshell at all.
You can write VB in Notepad if you want to:
Example: Launch Notepad and type the following code:
Save it to Test.vb, next open a command window and move to the directory in which you saved the Test.vb fileVB Code:
Module Module1 Sub Main() Dim x As Double, res As Double x = 12.5 res = Add(x, 46.5) System.Console.Write(“The result is “) System.Console.WriteLine(res) End Sub Function Add(ByVal n1 As Double, ByVal n2 As Double) As Double Add = n1 + n2 End Function End Module
Run the VBC compiler and pass it the Test.vb file.
The vbc.exe file is located in this directory:C:\Windows\Microsoft.NET\Framework\vx.y.zzzz
the Visual Basic 2003 compiler:
C:\Windows\Microsoft.NET\Framework\v1.1.4322\vbc Test.vb
But I would not like to do that all the time. There are slight diffrences between 2005 and 2003 for one the way forms are build and that will be a real drag.
It is not possible to develop applications in VS 2005 that target .NET 1.1 as is. This may be of use to you though. I'm not sure of all the details, and it's probably up to you to make sure that you don't use types/members that are new in .NET 2.0.
perhaps you can desribe WHY the target machines can't install the .NET 2.0 framework on them?
Is it strictly a limitation of something like corporate policy? or something else?
jmcilhinney - thanks for the tip. this is just what i needed.
Dnereb - I was not aware that the framework came with a compiler. thanks for the info!
kleinma - why get so angry? they can't install 2.0 and that's that.
I don't think that kleinma is getting angry. It's a quite legitimate question. Some people are under the impression that they can't install .NET 2.0 because it will overwrite previous versions and other apps will stop working. That is simply not the case. To be honest, I can't think of a legitimate reason that someone could install version 1.1 and not 2.0 unless their was some corporate policy that prohibited it. If you or they have some legitimate reason and you tell us then it confirms to us that you're doing the right thing and we're providing sound advice. If you or they are operating under some misconception then we can set you straight and then you wouldn't have to worry. Is this reason some big secret?
Also, I think that you'll find that the compiler is not part of the Framework itself, but rather part of the SDK.
What in my post would make you think I was angry? Was it the WHY in all caps? I was just asking because a lot of times people on here say something can't be done when in fact they either don't know if it can be done, or there is an alternative to what they have already tried that they weren't even aware of.Quote:
Originally Posted by dmaruca
I was just trying to help you out :thumb:
John, (or anyone) please correct me if I am wrong, but I am pretty sure that vbc.exe actually DOES come with just the dotnetfx redist, and not the SDK (although the SDK would include it obviously since it needs the framework in the first place)Quote:
Originally Posted by jmcilhinney
Yea, it was the caps. I probably read the wrong tone of voice into it. No problem!
The software would mostly be used on computers at the college where I go to school at. They only have v1.1 installed on all of the machines there. They have some kind of reset-on-reboot software like deep freeze on every machine. The 2.0 install requires a reboot, so there's just no chance.
It seems that you're quite correct, as was Denereb. Seems strange that that's the case. Surely compiling VB code is Software Development kind of operation.Quote:
Originally Posted by kleinma
Don't forget, .NET uses JIT Compiling now....so maybe that's the reason (albeit a rather dodgy one).
-tg
One interesting point is that it would enable you to write software that compiles .NET code on the fly, perhaps an app that would churn out custom exe's with data embedded inside versus a support xml file or something of that nature.
Your precompiled code is text based and as said there are slight diffrences between the two versions in syntax. You can however build a conversion application (big prioject I guess) or buy 2003.Net (it is sold still alongside 2003.net books) and write most of your code in clases you can export and import between the two versions.
Note: On my development System at home I can install network1.1 but for some reasen 2.0 flunks out (tried to install vb2005.net express numerous times).
Good luck on your project manegment.
Wow thanks for all the great input you guys. Looks like I need to spend some time and research what I want to develop with before I start thinking about the how. Another thing to think about is that a lot of the documentation in vs 2005 is .net 2.0 specific, so I would spend more time sorting through search results I can't use than if I just went with 2003.
I wouldn't worry too much about that. While 2005 is generally a superset of 2003, I have found that the significant parts are pretty much the same, or just slightly different. The difference is nowhere near the same as the IDE difference between .NET and VB6.
Kleinma: It's all in the avatar.