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

JIT assemblies

Hi everyone,

I'm trying to convert an ASP.NET app that is currently compiled into a JITed
application.

Here's the dilema. I can't figure out how to reference a class or control
(that is also JIT) from another JIT class or control. Let's say I've got a
simple class (testclass.cs) ... this is not compiled into a DLL:

namespace testnamespace
{
public class testclass
{
public static string teststring = "contents of teststring";
public testclass()
{
}
}
}

If I have a page w/o a code behind, I can access this class using:
<%@ Assembly Src="testclass.cs" %>
....
<%
Response.Write(testnamespace.testclass.teststring) ;
%>

All the pages are using code-behinds. Using "using testnamespace;" won't
work -- is there a way to reference and use this assembly from a
code-behind?

Thanks for your help!

Brian
Nov 18 '05 #1
6 1401
This is EXACTLY the problem I'm having. It's been driving me CRAZY. They do all this nice AUTO-compilation stuff for us but then seem to provide no way to do JIT from a code file. ARRRGH. Hey, if you *do* learn the answer to this from anywhere else, could you email me? (al**@maghen.com). Thanks!
Nov 18 '05 #2
This is EXACTLY the problem I'm having. It's been driving me CRAZY. They do all this nice AUTO-compilation stuff for us but then seem to provide no way to do JIT from a code file. ARRRGH. Hey, if you *do* learn the answer to this from anywhere else, could you email me? (al**@maghen.com). Thanks!
Nov 18 '05 #3
Brian H

Hi. Well, though we haven't gotten a definite response from the MSFT folks yet, I gotta tell you that I've been banging my head against this for about 48 hours and I think that everything I've read and all the experimentation that I've done indicates the following annoying rule

IF YOU NEED TO ACCESSS THE CODE IN A .CS FILE IN ANY WAY DIRECTLY FROM ANOTHER .CS FILE, THE FIRST .CS FILE **MUST** BE PRE-COMPILED INTO AN ASSEMBLY WITH A NAMESPACE

It seems that ASP.NET itself does you a cool little "favor" when you're referencing code files (such as .CS files) as the code-behind files for .ASPXs or .ASCXs. The favor is that it will auto-compile what it needs to. Sadly, and, in my mind, rather stupidly, there doesn't seem to be any kind of directive to do this BETWEEN .CS code files

I'd *love* it if the folks from MSFT would write in and tell me that I'm an idiot and just don't understand how to do it. But at the moment, I think I may be right about this

Alex
Nov 18 '05 #4
Brian H

Hi. Well, though we haven't gotten a definite response from the MSFT folks yet, I gotta tell you that I've been banging my head against this for about 48 hours and I think that everything I've read and all the experimentation that I've done indicates the following annoying rule

IF YOU NEED TO ACCESSS THE CODE IN A .CS FILE IN ANY WAY DIRECTLY FROM ANOTHER .CS FILE, THE FIRST .CS FILE **MUST** BE PRE-COMPILED INTO AN ASSEMBLY WITH A NAMESPACE

It seems that ASP.NET itself does you a cool little "favor" when you're referencing code files (such as .CS files) as the code-behind files for .ASPXs or .ASCXs. The favor is that it will auto-compile what it needs to. Sadly, and, in my mind, rather stupidly, there doesn't seem to be any kind of directive to do this BETWEEN .CS code files

I'd *love* it if the folks from MSFT would write in and tell me that I'm an idiot and just don't understand how to do it. But at the moment, I think I may be right about this

Alex
Nov 18 '05 #5
I've been banging my head on this one, too. I figured this would be a good
test case (the example I posted), but the real problem for us (and the
company I work for) is that we want to JIT compile our pages and user
controls. It won't be possible if what we are trying to do cannot be done.

I will post if I have a solution -- hopefully microsoft will figure this
out. Perhaps using reflection? Ug. This should be simple :)

-Brian
"Alex Maghen" <al**@maghen.com> wrote in message
news:63**********************************@microsof t.com...
Brian H -

Hi. Well, though we haven't gotten a definite response from the MSFT folks yet, I gotta tell you that I've been banging my head against this for about
48 hours and I think that everything I've read and all the experimentation
that I've done indicates the following annoying rule:
IF YOU NEED TO ACCESSS THE CODE IN A .CS FILE IN ANY WAY DIRECTLY FROM ANOTHER .CS FILE, THE FIRST .CS FILE **MUST** BE PRE-COMPILED INTO AN
ASSEMBLY WITH A NAMESPACE.
It seems that ASP.NET itself does you a cool little "favor" when you're referencing code files (such as .CS files) as the code-behind files for
..ASPXs or .ASCXs. The favor is that it will auto-compile what it needs to.
Sadly, and, in my mind, rather stupidly, there doesn't seem to be any kind
of directive to do this BETWEEN .CS code files.
I'd *love* it if the folks from MSFT would write in and tell me that I'm an idiot and just don't understand how to do it. But at the moment, I think
I may be right about this.
Alex

Nov 18 '05 #6
I've been banging my head on this one, too. I figured this would be a good
test case (the example I posted), but the real problem for us (and the
company I work for) is that we want to JIT compile our pages and user
controls. It won't be possible if what we are trying to do cannot be done.

I will post if I have a solution -- hopefully microsoft will figure this
out. Perhaps using reflection? Ug. This should be simple :)

-Brian
"Alex Maghen" <al**@maghen.com> wrote in message
news:63**********************************@microsof t.com...
Brian H -

Hi. Well, though we haven't gotten a definite response from the MSFT folks yet, I gotta tell you that I've been banging my head against this for about
48 hours and I think that everything I've read and all the experimentation
that I've done indicates the following annoying rule:
IF YOU NEED TO ACCESSS THE CODE IN A .CS FILE IN ANY WAY DIRECTLY FROM ANOTHER .CS FILE, THE FIRST .CS FILE **MUST** BE PRE-COMPILED INTO AN
ASSEMBLY WITH A NAMESPACE.
It seems that ASP.NET itself does you a cool little "favor" when you're referencing code files (such as .CS files) as the code-behind files for
..ASPXs or .ASCXs. The favor is that it will auto-compile what it needs to.
Sadly, and, in my mind, rather stupidly, there doesn't seem to be any kind
of directive to do this BETWEEN .CS code files.
I'd *love* it if the folks from MSFT would write in and tell me that I'm an idiot and just don't understand how to do it. But at the moment, I think
I may be right about this.
Alex

Nov 18 '05 #7

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

Similar topics

6
by: Tom Dacon | last post by:
If you're not putting assemblies in the GAC, but are referencing shared code with copylocal=true into the projects that use them, is there any value to signing the assemblies? In the environment...
1
by: Afaq | last post by:
Hi, After adding large number of empty resource files (which will be updated later), we are not able to compile the project. the following is the output of the build process. It fails while...
1
by: Afaq | last post by:
Hi, After adding large number of empty resource files (which will be updated later), we are not able to compile the project. the following is the output of the build process. It fails while...
3
by: Claudio Pacciarini | last post by:
Hi everyone, I have a question about .NET code sharing and reuse, and also about application design best practices / guidelines. Currently, we have many different .NET projects in source...
4
by: illegal.prime | last post by:
Hi all, I'm getting unexpected results when trying to preload assemblies into an AppDomain I'm creating. Upon creation of the AppDomain - I attach an AssemblyResolve to both my current AppDomain...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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...

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.