473,386 Members | 1,654 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,386 software developers and data experts.

Solution Build question / issue....

1. We have a web project that has a support dll that uses the following
command: HttpContext.Current.Application["key...."].ToString();

2. In our environment we must use a build process that runs from the
command line to get things into production, not the IDE.

The problem. When we compile the project in the IDE everything works great,
the application works the support DLL gets the current context stuff and
everything is just fine. However when we run the project through the CSC
compiler everything compiles and looks good but when we run the application
it blows up on the line of code for the HTTPContext stuff. Now if I change
it to ConfigurationSettings and try to pull from web.config it works fine.

So the problem is what is the IDE doing differently. We know everything is
getting compiled correctly as it works upto that one point in the support
dll.

Here are the base options we use on the command line since we use a RSP file.

/target:library
/optimize+
/warn:4

/r:System.dll
/r:System.Drawing.dll
/r:System.Data.dll
/r:System.Web.dll
/r:System.XML.dll
/r:OurDLLGoesHere.dll

<fileList for compilation>

There is not much to do here but it looks like there is something that the
IDE is injecting into the DLL as it is also 4 K smaller when we compile on
the command line.

Anybody ever run into this before? We do need to keep it as the HTTPContext
if possible so we need to figure out why it won't link in for some unknown
reason....

Thanks.
Nov 19 '05 #1
5 1219
When you say it blows up, do you mean you get a null reference
exception?

Are you sure Application["key"] doesn't return a null value?

