![]() |
Languages »
VB.NET »
General
Advanced
Compile VB.NET code without Microsoft.VisualBasic.dllBy Rafael MizrahiCompile VB.NET code without the implicit reference to Microsoft.VisualBasic.dll |
VB, Windows, .NET 1.1, .NET 2.0VS.NET2003, VS2005, Dev
|
||||||||||
|
Advanced Search |
|
|
|
||||||||||||||||
Let's say you are developing a program using Visual Basic.NET (2003 or 2005), and your wish to make sure that your code is using "pure" .NET and VB6 free.
As you all know, Visual Basic.NET enables you to code using VB6 legacy syntax
and keywords. For example CInt, Mid, InStr etc'.
The implementation of that
compatibility layer is at the Microsoft.VisualBasic.dll library.
When compiling your program, using either VisualStudio IDE or the vbc command
line compiler, the Microsoft.VisualBasic.dll is added as a reference, and there
is no direct approach of removing this reference.
The official (and quite not
reasonable) solution to the problem is to add the -sdkpath command line
option to the vbc (you cannot set this option at VB Visual Studio
project)
Copy the .NET Platform assemblies that required by your project
references, into a different directory, and build your program from command
line, having the -sdkpath pointing to that
directory.
(Aough..)
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 1 Aug 2006 Editor: |
Copyright 2006 by Rafael Mizrahi Everything else Copyright © CodeProject, 1999-2009 Web13 | Advertise on the Code Project |