Wednesday, March 28, 2012

System.Management

System.Management does not seem to import when I use Visual Web Developer
2005 Express Edition

I put
<%@dotnet.itags.org. Import Namespace="System.Management" %>

in my code. asp page

If I put

Dim objMOS As System.Management.ManagementObjectSearcher

In my vb code, it says that the type is not defined.

Why is this and is there a workaround?"news.orange.nl" <iemand@.microsoft.comwrote in message
news:468d5931$0$63069$dbd4b001@.news.wanadoo.nl...

Quote:

Originally Posted by

System.Management does not seem to import when I use Visual Web Developer
2005 Express Edition


It won't by default...

Quote:

Originally Posted by

In my vb code, it says that the type is not defined.


It will do initially...

Quote:

Originally Posted by

Why is this


Because the System.Management namespace is not part of the default project
template.

Quote:

Originally Posted by

and is there a workaround?


Just add a reference to the System.Management namespace in Project Explorer.

--
Mark Rae
ASP.NET MVP
http://www.markrae.net

0 comments:

Post a Comment