473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

C# project reference problems (reference pulled from obj folder, not bin folder).

Hi there,

I have a pair of C# projects in VS2003. The first project, a dll, is
referenced in the second via a project reference.

The assemblies in question are delay-signed during a "production" build
process, but not as part of a normal development build.

I have noticed that while the correctly signed assembly is present in
the designated output folder for the project (e.g. bin/Release), an
unsigned version is also present in an obj/Release folder.

Even though the library has been built and signed correctly, the
project which references it is grabbing the unsigned version of the
library from the obj folder. Within VS 2003, the properties display for
the project reference even confirms that it is coming from the obj
folder, instead of the expected source - the designated output (bin)
folder.

1) Is this the expected operation? (I don't believe it used to work
this way, and have not intentionally changed anything)
2) Is there any way to still use project references, but pull the
referenced dll from the designated output folder (i.e. bin/Release)?

Thanks in advance,
Regards,
Richard

Jun 15 '06 #1
5 9096
Richard,
I have seen junior developers where I work who are reallyreallydumb set hard
references (not Project references, which are recommended) to the output in
the /obj folder.

I have no earthly idea what their logic was; normally build output is
directed to the /bin folder. That's best-practices. the obj folder is really
a temporary intermediate build output "work" folder and should not normally
be the target of the finished build.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Richard J Foster" wrote:
Hi there,

I have a pair of C# projects in VS2003. The first project, a dll, is
referenced in the second via a project reference.

The assemblies in question are delay-signed during a "production" build
process, but not as part of a normal development build.

I have noticed that while the correctly signed assembly is present in
the designated output folder for the project (e.g. bin/Release), an
unsigned version is also present in an obj/Release folder.

Even though the library has been built and signed correctly, the
project which references it is grabbing the unsigned version of the
library from the obj folder. Within VS 2003, the properties display for
the project reference even confirms that it is coming from the obj
folder, instead of the expected source - the designated output (bin)
folder.

1) Is this the expected operation? (I don't believe it used to work
this way, and have not intentionally changed anything)
2) Is there any way to still use project references, but pull the
referenced dll from the designated output folder (i.e. bin/Release)?

Thanks in advance,
Regards,
Richard

Jun 15 '06 #2
Peter,

Yes, I could understand problems if the references were not project
ones. In fact that is what I thought was going on at first, so I
removed the reference, then re-added it. The same thing happened!

I was even able to verify in the .csproj file that the reference is of
the form:
<Reference
Name = "ReferencedProject"
Project = "{3477EFD5-4BFE-4406-8C0D-605D00F7D5DB}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>

The Visual Studio IDE still reports that it's going to use the file in
obj... and it does!

Granted, I can solve the problem by manually copying the file from the
bin folder. I just don't believe I should need to!

Just in case it has any bearing, I do not recall seeing this problem
prior to installing JetBrains' ReSharper 2.0 add-in for Visual Studio
2003. So far, I have not uninstalled ReSharper to see if the problem
goes away... but I wouldn't expect that to be the cause since it should
only be operating on the source files, not the output files.

Regards,
Richard

Jun 15 '06 #3
Richard J Foster wrote:
Peter,

Yes, I could understand problems if the references were not project
ones. In fact that is what I thought was going on at first, so I
removed the reference, then re-added it. The same thing happened!

I was even able to verify in the .csproj file that the reference is of
the form:
<Reference
Name = "ReferencedProject"
Project = "{3477EFD5-4BFE-4406-8C0D-605D00F7D5DB}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>

The Visual Studio IDE still reports that it's going to use the file in
obj... and it does!

Granted, I can solve the problem by manually copying the file from the
bin folder. I just don't believe I should need to!

Just in case it has any bearing, I do not recall seeing this problem
prior to installing JetBrains' ReSharper 2.0 add-in for Visual Studio
2003. So far, I have not uninstalled ReSharper to see if the problem
goes away... but I wouldn't expect that to be the cause since it should
only be operating on the source files, not the output files.

Regards,
Richard

Hi,

