[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Reflection issue after initial ClickOnce deployment

Raj

2/27/2008 4:06:00 PM

Hi,

We're having a windows application that's deployed through ClickOnce
deployement. The deployment is working just fine and the application
runs with no problem.


We have logic that load assemblies and the resources (e.g. XML files
added to the assembly as resources) at the beginning of the
application in the Main method. Both assemblies and resources are
loaded just fine and working as intended in both developer
environment
and in a client that already had the application.


But in a brand new deployment (i.e., when deploying on a client
machine that never had our application and our prerequisites, .NET
2.0
and Crystal engine), the assemblies are loaded and the resources (XML
files) are not loaded. Our ClickOnce deployment first verfiies if the
prerequisites (.NET 2.0 and Crystal engine) already exist on the
client machine and installs them first, if not, before installing the
application. We're seeing this missing resources problem only in this
initial deployment where it installs prerequisite first and installs
application. After this first deployment is complete, if the client
receives an update from the server, then it loads the resources from
the loaded assemblies properly and we're seeing the values that we
expect from the resource files just fine.


The hard part of this problem is that it's not reproducible on the
developer boxes because it always loads everything properly.


We're using "Assembly.GetManifestResourceNames()" method to load the
resources. Our suspicion is that this method retuns an empty list.
We're not getting any exception. So we know all the assemblies are
loaded properly. But we're not seeing those values that we expect
from
the resource files. That's the reason we suspect this method. The
Remarks on the Help page of this method says that "Resource
information is returned only if the resource is visible to the
caller,
or the caller has ReflectionPermission."


Please advice any solution to this problem. Any other ideas why the
resources are not loaded only at the first deployment? Is it related
to ReflectionPermission?


Your help is greatly appreciated.


Thank you,
Raj Muthusamy