why relative hint path but absolute reference path

Visual Studio .Net

    Next

  • 1. httphandler error
    everything was going along fine...then i got this error... what causes this and what can i do about it? Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The module 'HTTPHandler' is already in the application and cannot be added again Source Error: Line 7: <system.web> Line 8: <httpModules> Line 9: <add name="HTTPHandler" type="DotNetNuke.HTTPHandler, DotNetNuke"/> Line 10: </httpModules> Line 11: <!-- set debugmode to false for running application --> Source File: C:\imSMARTframework\imSMART\web.config Line: 9 ----------------------------------------------------------- --------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
  • 2. About Class View
    When I code my program with WTL, the class view will fail to handle some macro from WTL, for example: BEGIN_MSG_MAP_EX(CPlayerView) MSG_WM_CREATE( OnCreate ) MSG_WM_SIZE( OnSize ) END_MSG_MAP() LRESULT OnCreate( LPCREATESTRUCT lpCreateStruct ); void OnSize( UINT unSize, CSize sizeNew ); the class view will treat BEGIN_MSG_MAP_EX(CPlayerView) MSG_WM_CREATE( OnCreate ) MSG_WM_SIZE( OnSize ) as function but not list LRESULT OnCreate( LPCREATESTRUCT lpCreateStruct ); void OnSize( UINT unSize, CSize sizeNew ); Then how can i information VS about it to get a correct class view? Thanks! xiaorun huang
  • 3. Can you filter private members in "Class View"?
    The "Class View" in VS.NET seems rather cluttered with all the private members in there. Is there a way to filter them out and have it just show public members? What about collapsing the class hierarchy? I'm using original VS.NET to program C#. Thanks, John
  • 4. Help--my UserControl uses auxiliary files and Visual Studio designer can't find them!
    I have a UserControl that has to use some other files in the same directory as the .dll. This works fine in all modes except when I try to add my UserControl to the Visual Studio component toolbox and then try to add my UserControl to an application in design mode. I know why it's happening: when you add a toolbox UserControl component to an application in Visual Studio's design mode, Visual Studio actually copies the UserControl's .dll file to a temporary runtime directory named something like: C:\Documents and Settings\<username>\Application Data\Microsoft\VisualStudio\7.1\ProjectAssemblies\abcdefgh01\ So if I try to reference the loaded .dll's directory, I get this temporary directory instead of one that I can control the contents of, i.e. add my referenced auxiliary files to. I figure there are two basic approaches to solving this problem: 1. get Visual Studio to copy my auxiliary files to that temporary directory or 2. get Visual studio to use my actual permanent .dll directory. But I can't figure out how to do either. Any help would be appreciated! Thanks, Quoner
  • 5. How do I mark the page "dirty" in my ComponentDesigner?
    I have implemented a System.ComponentModel.Design.ComponentDesigner for my component which has a number of verbs for editing my component (and sometimes other components on the page). My problem is that the VS.NET 2003 form designer does not always recognize that the form has changed. (It lets me exit without saving and does not serialize the chages to code when I switch to the code view.) What is the proper way to do this? If possible, I would like my actions to be "undo-able" as well. Thanks, Steve

why relative hint path but absolute reference path

Postby gerry » Thu, 23 Sep 2004 23:12:16 GMT

I have a vs.net 2002 solution that contains a number of projects
All projects are created in folders under the solution folder.
The idea here is that this entire solution should be 'moveable' ie. copied
to and useable from a new directory or computer.
And it almost is.

One project makes reference to an existing .net dll that also exists in a
folder under the solution folder.
The project file shows a relative hint path to the dll ie
"..\..\dllFolder\my.dll"
If I move the solution to a new folder and the open solution from the new
location, the dll can no longer be found.  if i restore the original
solution folder, the dll is once again found.  so obviously, although the
project file includes a relative hint path, vs.net is in fact looking for
the dll at an absolute location.  This is causing headaches as this solution
cannot be 'passed around'  without re-adding the reference to this dll.

is there some setting somewhere to get the relative path used ?
there does not seem to be any problem using relative project references - is
there some trick using a dummy project to get this to work ?

gerry







RE: why relative hint path but absolute reference path

Postby v-garych » Fri, 24 Sep 2004 15:55:19 GMT

Hi gerry,

is there some trick using a dummy project to get this to work ?

How do you reference that existing .net dll in your project, by wizard?
If so, the wizard appears to use an absolute path to locate the .NET 
assembly.

For using a project, I think if you have that .net dll's project, you can 
copy that project directory into your solution directory and add that 
project to your current solution, then reference the project... 


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------


Re: why relative hint path but absolute reference path

Postby gerry » Sat, 25 Sep 2004 02:31:16 GMT

Hi Gary ,
thanks for the reply
i add the reference by right clicking the project in solution explorer and
selecting add reference and then browse to the dll.
there is no project for this particular dll, it is generated manually using
jbimp.







references -
rights.



Re: why relative hint path but absolute reference path

Postby v-garych » Sat, 25 Sep 2004 15:48:53 GMT

Hi gerry,

and selecting add reference and then browse to the dll.
using jbimp.

Since you don't have the .NET dll's generic project, using a project 
reference appears to be impossible...


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------


Re: why relative hint path but absolute reference path

Postby v-garych » Tue, 28 Sep 2004 11:08:07 GMT

Hi gerry,

Would you please give us an update of this issue?
If you have any more concerns on it, please feel free to post here.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------


Re: why relative hint path but absolute reference path

Postby gerry » Wed, 29 Sep 2004 08:32:09 GMT

basically , we are forced to re-add the dll reference when the solution is
moved/copied/passed around.








rights.



Re: why relative hint path but absolute reference path

Postby v-garych » Thu, 30 Sep 2004 18:00:34 GMT

Thanks for your response, gerry,


.. it appears the only workaround under this scenario.


Good Luck!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------


Re: why relative hint path but absolute reference path

Postby v-garych » Fri, 01 Oct 2004 17:57:17 GMT

Hi gerry,

Additionaly, the project's reference file should use the absolute path such 
as:
 <References>
                <Reference
                    Name = "System"
                    AssemblyName = "System"
                    HintPath 
="C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
                />
..

And the project include files would use the relative path to locate:
<Files>
            <Include>
                <File
                    RelPath = "App.ico"
                    BuildAction = "Content"
                />
..

So do you make sure the referenced DLL file use a relative path in the 
.csproj file?


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------


Re: why relative hint path but absolute reference path

Postby gerry » Fri, 01 Oct 2004 23:58:29 GMT

Hi Gary ,

VS.NET is creating all paths in the project file as relative , including the
references.

the .csproj.user does contain absolute paths in ReferencePath - I suppose if
we don't distribute this file then new references would only have to be
added once per machine rather than after every update.

gerry






such
rights.



Re: why relative hint path but absolute reference path

Postby yhhuang » Wed, 06 Oct 2004 16:02:18 GMT

Hi Gerry,

When you need to use a type (such as a class or structure) contained in 
another assembly, you must set a reference to that assembly. This creates 
an assembly reference within the client assembly's manifest that identifies 
the name and version of the dependency. Visual Studio .NET supports two 
types of references: project references and file references.

The Projects page within the Visual Studio .NET Add Reference dialog box 
lists all of the other projects in the current solution. This allows you to 
create a project reference to another project in the same solution. Project 
references are the recommended way to set references because they offer 
many advantages.
(Note   Project references are the main reason you should adopt a single 
solution or partitioned single solution model wherever possible.)

If you can't use a project reference because you need to reference an 
assembly outside of your current solution's project set, you must set a 
file reference. The following are the two ways to set a file reference: 

To reference a .NET Framework assembly, you select the assembly from the 
list displayed on the .NET tab of the Add References dialog box. 
You can use the Browse button in the Add Reference dialog box. 
If you set a file reference, the path to the assembly is stored in the 
source controlled project file. A relative path is stored for local 
assemblies, while the full network path is stored for server-based 
assemblies, as 

For your scenario, there may be some solutions. Please refer to the 
following link for all existing good ways:
 http://www.**--****.com/ 
tdlg_ch4.asp
The information in this link helps you: 
Manage dependencies and references between projects and solutions. 
Work with dependencies on .NET assemblies, Web services, databases, 
serviced components, and COM Interop libraries. 

Hope that helps.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure!  www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
- http://www.**--****.com/ 
p&SD=msdn 

This posting is provided "AS IS" with no warranties, and confers no rights.


Re: why relative hint path but absolute reference path

Postby yhhuang » Fri, 08 Oct 2004 10:29:41 GMT

Hi Gerry,

Do you have any more concerns on this issue? If there is any unclear on the 
materials that I posted, please feel free to reply here. We are closely 
monitoring the issue thread.

Thanks very much.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure!  www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
- http://www.**--****.com/ 
p&SD=msdn 

This posting is provided "AS IS" with no warranties, and confers no rights.


Similar Threads:

1.why relative hint path but absolute reference path

I have a vs.net 2002 solution that contains a number of projects
All projects are created in folders under the solution folder.
The idea here is that this entire solution should be 'moveable' ie. copied
to and useable from a new directory or computer.
And it almost is.

One project makes reference to an existing .net dll that also exists in a
folder under the solution folder.
The project file shows a relative hint path to the dll ie
"..\..\dllFolder\my.dll"
If I move the solution to a new folder and the open solution from the new
location, the dll can no longer be found.  if i restore the original
solution folder, the dll is once again found.  so obviously, although the
project file includes a relative hint path, vs.net is in fact looking for
the dll at an absolute location.  This is causing headaches as this solution
cannot be 'passed around'  without re-adding the reference to this dll.

is there some setting somewhere to get the relative path used ?
there does not seem to be any problem using relative project references - is
there some trick using a dummy project to get this to work ?

gerry



2.Get machine name path from relative or absolute path

Hello, is it possible in C#.Net to get a path to a file in the form
"\\Spain\Madrid\readme.txt" from a relative path i.e "readme.txt" or
from a absolute path in the following form "C:\Madrid\readme.txt" where
"Spain" is the name of the machine that the file is on? Thanks in
advance.

3.absolute path to relative path conversion

4.Absolute or Relative path?

5.Relative & absolute path question (JavaScript, mostly)

6. User controls --> Relative/Absolute Paths

7. Absolute url from relative path

8. Absolute and relative paths in applicaiton



Return to Visual Studio .Net

 

Who is online

Users browsing this forum: No registered users and 22 guest