Namespace / Project Design General

May 14, 2009

I'm trying to make more use of namespaces and giving my project a more rigorous design, as it has been getting pretty messy.I was wondering,before I get started, is there a standard convention for the names and organization of namespaces?For instance,for a 3-tier program, should there always be a "UI", "Business",and "DataAccess" namespace (and is this what they're typically called)?Or should I just organize the project as I see fit?

View 2 Replies


ADVERTISEMENT

DB/Reporting :: General Approach To A Db Project?

Sep 8, 2010

DB/Reporting :: General approach to a db project

View 2 Replies

Use MultiLineStringEditor Class From System.Design Namespace?

Feb 20, 2010

Me need use MultiLineStringEditor Class from System.Design namespace.I add reference as file (as in the .NET tab, it no) from

c:Program FilesReference AssembliesMicrosoftFramework.NETFrameworkv4.0System.Design.dll

and Visual Studio show in References

System.Design.dll
.NET
0.0.0.0
False

<The system cannot find the reference specified>

View 1 Replies

C# - Dll Reference Of One Project Into Another Project - Error Of "Type Or Namespace Name Could Not Be Found"

Apr 25, 2011

I have 2 projects, one built in VB.NET and another in C#.NET. I want to use certain functionality of VB.NET into C#.NET and hence I have added the dll file of VB.NET solution into C#.NET as a reference by browsing the dll from my system. Say dll name for VB.NET is myData.dll. In my C#.NET project I am trying to declare it as a namespace i.e. "using myData;" and its giving me an error of "Type or namespace name could not be found"

View 1 Replies

.net - Reference 2 Dlls Using The Same Namespace In 3.5 Project?

Jun 29, 2011

I have a vb.net 3.5 class library project that needs to reference two assemblies that have the same namespace. We have two third party dll's in which one is version 5.1 and the other is version 6.1. They have the same dll filename and they utilize the same namespace and functions/class names. The project needs to use one or the other depending on a specific situation. I've investigated up on a c# process that uses the "extern alias" feature to pull in the different assemblies.

[URL]

What use is the Aliases property of assembly references in Visual Studio 8.It seems that this feature isn't fully available for vb.net. Things I've Tried I've renamed the 2nd dll and added both references to my project. At this point I get tons of: 'blah' is ambiguous in the namespace. So I need to alias the different versions. In vb.net you can do aliases on an imports statement like:

Imports version5 = Somedll.Something

The problem is I can't setup an assembly reference alias for the different versions of the dll. Apparently in vb.net you can't set these up in the reference properties window. So I tried setting them in in my project file like this:

<Reference Include="somedll.5.Navigation">
<HintPath>....UtilityThirdPartyDLLSsomedll.5.dll</HintPath>
<Aliases>SomeDLL5</Aliases>

[code]....

I would then expect this to work:

Imports version5 = SomeDLL5.Something
Imports version6 = SomeDLL6.Something

But the "SomeDLL5/6" doesn't show up in intellisense. So how can I reference both dll's in the same project?

View 3 Replies

Using Namespace To Assess Property Of Another Project

Jan 3, 2010

I want to use project B property in project A. Hence, I added project B to my solution. How can i use the property of B? Can someone guide me? i'm new to vb.net..To my knowledge, we need to use namespace and create a new instance. Could someone guide me on how to use namespace for this purpose?

View 1 Replies

.net - Make A Namespace To Be Viewed By All Project Without Necessary Imports?

May 11, 2011

I'm developing an web application using VB.Net, and I would like to know, if is there any way to make a namespace to be viewed by all project without necessary Imports?

View 1 Replies

VB - Root Namespace In The Domain Project Is Blank

Feb 10, 2010

I have an VS2008 solution with 2 projects, WebUI and Domain; WebUI references domain. The Root Namespace in the WebUI project is:MyCompany. MyProjectName.WebUI. The Root Namespace in the Domain project is blank. (Namespaces are manually declared for all classes). So everything has been working fine, until I tried to reference a class in Domain via a fully qualified path: [Code]