Do you have any code inside of conditional compilation directives (#if
/ #endif) where the symbol might be defined in the IDE but not in the
command line build?

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 12 Aug 2005 09:22:01 -0700, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
1. We have a web project that has a support dll that uses the following
command: HttpContext.Current.Application["key...."].ToString();

2. In our environment we must use a build process that runs from the
command line to get things into production, not the IDE.

The problem. When we compile the project in the IDE everything works great,
the application works the support DLL gets the current context stuff and
everything is just fine. However when we run the project through the CSC
compiler everything compiles and looks good but when we run the application
it blows up on the line of code for the HTTPContext stuff. Now if I change
it to ConfigurationSettings and try to pull from web.config it works fine.

So the problem is what is the IDE doing differently. We know everything is
getting compiled correctly as it works upto that one point in the support
dll.

Here are the base options we use on the command line since we use a RSP file.

/target:library
/optimize+
/warn:4

/r:System.dll
/r:System.Drawing.dll
/r:System.Data.dll
/r:System.Web.dll
/r:System.XML.dll
/r:OurDLLGoesHere.dll

<fileList for compilation>

There is not much to do here but it looks like there is something that the
IDE is injecting into the DLL as it is also 4 K smaller when we compile on
the command line.

Anybody ever run into this before? We do need to keep it as the HTTPContext
if possible so we need to figure out why it won't link in for some unknown
reason....

Thanks.


Nov 19 '05 #2
Also, Did a little more digging and found something interesting.... Not sure
what to do though.

I added a clientscript (from codebehind) to output the
httpContext.Current.Applicatino["key"]'s Value and when I run from the
compile in the IDE it spits out the LDAP key. When I run the same code as
compiled through the command line I get an Object Reference Error....

Any reason why the web project would not compile correctly? The output type
is Library and it has the same references defined as what is listed in the
project file. We even tried setting the references to the csc.rsp file
values and no luck either. It's almost like it's missing an assyembly
reference or something around that object but for the life of us we don't
know what it could be since the CSC compiler compiles just fine....

Any thoughts?????

"Scott Allen" wrote:
When you say it blows up, do you mean you get a null reference
exception?

Are you sure Application["key"] doesn't return a null value?

Do you have any code inside of conditional compilation directives (#if
/ #endif) where the symbol might be defined in the IDE but not in the
command line build?

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 12 Aug 2005 09:22:01 -0700, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
1. We have a web project that has a support dll that uses the following
command: HttpContext.Current.Application["key...."].ToString();

2. In our environment we must use a build process that runs from the
command line to get things into production, not the IDE.

The problem. When we compile the project in the IDE everything works great,
the application works the support DLL gets the current context stuff and
everything is just fine. However when we run the project through the CSC
compiler everything compiles and looks good but when we run the application
it blows up on the line of code for the HTTPContext stuff. Now if I change
it to ConfigurationSettings and try to pull from web.config it works fine.

So the problem is what is the IDE doing differently. We know everything is
getting compiled correctly as it works upto that one point in the support
dll.

Here are the base options we use on the command line since we use a RSP file.

/target:library
/optimize+
/warn:4

/r:System.dll
/r:System.Drawing.dll
/r:System.Data.dll
/r:System.Web.dll
/r:System.XML.dll
/r:OurDLLGoesHere.dll

<fileList for compilation>

There is not much to do here but it looks like there is something that the
IDE is injecting into the DLL as it is also 4 K smaller when we compile on
the command line.

Anybody ever run into this before? We do need to keep it as the HTTPContext
if possible so we need to figure out why it won't link in for some unknown
reason....

Thanks.


Nov 19 '05 #3
Basically the problem is that it never gets the items... When we compile the
application 2 projects (1 web project, 1 DLL project) whether they are in the
same solution or not from the IDE everything works fine. When we compile
the same application from the command line it don't work and the dll file for
the web app is smaller.

Both compiles are in Release mode, IDE and command line. There is obviously
something we are either missing or that the IDE is doing in order to make
this work.

What we did is in the Support DLL there are three calls to the HTTPContext
object that set variables in the class for LDAP lookups. When the error
fires it is because these values are empty and not set. However when we
compile from the IDE the variables do get set.

There is no rhyme or reason to this so now we have to figure it out....

It makes me wonder if the IDE is setting some sort of hook or something for
the support DLL in the Web Project DLL.....

And there are no compile directives at all in the appliation.

"Scott Allen" wrote:
When you say it blows up, do you mean you get a null reference
exception?

Are you sure Application["key"] doesn't return a null value?

Do you have any code inside of conditional compilation directives (#if
/ #endif) where the symbol might be defined in the IDE but not in the
command line build?

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 12 Aug 2005 09:22:01 -0700, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
1. We have a web project that has a support dll that uses the following
command: HttpContext.Current.Application["key...."].ToString();

2. In our environment we must use a build process that runs from the
command line to get things into production, not the IDE.

The problem. When we compile the project in the IDE everything works great,
the application works the support DLL gets the current context stuff and
everything is just fine. However when we run the project through the CSC
compiler everything compiles and looks good but when we run the application
it blows up on the line of code for the HTTPContext stuff. Now if I change
it to ConfigurationSettings and try to pull from web.config it works fine.

So the problem is what is the IDE doing differently. We know everything is
getting compiled correctly as it works upto that one point in the support
dll.

Here are the base options we use on the command line since we use a RSP file.

/target:library
/optimize+
/warn:4

/r:System.dll
/r:System.Drawing.dll
/r:System.Data.dll
/r:System.Web.dll
/r:System.XML.dll
/r:OurDLLGoesHere.dll

<fileList for compilation>

There is not much to do here but it looks like there is something that the
IDE is injecting into the DLL as it is also 4 K smaller when we compile on
the command line.

Anybody ever run into this before? We do need to keep it as the HTTPContext
if possible so we need to figure out why it won't link in for some unknown
reason....

Thanks.


Nov 19 '05 #4
We found the problem. THere was an embedded resource that was being grabbed
before the stuff was set and that was failing.... Added the Embedded
resource command to the RSP file for the command line and now it works like a
champ.

"Scott Allen" wrote:
When you say it blows up, do you mean you get a null reference
exception?

Are you sure Application["key"] doesn't return a null value?

Do you have any code inside of conditional compilation directives (#if
/ #endif) where the symbol might be defined in the IDE but not in the
command line build?

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 12 Aug 2005 09:22:01 -0700, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
1. We have a web project that has a support dll that uses the following
command: HttpContext.Current.Application["key...."].ToString();

2. In our environment we must use a build process that runs from the
command line to get things into production, not the IDE.

The problem. When we compile the project in the IDE everything works great,
the application works the support DLL gets the current context stuff and
everything is just fine. However when we run the project through the CSC
compiler everything compiles and looks good but when we run the application
it blows up on the line of code for the HTTPContext stuff. Now if I change
it to ConfigurationSettings and try to pull from web.config it works fine.

So the problem is what is the IDE doing differently. We know everything is
getting compiled correctly as it works upto that one point in the support
dll.

Here are the base options we use on the command line since we use a RSP file.

/target:library
/optimize+
/warn:4

/r:System.dll
/r:System.Drawing.dll
/r:System.Data.dll
/r:System.Web.dll
/r:System.XML.dll
/r:OurDLLGoesHere.dll

<fileList for compilation>

There is not much to do here but it looks like there is something that the
IDE is injecting into the DLL as it is also 4 K smaller when we compile on
the command line.

Anybody ever run into this before? We do need to keep it as the HTTPContext
if possible so we need to figure out why it won't link in for some unknown
reason....

Thanks.


Nov 19 '05 #5
Good find!

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 12 Aug 2005 11:36:11 -0700, "JCauble"
<JC*****@discussions.microsoft.com> wrote:
We found the problem. THere was an embedded resource that was being grabbed
before the stuff was set and that was failing.... Added the Embedded
resource command to the RSP file for the command line and now it works like a
champ.


Nov 19 '05 #6

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

Similar topics

2
by: Tom | last post by:
I am working in a team environment and we have followed the single solution model for our developement. We are about 25% of the way through our project and Visual Studio is taking 5 minutes to...
0
by: TEK | last post by:
Hello We have a quite huge project. To limit the solution size, rebuild time and so on we have divided the project in two different solution. One solution that holds the buiness entities, or...
4
by: Stephen Ritchie | last post by:
At the moment we have in Solution Explorer 12 projects and using the configuration manager we ahve all dependancies and build order set correctly. The problem is that when we do >Debug>Start (F5)...
0
by: Vani | last post by:
Has anyone come across this issue? There seems to be a behavioral difference (and possible bug) in visual strudio 2003 when building a vc.net solution through IDE and building the same solution...
5
by: TS | last post by:
I am creating a custom control and so I have a c# solution, and added a c# web control library project. I don't get any squigglies until after I build, then when I fix, they don't go away until...
11
by: Jon Davis | last post by:
Can a solution built in C# utilize MSMQ and/or MTS? If so, does this make the training material I already have on MSMQ and MTS in the context of VB6 an appropriate prerequisite foundation before...
3
by: Danny | last post by:
Hi I trying to master msBuild but have a problem. I have a solution that I wish to build using msbuild but want to override BeforeBuild/AfterBuild targets for each of the projects. I trying to...
0
by: pete | last post by:
Greetings all, I am going to attempt to describe the issue that I am having in full. I apologize ahead of time that this may be a long posting, however, I have found no other solution to my...
5
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I have a solution with 50 projects. They are all compiled in DEBUG mode and the output path has been modified to a custom directory I now want to build RELEASE mode and the Output Path...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.