I'm looking for the code (hopefully in VB.Net) to extract namespaces from a particular DLL.
to get the other info I need, I'm using:
View Complete Post
A couple of days ago I started getting an unusual behavior when compiling Website projects. I have referenced class libraries added to my bin folder that are also correctely referenced in using statements in my aspx.cs code behind. When I compile, I get the
The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?)
error message that would typically be received when the dll has not been added as a reference or added in a using statement.
I can eliminate the error by adding an
In this month's column, learn how to integrate your own My Namespace extension into the Visual Basic development environment using the My Extensibility feature.
MSDN Magazine April 2008
The My Namespace is best described as a speed-dial for the .NET Framework. It provides an intuitive navigation hierarchy that exposes existing .NET functionality through easily understood root objects. Here Duncan Mackenzie explains it all.
MSDN Magazine Visual Studio 2005 Guided Tour 2006
Underlying the My namespace's APIs is a fully extensible architecture you can leverage to customize the behavior of My and to add new services to its hierarchy to adapt to specific application needs. the My namespace is optimized to provide simple solutions to common problems. But if your requirements are different, you can use the My namespace's customization model to modify the behavior of individual My namespace members to meet specific application requirements.
MSDN Magazine July 2005
Extending the Windows shell with namespace extensions allows you to create some custom functionality for Windows Explorer. One common use is to enable Explorer to present a list of items that do not exist in one real folder, but actually reside in a number of places. The view on the folder makes it look like these items are in one place, so managing them becomes easier. This article illustrates the process of creating custom shell namespace extensions using C# and the .NET Framework. The author dispels some myths about the difficulty of writing such extensions, and shows that it is easier than it was before .NET. Along the way he outlines undocumented interfaces and describes advanced techniques for consuming them in .NET.
MSDN Magazine January 2004
MSDN Magazine July 2003
With the much-anticipated release of the .NET Framework 1.1, developers are eager to know what's been added to their programming bag of tricks. In this article, the author focuses on new developments in Windows Forms, such as namespace additions, support for hosting managed controls in unmanaged clients, and designer support for C++ and J#. Integrated access to the Compact Framework and new mobile code security settings also make this release noteworthy. Along with these features, the author reviews the best ways to handle multiple versions of the common language runtime and highlights some potential pitfalls.
MSDN Magazine March 2003
In the .NET Framework, the CodeDOM object model can represent code in a variety of languages. This article examines how source code templates written with the Framework's System.CodeDom and System.CodeDom.Compiler namespaces allow developers to create reusable boilerplate source code that can be shared between projects. Components designed via templates improve productivity and shorten development time.Here C++-style classes and templates are simulated and code is generated in multiple languages through the creation of CodeDOM object graphs. Compiling object graphs and formatting output code are also explained.
Adam J. Steinert
MSDN Magazine February 2003
Printing is an integral part of every complete Windows-based application. Providing robust printing capabilities in these applications has often proved to be a tedious chore. Now, printing from Windows Forms with the .NET Framework means you must adopt a document-centric approach, resulting in cleaner and more manageable code. While the System.Windows.Forms namespace provides seamless integration with all the standard print dialogs (such as Print Preview, Page Setup, and Print), the System.Drawing.Printing namespace offers numerous classes for extensibility and customization. These classes, and how they provide access to printing capabilities, are covered here. Other useful techniques, such as printing in the background to allow the user to continue other tasks, is also explained.
MSDN Magazine May 2001
I am working on a MVC project with Razor view engine and I have the following:
This only works if I have on the same view the following:
However, on my Web.Config I have the following:
<!-- Namespaces -->
So if "SquishIt.Framework" namespace is added on Web.Config why do I need to have the @using on the view?
I have the program as below file folder. Before dbml namespace is OK. But later when I added tables and some stored procedures to the dbml file. The using "SAP.DataContect" cannot be compiled in user.cs due to error: "The type or namespace name 'DataContext' does not exist in the namespace 'SAP.SAP' (are you missing an assembly reference?) "
\Entities\User.cs // In which I have using SAP.DataContext which should refer to the dbml.
I have a web part deployment and development question. Probably newbie questions..
For web parts which will only be used in certain web applications, I can definitely see creating custom CAS policies etc.. and deploying the dll only to the Bin of the Web Application, but what is the best practice for deploying a Farm wide web part that
everyone will use?
I assume it goes in the GAC, and additionally, are there any best practices as far as the namespaces for web parts when they are going into the GAC?
For example, if I go into the Assembly folder and look at all the assemblies in the GAC, is it "okay" to have various globally deployed web part assemblies in there? Like, "MyCustomWebPart" sitting in there with the other sharepoint assemblies?
Seems messy to me, but if these are "one-off" web parts that won't have a bunch of classes within a single namespace, it seems like what needs to be done.
Hopefully that was clear enough!
I'm programatically looking ito a .aspx file and getting the file class name declared in its CodeBehind. For example, when analyzing myFile.aspx I read in its Page Directive and found its CodeBehind equals "myApplication\myPage.aspx.vb". Then I use the code below:
Dim Assm As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom("myApplication\bin\myApplication.dll")
Dim ClassType As Type = Assm.GetType("myApplication\myPage.aspx.vb")
' myBaseType = "myApplication.Forms.BasePage"
Dim myBaseType As System.Type = ClassType.BaseType
Now I want to read the BaseFile (class = myApplication.Forms.BasePage). However, to read in this file, I need I need to get its full path instead of its namespace.class hiearchy. In this case, the BasePage is wrapped in a different namespace declaration thus I cannot just change the '.' to '\' in order to get the path.
How can I get the path of BasePage so I can read it? Thank you - Frank
I have googled this question, but it is pretty specific and hard to find an anwser. I currently follow the MyCompanyName.Namespace pattern for namespaces. The question is this, how does one determine visually that one namespace is a library and the other is an application. For example:
Library of Web Controls: MyCompanyName.Web.UI.WebControls
ASP.Net Application: MyCompanyName.ApplicationName.UI
How does everyone else do this?