in VS2003 when you look at the properties of a project reference, it
always points to the debug path. For me this was always a fast way to
check if a special reference is a project reference.

From what I know, it also pulls the reference from there. Just try to
delete the bin and the obj directory form the referenced project. Only
the bin is deletable.

I also have Resharper 2.0 installed, and experienced no problems.

What I don't understand, is when signing is not part of your development
build, why the correctly signed assemblies are present at all? They
shouldn't during the development build. Maybe somebody checked in the
bin folder or inserted a build step do do the signing, ...

HTH,
Andy
Jun 15 '06 #4
"Richard J Foster" <ri************@quixotetraffic.com> wrote in message
news:11**********************@h76g2000cwa.googlegr oups.com...

Just in case it has any bearing, I do not recall seeing this problem
prior to installing JetBrains' ReSharper 2.0 add-in for Visual Studio
2003. So far, I have not uninstalled ReSharper to see if the problem
goes away... but I wouldn't expect that to be the cause since it should
only be operating on the source files, not the output files.


I doubt ReSharper could be causing this. I follow their newsgroup and
haven't seen anything related to building.

///ark
Jun 15 '06 #5
Hi Andreas,

Andreas Mueller wrote:
What I don't understand, is when signing is not part of your development
build, why the correctly signed assemblies are present at all? They
shouldn't during the development build. Maybe somebody checked in the
bin folder or inserted a build step do do the signing, ...


I guess I was being unclear again.

The build process for distribution outside the department is handled
through a NAnt script (triggered from CruiseControl .NET on a
designated build machine). I can run the same script on my development
machine and, at least in the past, get the same output with the
exception of assembly version information. It was this I was doing when
I noticed the wierdness described in my original message. My first
thought was that the build script was broken, but then I found that I
could simulate the same operation in the Visual Studio IDE.

Perhaps it's an odd thing to expect... but I thought that if I manually
built *just* the referenced project, ran sn against the output to
complete the signing process, then manually built *just* the
referencing project it would also pick up the fully signed assembly
from the designated output folder for the referenced project. I guess
that's just such an obscure operation that almost nobody would ever
notice if it didn't work! :-)

BTW, I have not changed the version of Nant in use recently (even
though I am aware that RC4 was just released), so I do not believe that
is the problem.

Thanks for the suggestions though!
Regards,
Richard

Jun 16 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: cody | last post by:
We have a huge project, the solutuion spans 50 projects growing. Everytime I want to start the project I have to wait nearly over 1 minute for the compiler to complete building. This is...
5
by: David Webb | last post by:
The problem started when the Working Folder for a project was somehow set to the folder of another project. I set the correct working folder in VSS and deleted the .vbproj files that had been...
8
by: Adam Clauss | last post by:
I have a folder containing many subfolders (and subfolders and....) all containing various .cs files. Is there any "easy" way to get them all added to the solution. Preferable would be that the...
5
by: TB | last post by:
Hi All: This news group is proving to be great help on my path towards mastering ASP.NET thanks to all of you helpful souls out there. I am looking forward to the day when I can contribute...
11
by: Just Me | last post by:
I have a solution containing many usercontrol projects. When I wish to reference a usercontrol in another project I can select either the project or the assembly. Does it make a difference which...
2
by: Eric Lindsay | last post by:
I have been trying to do a CSS liquid layout imitating a frame, using position: fixed for header, footer, and side navigation, and a fixed background image. Page is valid HTML 4.01 Strict, and is...
4
by: | last post by:
I have learned about compartmentalizing my code base using Class Libraries. I have my common code such as my ORM framework broken out into their own Class Libraries, which are referenced as...
4
by: Alan Mailer | last post by:
Again, I'm new to VB.net and there is something I need help with: Like (I assume) many of us, over time I want to be able to create some VB.net classes that I might want to use in more than one...
1
by: =?Utf-8?B?cnNvbWFzdW5kYXI=?= | last post by:
Hi, I got the following error while trying to run the project in ASP.Net 2003 to one of my application in my machine. I think some where im loosing the IIS configurations. Error Detail:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.