Is there any way to create an import alias that applies
to the entire project? For example, lets say that I
want "VB" to represent Microsoft.VisualBasic throughout
my entire project. Is there any way to do this without
adding "Imports VB = Microsoft.VisualBasic" to the top of
each file in the project?
Thanks. 7 2633
Hi Lance,
That's an interesting idea but I think the answer's no. There's precious
little systax for playing with namespaces. Maybe someone'll contradict me and
teach us both something ? :-)
If you want this facility because it's a pain in the bum having to enter
one or more aliases for all your projects, you could write macros to get the
IDE to insert them when you create a new Form, Class, Module, etc.
Regards,
Fergus
Yes, ther is a way.
in Project->properties, u have an option (in the treeview left side) call
"Imports" (down to "Build").
there u can set global import for the project
(like u was type it on all assemblies separatly)
h.i.h
Yair
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:e4*************@tk2msftngp13.phx.gbl... Hi Lance,
That's an interesting idea but I think the answer's no. There's
precious little systax for playing with namespaces. Maybe someone'll contradict me
and teach us both something ? :-)
If you want this facility because it's a pain in the bum having to
enter one or more aliases for all your projects, you could write macros to get
the IDE to insert them when you create a new Form, Class, Module, etc.
Regards, Fergus
Hi Yair,
I was going to shout Hurray!! but when I tried to use an alias, it didn't
work. :-(
Regards,
Fergus
Yep, I originally tried to use "VB =
Microsoft.VisualBasic", but it didn't work. -----Original Message----- Hi Yair,
I was going to shout Hurray!! but when I tried to
use an alias, it didn'twork. :-(
Regards, Fergus
.
Hi Lance,
I think you can not achieve your aim in the The Imports, Common Properties,
<Projectname> Property Pages Dialog Box.
The Imports, Common Properties, <Projectname> Property Pages Dialog Box is
used to Specifies the namespaces to import for the project. The imports you
specify in this dialog box are passed directly to the compiler (/imports)
and apply to all files in your project. http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxurfimportstab-projectpropertiespage.asp
While the /imports can not accept an alias. http://msdn.microsoft.com/library/de...us/vblr7/html/
valrfImportImportNamespaceFromSpecifiedAssembly.as p
You may try to access the Imports Object programmatically.
Here is a sample link. http://msdn.microsoft.com/library/de...us/vbcon/html/
vxlrfvslangprojimports.asp
If you have any related question, please feel free to let me know.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
-------------------- Content-Class: urn:content-classes:message From: "Lance" <zi***@hotmail.com> Sender: "Lance" <zi***@hotmail.com> References: <3a****************************@phx.gbl>
<e4*************@tk2msftngp13.phx.gbl>
<#K*************@TK2MSFTNGP11.phx.gbl>
<#f*************@TK2MSFTNGP09.phx.gbl>Subject: Re: Project wide Import Alias Date: Sun, 7 Sep 2003 22:32:06 -0700 Lines: 17 Message-ID: <36****************************@phx.gbl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft CDO for Windows 2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Thread-Index: AcN1yoralU3iEwXxRU684DoD/C/Rxg== Newsgroups: microsoft.public.dotnet.languages.vb Path: cpmsftngxa06.phx.gbl Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:135362 NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 X-Tomcat-NG: microsoft.public.dotnet.languages.vb
Yep, I originally tried to use "VB = Microsoft.VisualBasic", but it didn't work.
-----Original Message----- Hi Yair,
I was going to shout Hurray!! but when I tried to use an alias, it didn'twork. :-(
Regards, Fergus
.
Great links. Thank you! -----Original Message----- Hi Lance,
I think you can not achieve your aim in the The Imports,
Common Properties,<Projectname> Property Pages Dialog Box. The Imports, Common Properties, <Projectname> Property
Pages Dialog Box isused to Specifies the namespaces to import for the
project. The imports youspecify in this dialog box are passed directly to the
compiler (/imports)and apply to all files in your project. http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/vsintro7/html/vxurfimportstab-projectpropertiespage.asp
While the /imports can not accept an alias. http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/vblr7/html/valrfImportImportNamespaceFromSpecifiedAssembly.a sp
You may try to access the Imports Object
programmatically.Here is a sample link. http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/vbcon/html/vxlrfvslangprojimports.asp
If you have any related question, please feel free to
let me know. Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and
confers no rights. --------------------Content-Class: urn:content-classes:message From: "Lance" <zi***@hotmail.com> Sender: "Lance" <zi***@hotmail.com> References: <3a****************************@phx.gbl> <e4*************@tk2msftngp13.phx.gbl> <#K*************@TK2MSFTNGP11.phx.gbl> <#f*************@TK2MSFTNGP09.phx.gbl>Subject: Re: Project wide Import Alias Date: Sun, 7 Sep 2003 22:32:06 -0700 Lines: 17 Message-ID: <36****************************@phx.gbl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft CDO for Windows 2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Thread-Index: AcN1yoralU3iEwXxRU684DoD/C/Rxg== Newsgroups: microsoft.public.dotnet.languages.vb Path: cpmsftngxa06.phx.gbl Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.vb:135362NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 X-Tomcat-NG: microsoft.public.dotnet.languages.vb
Yep, I originally tried to use "VB = Microsoft.VisualBasic", but it didn't work.
-----Original Message----- Hi Yair,
I was going to shout Hurray!! but when I tried to use an alias, it didn'twork. :-(
Regards, Fergus
.
.
Hi Lance,
I am glad that I can offer your useful information.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
-------------------- Content-Class: urn:content-classes:message From: "Lance" <zi***@hotmail.com> Sender: "Lance" <zi***@hotmail.com> References: <3a****************************@phx.gbl>
<e4*************@tk2msftngp13.phx.gbl>
<#K*************@TK2MSFTNGP11.phx.gbl>
<#f*************@TK2MSFTNGP09.phx.gbl>
<36****************************@phx.gbl>
<wX**************@cpmsftngxa06.phx.gbl>Subject: Re: Project wide Import Alias Date: Tue, 9 Sep 2003 21:08:34 -0700 Lines: 89 Message-ID: <5d****************************@phx.gbl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft CDO for Windows 2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Thread-Index: AcN3UTO1irY4qUnQTiOJQ0ZGmxDewg== Newsgroups: microsoft.public.dotnet.languages.vb Path: cpmsftngxa06.phx.gbl Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:136181 NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165 X-Tomcat-NG: microsoft.public.dotnet.languages.vb
Great links. Thank you!
-----Original Message----- Hi Lance,
I think you can not achieve your aim in the The Imports, Common Properties,<Projectname> Property Pages Dialog Box. The Imports, Common Properties, <Projectname> Property Pages Dialog Box isused to Specifies the namespaces to import for the project. The imports youspecify in this dialog box are passed directly to the compiler (/imports)and apply to all files in your project. http://msdn.microsoft.com/library/default.asp? url=/library/en-us/vsintro7/html/vxurfimportstab-projectpropertiespage.asp
While the /imports can not accept an alias. http://msdn.microsoft.com/library/default.asp? url=/library/en-us/vblr7/html/valrfImportImportNamespaceFromSpecifiedAssembly. asp
You may try to access the Imports Object programmatically.Here is a sample link. http://msdn.microsoft.com/library/default.asp? url=/library/en-us/vbcon/html/vxlrfvslangprojimports.asp
If you have any related question, please feel free to let me know. Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and
confers no rights. --------------------Content-Class: urn:content-classes:message From: "Lance" <zi***@hotmail.com> Sender: "Lance" <zi***@hotmail.com> References: <3a****************************@phx.gbl> <e4*************@tk2msftngp13.phx.gbl> <#K*************@TK2MSFTNGP11.phx.gbl> <#f*************@TK2MSFTNGP09.phx.gbl>Subject: Re: Project wide Import Alias Date: Sun, 7 Sep 2003 22:32:06 -0700 Lines: 17 Message-ID: <36****************************@phx.gbl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft CDO for Windows 2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Thread-Index: AcN1yoralU3iEwXxRU684DoD/C/Rxg== Newsgroups: microsoft.public.dotnet.languages.vb Path: cpmsftngxa06.phx.gbl Xref: cpmsftngxa06.phx.gblmicrosoft.public.dotnet.languages.vb:135362NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 X-Tomcat-NG: microsoft.public.dotnet.languages.vb
Yep, I originally tried to use "VB = Microsoft.VisualBasic", but it didn't work.
-----Original Message----- Hi Yair,
I was going to shout Hurray!! but when I tried to use an alias, it didn't work. :-(
Regards, Fergus
.
.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: TokiDoki |
last post by:
Hello there,
I have been programming python for a little while, now. But as I am
beginning to do more complex stuff, I am running into small organization
problems.
It is possible that what I...
|
by: Sean Jorden |
last post by:
I am re-creating some VC6 projects to VC7 to take advantage of the new file
structures, etc.. and I am having great difficulty trying to import an
external IDL into my project.
In VC6, you had a...
|
by: FS Liu |
last post by:
Hi,
In my current ATL server project, I have to parse the
input in the client application's request to find out
the different combination of parameters, instead of
using SOAP. For this reason,...
|
by: Jason Jacob |
last post by:
To all
I've written an ActiveX Dll project using VB6.
I've named the project as and the Project Description
is
I've compiled the dll successfully, the name of the dll is...
|
by: Frank Rizzo |
last post by:
Is there a way to create a web service project that has a proper project
file (e.g. csproj), instead of having it be file based where whatever
happens to be in the directory magically becomes part...
|
by: Anubhav Jain |
last post by:
Hi,
I am having few .net source files(.cs or .vb) and I want to dynamically generate the corresponding .net project file(.csproj or .vbproj) for them without using visual studio.So that I could...
|
by: Martin Unsal |
last post by:
I'm using Python for what is becoming a sizeable project and I'm
already running into problems organizing code and importing packages.
I feel like the Python package system, in particular the...
|
by: nisp |
last post by:
Hi all !
I'm trying to capture stderr of an external module I use in my python
program. I'm doing this
by setting up a class in my module overwriting the stderr file object
method write.
The...
|
by: =?Utf-8?B?cnNvbWFzdW5kYXI=?= |
last post by:
Hi,
I got the following error while trying to run the project in ASP.Net 2003 to
one of my application in my machine. I think some where im loosing the IIS
configurations.
Error Detail:...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |