HighTechTalks DotNet Forums  

Changing project references programmatically

Dotnet General Discussions microsoft.public.dotnet.general


Discuss Changing project references programmatically in the Dotnet General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
chris fellows
 
Posts: n/a

Default Changing project references programmatically - 01-02-2008 , 02:43 PM






Can someone tell me if .NET 2.0 framework has a namespace to enable project
references to be changed programmatically? My C# project files are stored in
source control with DLL references but I want to be create a utility that
changes the DLL references to project references in the project file. This
is so that all of the projects can be run in debug but without having to
manually change the references each time.

Obviously I can use the Xml namespace but I was wondering if there's an
easier way.



Reply With Quote
  #2  
Old   
Robbe Morris - [MVP] C#
 
Posts: n/a

Default Re: Changing project references programmatically - 01-02-2008 , 03:23 PM






Why do you store them in source control with DLL references
instead of project references?

--
Robbe Morris [Microsoft MVP - Visual C#]
AdvancedXL Server, Designer, and Data Analyzer
Convert cell ranges in Excel to rule driven web surveys
http://www.equalssolved.com/default.aspx




"chris fellows" <chrisfellows (AT) nospam (DOT) co.uk> wrote

Quote:
Can someone tell me if .NET 2.0 framework has a namespace to enable
project references to be changed programmatically? My C# project files are
stored in source control with DLL references but I want to be create a
utility that changes the DLL references to project references in the
project file. This is so that all of the projects can be run in debug but
without having to manually change the references each time.

Obviously I can use the Xml namespace but I was wondering if there's an
easier way.



Reply With Quote
  #3  
Old   
chris fellows
 
Posts: n/a

Default Re: Changing project references programmatically - 01-02-2008 , 03:47 PM



Because it is the best solution in our particular circumstances. I'm fully
aware of the pros and cons of both solutions.

"Robbe Morris - [MVP] C#" <info (AT) eggheadcafe (DOT) com> wrote

Quote:
Why do you store them in source control with DLL references
instead of project references?

--
Robbe Morris [Microsoft MVP - Visual C#]
AdvancedXL Server, Designer, and Data Analyzer
Convert cell ranges in Excel to rule driven web surveys
http://www.equalssolved.com/default.aspx




"chris fellows" <chrisfellows (AT) nospam (DOT) co.uk> wrote in message
news:%23dCHHfXTIHA.4440 (AT) TK2MSFTNGP06 (DOT) phx.gbl...
Can someone tell me if .NET 2.0 framework has a namespace to enable
project references to be changed programmatically? My C# project files
are stored in source control with DLL references but I want to be create
a utility that changes the DLL references to project references in the
project file. This is so that all of the projects can be run in debug but
without having to manually change the references each time.

Obviously I can use the Xml namespace but I was wondering if there's an
easier way.





Reply With Quote
  #4  
Old   
Michael Nemtsev [MVP]
 
Posts: n/a

Default Re: Changing project references programmatically - 01-03-2008 , 04:07 AM



Hello chris,

I've seen several time the structure of .cproj file, check codeproject.com
site

having this structure u can easily load this file and change references using
xpath for example

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


cf> Can someone tell me if .NET 2.0 framework has a namespace to enable
cf> project references to be changed programmatically? My C# project
cf> files are stored in source control with DLL references but I want to
cf> be create a utility that changes the DLL references to project
cf> references in the project file. This is so that all of the projects
cf> can be run in debug but without having to manually change the
cf> references each time.
cf>
cf> Obviously I can use the Xml namespace but I was wondering if there's
cf> an easier way.
cf>



Reply With Quote
  #5  
Old   
Robbe Morris - [MVP] C#
 
Posts: n/a

Default Re: Changing project references programmatically - 01-03-2008 , 09:43 AM



I know of no other way than manipulating the project files
manually. Peter Bromberg (EggHeadCafe) has written this sort of stuff.

http://www.eggheadcafe.com/articles/20030425.asp

--
Robbe Morris [Microsoft MVP - Visual C#]
AdvancedXL Server, Designer, and Data Analyzer
Convert cell ranges in Excel to rule driven web surveys
http://www.equalssolved.com/default.aspx




"chris fellows" <chrisfellows (AT) nospam (DOT) co.uk> wrote

Quote:
Because it is the best solution in our particular circumstances. I'm fully
aware of the pros and cons of both solutions.

"Robbe Morris - [MVP] C#" <info (AT) eggheadcafe (DOT) com> wrote in message
news:%232ZYh1XTIHA.2000 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
Why do you store them in source control with DLL references
instead of project references?

--
Robbe Morris [Microsoft MVP - Visual C#]
AdvancedXL Server, Designer, and Data Analyzer
Convert cell ranges in Excel to rule driven web surveys
http://www.equalssolved.com/default.aspx




"chris fellows" <chrisfellows (AT) nospam (DOT) co.uk> wrote in message
news:%23dCHHfXTIHA.4440 (AT) TK2MSFTNGP06 (DOT) phx.gbl...
Can someone tell me if .NET 2.0 framework has a namespace to enable
project references to be changed programmatically? My C# project files
are stored in source control with DLL references but I want to be create
a utility that changes the DLL references to project references in the
project file. This is so that all of the projects can be run in debug
but without having to manually change the references each time.

Obviously I can use the Xml namespace but I was wondering if there's an
easier way.






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.