.NET Assembly Interview Question with Answer

Can you create a native Image of ASP.NET assembly ... does this work ... is it possible ?

Native Image generator creates a local image of an .NET Assembly and installs that image in the native cache on the local machine. But when you create a Native Image of an ASP.NET assembly the .NET Runtime ignores that assembly and reverts back to JIT.

This is because CLR cannot load native images in a shared application domain and all ASP.NET applications run in a shared application domain. Hence although the native image of the assembly will be created it will not be installed in the image cache.

You've written an assembly that you want to use in more than one application. Where and how you will deploy it?

Assemblies that are to be used by multiple applications (for example, shared assemblies) are deployed to the global assembly cache. In the prerelease and Beta builds, use the /i option to the GACUtil SDK tool to install an assembly into the cache:


gacutil /i myDll.dll

Windows Installer 2.0, which ships with Windows XP and Visual Studio .NET will be able to install assemblies into the global assembly cache.

What is a Satellite Assembly ?

This assembly is used to get language specific resources for an application.These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language.

Is versioning applicable to private assemblies?

Yes It is, However, Since a private assembly can only be called by applications that reside in the same folder Version control in private assemblies is not necessary.

private assembly is only for one application and updating it won't unintentionally break other applications.

No comments:

Post a Comment