Does this make any sense? So, then I cleared my WebUI Root Namespace, and voila, the fully qualified declaration then does work. However, doing this then seemed to invalidate the registration of all my user controls on my pages. The only thing that seemed to solve this was in the codebehind of each user control, manually add a namespace of MyCompany.MyProjectName.WebUI. which might make sense as perhaps the namespaces of the pages somehow had still retained the root namespace value. But, if I was to create a brand new aspx page and drop a user control on (this is before manually adding the namespace), even that page couldn't properly register it. Yet, the user control properly rendered in design view. so the VS UI seemed to be able to properly resolve it, but the compiler seemingly can't.

So from what I can tell, I can at least get things to work by manually wrapping user controls in the proper namespace. Why this is necessary for aspx pages, that have no namespace specified, to see the user controls, seems to make no sense. Is there some fundamental principle I am misunderstanding??

View 2 Replies

VB 2008 - Setting Root Namespace Name Of A Project

Feb 9, 2009

I VB 2005 you can set the root namespace name of a project under the project properties. Where can I set this using VB2008?

View 4 Replies

Import Project Namespace Into A View In Order To Use The Custom?

Jun 20, 2012

I am trying to create a custom LabelFor helper to apply by default instead of the standard LabelFor helper include in System.Web.Mvc.Html. I want my LabelFor to take model properties that are PascalCase and make a label that appears as multiple words. For example the property FirstName would appear as "First Name".

I found this post that shows how to make a custom LabelFor helper that allows the addition of html attributes. I recreated this helper in VB.Net and modified it to do what I want, but I am not able to get it to work.

[Code]...

The sample includes this Module in Namespace System.Web.Mvc.Html but when I add the namespace declaration to this module everything in the rest of the project goes haywire. For example, each of my models has a Primary Key property that is a Guid datatype and as soon as I add the namespace above to the module, I get several errors stating that System.Guid is not defined among other similar errors.

I've tried to import my project namespace into a view in order to use the custom helper, but then I get an error that says Overload resolution failed because no 'LabelFor' is most specific for these arguments.I am trying to avoid having to specify a DisplayName for every PascalCase property I have in many models.

View 1 Replies

Program To Create A Class Outside The Default Project Namespace?

Dec 5, 2009

Is that possible to create a class in vb.net that is not in the default namespace of the project?

for example, say you have a project call sample1, then automatially IDE will have everything default to the Sample1 as your namespace root rather than under global, which is find for most case.but I want to create some classes that is directly under global namespace

View 7 Replies

IDE :: Project No Longer Recognises XML Documentation, And Does Not Access Namespace Correctly

Sep 30, 2010

I've just picked up a project from someone who has recently left our company, and the project file for the project has somehow had XML documentation deactivated. Typing ''' no longer automatically creates XML documentation segments, and existing XML documentation within the code does not show up in Intellisense, and is also not correctly highlighted as XML documentation.

In addition, the Intellisense for the My. namespace contains only MySettings, Resources and Setting under the "All" tab. Everything else is missing. Attempting to manually write My. namespace code results in compile errors. These are not problems with the IDE; I can start a new project and both Intellisense and My. work fine in these new projects. I can only assume that this is something which has been set on the project itself.

View 3 Replies

Import System.ServiceProcess Namespace Into WPF Project Not Showing In CodeSense?

Mar 4, 2009

