App_GlobalResources.COMPILED question

  • Thread starter Thread starter WT
  • Start date Start date
W

WT

Hello,

I have a main site and want to install over it optionnal modules, but for
each optionnal module I get a App_GlobalResources.COMPILED file that should
go in the bin directory of the target main site.

What to do, insert manually all App_GlobalResources content in a new
App_GlobalResources file ?
Change the name for it ?
Put each file in a special directory but how to find it ?


Thanks for help
CS
 
Hello CS,

From your description, my understanding on this issue is that you have an
main ASP.NET 2.0 web application which has been precompiled, and you want
to add some additional components(modules) into this precompiled
application, however, you found that the app_GlobalResources (from the
additional modules ) can not be merged into the main application, correct?
If there is anything I missed, please feel free to let me know.

If this is the case, based on my understanding, I can not merge to
precompiled web application(or modules) due to the ASP.NET 2.0 web
application's precompilation mechanism. For those top level
assemblies(such as the App_Code, App_Theme, App_GlobalResource....), after
the precompiled assemblies be generated, there will has a
"TopAssembly.compiled" file associated with each of them, this file will
contains the url/path info and the assembly name(so far there is only one
assembly allowed in the mapping file). e.g.

============================
<?xml version="1.0" encoding="utf-8"?>
<preserve resultType="9"
virtualPath="/ASPNET/V2/WebSites/URLSite/App_GlobalResources/"
hash="ffffffffd6631f7c" filehash="d55f1bc4c9c96be1" flags="140000"
assembly="App_GlobalResources" resHash="4bed9b2f97b7ef6b" />
============================

BTW, how is your main site and the additional modules built or is it
possible that you merge the additiona modules into the main site before
precompilation? the current precompilation modle(no matter we use the
WebDeployment Project or not) only support assemblies merging at
precompilation time, but not after application be precompiled.

Please feel free to let me know if you have any other consideration or
questions on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello Steven,

Your assumptions are right, I have modules thta I want to add to an already
deployed site.
I can't merge additional modules into the main site, isn't there a solution
for this ????
It is a real problem.

How are doing people like DDN with their plugable modules ?

Thanks for help
CS
 
Hi CS,

Thanks for your reply.

The problem here is that your additional modules has its own precompiled
App_GlobalResources(or other top level dependency assemblies), this will
prevent them from being merged into the main application. Why would those
additional module contains own App_GlobalResources assembly, such assembly
is supposed to be contained by an indivdual web application rather than a
component module.

As for the DDN module or other component, I think they should be developed
through a normal class library project which won't contain its own
App_GlobalResource assembly. Also, a normal component module should not
have to rely on the ASP.NET precompilation, this is specific to ASP.NET 2.0
web application only.

would you provide some further information or background about your web
appliation and its additional modules? We may try having a look to see
whethe there is anything we can still investigate here.

Looking foward to your reply.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
Setven,

My project is too large to be transmitted.
The original mechanism was:
- each module inherits from a commun base class ModuleControl that is on its
turn inheriting from UserControl
- an installation interface used by each module: IInstaller
- this interface is storing in DB the module class name, url and physical
path on the server
- then when this module was needed by a session it was dynamically loaded
whith LoadControl(url+name) and casted to a Module Control

In ASP.NET 1.1 we were compiling each module individually obtaining main
ascx and any complementary aspx with a compiled code thta was easy to
transfer and install with an installation project

In .NET 2, I found no way to used our old process because, there is no way
to compile modules individually.

Regards
CS
 
Thanks for your reply CS,

Yes, ASP.NET 2.0 has changed a lot on the compilation model from ASP.NET
1.1, this is to make the website design more easily(separate code from the
aspx template at development time).

And in ASP.NET 1.1, the compiled asssembly you mentioned only contains the
codebehind classes, but not contain aspx(or any other dynamic compiled
resource)'s compiled content, while in ASP.NET 2.0 the precompiled
asemblies also include some dynamic compiled items(like Theme,
Resources....). Thus, we can not directly reuse an ASP.NET 2.0 website's
precompiled assembly.

IMO, if you want to create some reusable component modules for ASP.NET
applications, you will need to sparate those code behind classes from front
UI classes. For example

**you need to use class library project instead of web site application
project to develop your reusable modules

** you can define codebehind classes (which will be inherited by other
pages or usecontrols in website project ) in the class library project

** you can define custom helper class in class library project

** any item that will need ASP.NET precompilation can not be included in
our reusable module's class library/project

BTW, is your modules directly converted from ASP.NET 1.1 projects?
According to the above items, I think you may need to consider using class
library projects for those reusable module projects.

Please feel free to let me know if you have any other consideration or
ideas.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top