#1
|
|||
|
|||
CS0246 Error – Assembly Reference Issue
Good day. I searched the forum without finding anything that pertains to my issue. The problem that I have is with my references with VS.NET 2003. We have a standard build tree but the very prefix changes on whether the build is a developer’s build, hourly, weekly, production. For example:
D:\Hourly.product.2.7.23.09\project A\component A D:\Hourly.product.2.7.23.09\project A\component B D:\Hourly.product.2.7.23.09\project A\component C D:\Hourly.product.2.7.23.09\project A\component D D:\Hourly.product.2.7.23.09\project B\component E D:\Hourly.product.2.7.23.09\project B\component F D:\Hourly.product.2.7.23.09\project B\component G D:\Hourly.AddIn.2.7.23.09\project C\component E D:\Hourly.AddIn.2.7.23.09\project C\component F All works well if the references are located in the same parent project (i.e. Product). However, when I add a reference to an external project (i.e. AddIn) the IDE adds a hard-code reference to the project’s HintPath. D:\Hourly.product.2.7.23.09\project A\component A D:\Hourly.product.2.7.23.09\project A\component B D:\Hourly.product.2.7.23.09\project A\component C D:\Hourly.product.2.7.23.09\project A\component D D:\Hourly.product.2.7.23.09\project B\component E D:\Hourly.product.2.7.23.09\project B\component F D:\Hourly.product.2.7.23.09\project B\component G [References Component E from AddIn.<version>Project C and fails] D:\Hourly.AddIn.2.7.23.09\project C\component E D:\Hourly.AddIn.2.7.23.09\project C\component F [component G csproj snipit] <Reference Name = "AddIn.Component E" AssemblyName = " AddIn.Component E" HintPath = "dmytchak.2.7\ AddIn.Component E\bin\Release\ AddIn.component E.dll" <- problem – dmytchak2.7 is my build tree. Build box is Hourly, Weekly, Prod/Label /> <Reference Name = "Project A.Component A" AssemblyName = " Project A.Component A HintPath = "..\ Project A.Component A \bin\Release\Component A.dll" /> Since it looks like VS.NET does not support variables in the csproj files, Does Kinook offer a solution? |
#2
|
|||
|
|||
Maybe project references [1] would help here? Otherwise, perhaps you could use the Replace in File action (or some script that uses MSXML [2]) to fix up your project files as needed before building.
[1] http://msdn.microsoft.com/library/de...l/tdlg_ch3.asp [2] http://www.kinook.com/Forum/showthread.php?threadid=427 |
#3
|
|||
|
|||
Thanks for the reply. I ended up up using the Replace In file action. Works well for the issue.
Thank you again for the reply. |
|
|