how can I import the System.ServiceProcess namespace into a WPF project in VB.net (not C#)? The ServiceController object is not in the toolbox in VS2008 and can't see to figure it out. Any ideas? If that particular namespace cannot be imported into WPF projects, could somebody suggest another way of controlling windows services from a WPF application? I know this framework is focused more on multimedia apps, but would really like to switch over some of my tools to WPF.

View 2 Replies

Programatic Access To Project's Application Root Namespace Properties?

Jan 25, 2010

How does one gain programatic access to the information that is entered into the "My Project" properties Application section?I am able to pick up the assembly name from those properties, but I haven't been able to pick these up.Below is the line of code that makes me interested in picking this up programatically. I have found that if the name within the quotes for Sections (GenConfig) doesn't match exactly what is entered in those properties, I will get an application error during run time.How do I reference that property?Is there a better way to pick that value up?

Dim applicationSettingsSection As ClientSettingsSection = config.SectionGroups("applicationSettings").Sections("GenConfig.My.MySettings")

View 4 Replies

Adding 1st Explictly Named Namespace To A Project Breaks The Use Of Implicit (i.e. Global) Namespaces?

Sep 27, 2010

I am working on a solution that does not name namespaces in code files. Instead it uses the root name space of the project (which is the same across all assemblies). Basically there is only one implicit namespace.

Well, I am trying to isolate some code so that I can run FxCop against it. I explicated named the code file with a namespace to do this. This works for FxCop, but it bricks the entire solution.Visual Studio is now asking me to prefix all uses of the implicit namespace with Global. So instead of:

[Code]...

View 1 Replies

Add Image To Project Resource In Design Time?

Dec 15, 2011

I'm creating a custom button . when user select a image file for button image i want to add it to the project resource (in design time) .

View 8 Replies

IDE - Creating A Project Shows Only Code In The Design Tab

Jun 16, 2009

I'm having some problem with VB project in visual studio 2008, when I open or create a new project in VB only code is displayed in the design tab but no GUI and toolbox is greyed out.

View 3 Replies

VS 2008 - How To Get Design Back When Editing Project

Oct 3, 2009

I reopened my project to edit it but it is only showing the code not the design I cant get it back how do I do it?

View 3 Replies

Copied Project To New Computer But Can't Open Design View

Jul 22, 2011

I have a project I built in VB 2010 Express Edition. I copied the project's folder to a flash drive, pasted it into the visual studio 2010 projects folder on a different computer, and opened it with VB 2010 Express Edition on that computer. I can view the code, but when I try to open the design view, I get the following error:

[Code]...

View 6 Replies

Design View Of Form In 2010 Winforms Project?

Apr 27, 2012

Is there a shortcut to get to the designview form in a winforms project in visual studio 2010.F7 will take you to code behind class form and shift + F7 will take you to design mode. Is there a shortcut to filename.designer.cs formWhere you have the control definitions, delegates (for click event etc). defined. I go to the form often if I change the name of click event etc.I have to go through solution explorer and click on the file. Is there a shortcut like F7 that opens the designer.cs file?

View 1 Replies

VS 2008 Hangman Project Part 1 - Display Form1.vb In Design View

Apr 3, 2011

2. Display Form1.vb in design view.

3. List the controls by the Name property and the control names, if any, that are not descriptive.

4. Change the Text property of the form to "Hangman."

5. Change the FormBorderStyle property to Fixed3D.

6. Explain why the form should not be resizable.

7. Change the Font of lblWord to Size 12 Bold.

8. Reposition lblWord so that its left edge is aligned with the left edge of the PictureBox picBody (the box in the center of the form).

9. Add code to the btnExit_Click event procedure to close the form, and exit the application by calling the form's Close method.

10. Add code to the btnNew_Click event procedure to:

[Code]...

View 17 Replies

Adding Namespace Attribute To XElement - Prevent Blank/empty Namespace On Child Elements?

Mar 17, 2011

I need to read an xml document from a database record into an XDocument object in order for it to be deserialized. So that the deserialization will work, I need to apply a specific namespace to each of the level 1 elements. So XML looks a bit like this:

[Code]...

How do I prevent the blank/empty namespace being added to each child element of the element to which the required namespace has been applied?

View 1 Replies

Possible To Move The "Auto-Complete.vb" File Out Of The App_Code Folder And Into A New Namespace/project?

Nov 17, 2009

When setting up the Ajax Control Toolkit's AutoComplete control, it creates an utoComplete.asmx and a AutoComplete.vb file. The AutoComplete.vb file automatically ends up in the App_Code folder. I was hoping to move all of these styled-classes into a separate namespace, but the compiler simply does not dig it. Is this possible, or must it be within the presentation layer to access the "Web" related namespaces?

View 1 Replies

.net - The System.Linq.Dynamic Namespace - Visual Studio Does Not Recognize In The Project Files The System.XXX References

Aug 11, 2011

I would use the System.Linq.Dynamic. I added the specified Dynamic.vb file, that starts like this:

[Code]...

to my (VB.NET)solution. Now Visual Studio does not recognize anymore in the project files the System.XXX references, proposing me to change them to Global.System.XXX

View 1 Replies

Error BC30464: Namespace Or Type'Compatibility' In The Project-level Imports 'Microsoft.VisualBasic.Compatibility' Cannot Be Found

Jan 16, 2009

I've started to use a Vista machine for development. In case it is significant: I'm using MSBee so that I can code in the Visual Studio 2005 IDE while still building against the 1.1 framework.On the Vista machine, when I tried to build a particular vb project, I got this error:

error BC30464: Namespace or type'Compatibility' in the project-level Imports 'Microsoft.VisualBasic.Compatibility' cannot be found.

The same project built fine on my old XP machine. I checked in this folder on my Vista machine:

C:windowsmicrosoft.netFrameworkv1.1.4322

...and sure enough, "Microsoft.VisualBasic.Compatibility.dll" was missing. So was "Microsoft.VisualBasic.Compatibility.Data.dll". Copying them from my XP machine to my Vista machine allowed me to build the project successfully.I'm just a bit puzzled as to why this happened. Why was "Microsoft.VisualBasic.Compatibility.dll" missing? I'm also not very comfortable with my chosen solution - copying the DLL manually. It works, but surely there must be a better way.

As far as the configuration:

Vista:
.Net Framework 1.1
.Net Framework 1.1 SP1
.Net Framework 1.1 SDK

[code]....

View 1 Replies

ERROR : 'Namespace' Can Occur Only At File Or Namespace Level

Jan 29, 2012

Imports System.Windows.Forms

ERROR : 'Namespace' can occur only at file or namespace level

View 5 Replies

Type Or Namespace Name 'Messaging' Does Not Exist In Namespace 'System

Apr 10, 2010

The type or namespace name 'Messaging' does not exist in the namespace 'System' (are you missing an assembly reference?)

View 2 Replies

System Namespace Conflict With Sibling Namespace

Nov 16, 2011

This class is located in the namespace Acme.Infrastructure.Interface.A class with the same name EventArgs exists in the System namespace.In another project in my solution I have a class Acme.BusinessModules.MyModule.MyClass.When attempting to use the EventArgs class I have to fully qualify the class name or the compiler thinks I am using the System.EventArgs class.My understanding of namespace resolution was that the compiler would first look for the class in the current namespace, and then its parents. It seems that the compiler checks in System before it checks in sibling namespaces. Is it correct that System is checked before the sibling? Or is this behaviour caused by other issues (Imports order?)?

View 1 Replies

'Namespace' Statement Must End With A Matching 'End Namespace'?

Dec 8, 2011

I am getting this error,here is my code.

Public Class Sample2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button1.Click

[Code]....

View 4 Replies

Css - Design A Webpage In Asp.net Design View Which Support Multi Resolution?

Nov 26, 2010

I have created my webpage in asp.net in 1024*768 resolution, my problem was that when i change my monitor resolution then the controls in my webpage will be displayed in unmanaged manner .

How to arrange items in my webpage which support multiple resolution ...

Whatever the resolution of my monitor the controls in my webpage will display as it is as managed in 1024*768 reolution !

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved