473,785 Members | 2,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9138
Richard,
I have seen junior developers where I work who are reallyreallydum b 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 = "ReferencedProj ect"
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 = "ReferencedProj ect"
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.goo glegroups.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
2360
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 unaccaptable. I thought about loading only the project I need into visual studio and not the whole solution. The problem is that the compiler tells me it cannot find the referenced dlls (project references) although they are all lying in their bin and obj...
5
11055
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 created in the wrong folder on the hard drive. Before I discovered these files, .NET kept trying to create a new project with _1 following the project name. Deleting those files corrected that problem. I deleted the Virtual Directory, rebooted, and...
8
1937
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 folders are actually created in the Solution Explorer so that I can find things easily. Its easy to select multiple files out of a single folder, but not recursively into subfolders. Any ideas? -- Adam Clauss
5
2355
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 with a few ounces of hard-won knowledge as well. Meanwhile I have this (hopefully small) problem.
11
1926
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 one I select? Thanks
2
2402
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 at http://www.ericlindsay.com/palmtop/palmnote.htm and the CSS is valid (with colour warnings but no errors) at http://www.ericlindsay.com/palmtop/palmtoptest.css All the other pages in that directory use my four year old stylesheet (so don't...
4
3573
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 projects from my Website. I also have a common set of DLLs I use across all of my applications. It would be great if I could put all of those DLLs into their own projects, and to reference that project from various solutions. The way my solution is...
4
4474
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 Project. So let's say I've created a Folder called "MyVBNet Classes" to hold these general-use VB.Net class files that I will eventually associate with various Projects I create. Now let's imagine I've created a class called "MyClass.vb" that...
1
3157
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: Auto-attach to process ' aspnet_wp.exe' on machine '<machine name>' failed. Error code 0x8004000e. Could you help me to find resolution.
0
9489
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10357
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10101
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.