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

C#.net web application compiling

I have been searching the web for days no with no luck. This seems to be a pretty unique problem.

Currently I am creating a web application for a company and my co-workers and I have run into a major snag with integrating this new web application into the current site. There are 3 base classes that exist in the current site that must be used in the new application. Unfortunately, over the years, with so much contract work done, the entire site looks somewhat like Frankenstien's monster and most of it is not compiled. Every page and project requires these 3 classes to run but they have not been put into a compiled dll.

Now if I put those three files into their own project in my solution and reference that project with my project, everything compiles great. But when I move the files over to the server, I get an error that tells me that those classes are being duplicated. That makes total sense. I get the same issue if I include the files into my project. Again, makes total sense since there are being used twice.
So the problem is that my project won't compile without them but won't run on the server with them.

The question is this, is it possible to tell my project to reference just those files without having to make them their own project? Or can the compiler be told to look at those files and compile their location but not compile the actual file? I don't know much about how the VS compiler works.

Any ideas would be greatly appreciated. Thanks.
Oct 29 '08 #1
4 1828
nateraaaa
663 Expert 512MB
In your current production site how are the 3 required classes used. Is there an include file somewhere? Are the dlls references via a com object?

Nathan
Oct 29 '08 #2
Well that is what I mean by the site being somewhat of a Frankenstien's monster... it is a combination of asp, vb.net and c#.net. It amazes me everyday that it doesn't just crash and explode.

.asp files use include directives, .cs and .vb files use partial class inheritence in the codebehind page without compilation i.e.
Expand|Select|Wrap|Line Numbers
  1. namespace x
  2.     namspace y
  3.         public partial class c1 : base_class
  4.         ...
  5.         ...
  6.  
The problem is that we have been trying to start converting the site over to compiled c#.net (we have years of work ahead of us) and so we are under instruction to create all new projects as compiled c#.net projects. The main problem is that my project is the guniea pig of sorts. And maybe it just can't be done without compiling these base classes into their own dll and using that. However that would cause the same problem because the rest of the site needs the files and will have to be rewritten to access the .dll file.
Oct 29 '08 #3
Frinavale
9,735 Expert Mod 8TB
I don't know how you're going to end up solving this...

Since touching these 3 classes could potentially break your entire site have you considered creating a DLL that contains these 3 classes (renamed) that only your .NET code will reference?

That way when you eventually migrate the rest of the site to .NET you simply point to this new DLL...and you don't have to touch the old classes...


-Frinny
Oct 30 '08 #4
nateraaaa
663 Expert 512MB
If you create solution with only the 3 required classes to create a dll you could then create a post build event to copy this dll to a specific location. By referencing this location you would not have to worry about other applications having different version of this shared dll. All of your applications that use this dll would point to the same location and inherit any changes make to the 3 classes in this dll.

Nathan
Oct 30 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project:...
6
by: Ariel | last post by:
I have an application that works correctly in debug mode but it does not work in release. I am not using anything of the class system.diagnostics. I tried to disable the optimization code, but...
2
by: Luca Paganelli | last post by:
Hi everybody. I've got a simple but bothering problem. I've just written a little application in C#. I've got a set of business logic classes and a window forms GUI released as a set of...
7
by: Jim Heavey | last post by:
I have not messed around too much with Console applications, but I started to build a "project" which is just a place holder for a number of misc "batch" utilities that I run. I created the...
3
by: Brenden Bixler | last post by:
I would like to solicit advice on how to best deploy an enterprise ASP.NET 2.0 web application. I'm using VS 2005 and I've found Publish Web Site to be somewhat lacking, buggy, and slow. My...
2
by: Daniel Knöpfel | last post by:
Hi all I need to adapt an Msbuild script to compile a visual studio 2005 solution (including several projects and a website). The application is written in C# and using .NET 2.0. Due to late...
8
by: p.s.bijpost | last post by:
Hello all: I'm trying to edit a little (freeware) palm app to my wishes but run into problems as soon as re-save the original .c file. During compile ("make" in terminal)I get:...
4
by: Mark | last post by:
Hi, i want to compile my application with this code: cd \windows\microsoft.net\framework\v2.0.50727 aspnet_compiler -p "c:\inetpub\wwwroot\myapp" -v / c:\compiled\myapp -f But the problem is...
2
by: Teo | last post by:
Hey guys!!! I am working on an application that uses a MySQL Database as a back end. When compiling my application which would be the best way to prepare the database for deployment on the...
4
by: Coder | last post by:
Hello, Can my application call a web service ? and web service returns a class file ? Then May I run this "cs" file in my main application ? without compiling ? Thanks Coder @Toronto
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.