Blog Home  Home Feed your aggregator (RSS 2.0)  
The Johnnynine Weblog - .NET
A weblog by Johnny Hughes
 
 Thursday, September 27, 2007

Although there is a relative Reference HintPath in the .csproj file, when you move a solution to a different machine, the hint path may not be correct for that machine.  An easy way to get around this problem is to just ensure that your needed assembly is in the Public Assemblies folder: Program Files\Microsoft Visual Studio .NET\Common7\IDE\Public Assemblies.  Of course this should really only be done when you don't make any changes to the referenced assembly, such as a 3rd party dll.

 

A good summary: http://blogs.msdn.com/manishagarwal/archive/2005/09/28/474769.aspx

 

From: http://msdn2.microsoft.com/en-us/library/8y13ka7c(VS.80).aspx

When the project system finds an assembly reference, it resolves the reference by looking in the following locations, in the following order:

1. The project directory. The project directory files appear in Solution Explorer when Show All Files is not in effect.
2. Directories specified in this dialog box.
3. Directories displaying files in the Add Reference Dialog Box.
4. The project's obj directory. (Any assemblies created as a result of adding a COM reference to your project are added to the project's obj directory.)

From: http://msdn2.microsoft.com/en-us/library/wkze6zky(VS.80).aspx

To display an assembly in the Add Reference dialog box

* Move or copy the assembly to one of the following locations:

o The current project directory (you can find these assemblies using the Browse tab).
o Other project directories within the same solution (you can find these assemblies using the Projects tab).
o The Public Assemblies folder: Program Files\Microsoft Visual Studio .NET\Common7\IDE\Public Assemblies; (you can find these assemblies on the .NET tab).

* Set a reference path to the directory containing the assembly using the Reference Paths Dialog Box (Visual Basic) or the Reference Paths Page, Project Designer (C#, J#).
* Set a registry key that specifies the location of assemblies to display:

Add one of the following registry keys, where <AssemblyLocation> is the directory of the assemblies that you want to appear in the Add Reference dialog box, for example, C:\MyAssemblies\.

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\<version>\AssemblyFoldersEx\MyAssemblies]@="<AssemblyLocation>"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\<version>\AssemblyFoldersEx\MyAssemblies]@="<AssemblyLocation>"

Friday, September 28, 2007 6:49:54 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]   .NET  | 
 Saturday, November 11, 2006
This is a Visual Studio 2003 error that i have received.

To fix this...

1. In the Internet Explorer, select the "Tools" Menu, then select "Internet Options".

2. Select the "Security" Tab in the new window.

3. Select the "Internet" globe icon.

4. Click the "Custom Level..." button at the bottom.

5. Locate the "User Authentication" section (it is at the bottom in IE7).

6. Select "Automatic logon with current username and password".

7. Click "Ok" twice to complete.

Saturday, November 11, 2006 10:03:17 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]   .NET  | 
 Monday, July 25, 2005

I always forget the lifecycle of custom server control classes with respect to web page, ie. aspx file.

The following results are based on a drop down list custom control:

customcontrol - Constructor
customcontrol - OnInit - Enter
customcontrol - OnInit - Exit
webpage - OnInit - Enter
webpage - OnInit - Exit
webpage - Page_Load - Enter
    customcontrol - could be altered here in page load, causing some event to fire
webpage - Page_Load - Exit
customcontrol - OnLoad - Enter
customcontrol - OnLoad - Exit

POSTBACK:

customcontrol - Constructor
customcontrol - OnInit - Enter
customcontrol - OnInit - Exit
webpage - OnInit - Enter
webpage - OnInit - Exit
customcontrol - LoadViewState - Enter
customcontrol - LoadViewState - Exit
webpage - Page_Load - Enter
webpage - Page_Load - Exit
customcontrol - OnLoad - Enter
customcontrol - OnLoad - Exit

customcontrol - OnSelectedIndexChanged - Enter
    webpage - xx_SelectedIndexChanged - Enter
        customcontrol - could be altered here in page load, causing some event to fire
    webpage - xx_SelectedIndexChanged - Exit
customcontrol - OnSelectedIndexChanged - Exit

Tuesday, July 26, 2005 5:39:23 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [4]   .NET  | 
 Tuesday, July 12, 2005

Here is the lifecycle of a Windows Service from .Net

--Clicked Start from gui
Main()
Service1() Constructor
InitializeComponent()
OnStart()
--END Clicked Start from gui


--Clicked Restart from gui (looks just like clicking stop and then start)
OnStop()
Dispose()
Main()
Service1() Constructor
InitializeComponent()
OnStart()
--ENDClicked Restart from gui (looks just like clicking stop and then start)


--Clicked Stop from gui
OnStop()
Dispose()
--END Clicked Stop from gui


--Ran from VS.NET by hitting "Play" button and only calling "(new Service1()).OnStart(args);" from Main().
Main()
Service1() Constructor
InitializeComponent()
OnStart()
Dispose()
--END Ran from VS.NET by hitting "Play" button and only calling "(new Service1()).OnStart(args);" from Main().

Tuesday, July 12, 2005 4:47:35 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]   .NET  | 
Copyright © 2008 Johnny Hughes. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.