Static communication in C #?

The Windows Azure client libraries are very large (several MB), and I have a rather small project (of the order of several hundred KB) that uses only a few functions from them. Is there a way to contact me in these functions at build time, so that the resulting DLL will not be much bloated, and I don’t need to bind the functions at runtime?

Something like http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx , but u I get the impression that the packages are associated with the whole DLL.

Thanks!

Edit: since external restrictions on the size of the final final DLL version are associated with bloating, this is the last resort - the only other option that I know about is to simply duplicate the code that I use verbatim.

+6
source share
2 answers

In a word: None .

Remember that although you use only a few functions, the library has many other functions that these functions use that you don’t even know about!

You cannot do this because you do not have access to all the dependencies. Remember also that these dependencies may even reside in another DLL, and you need to include this DLL for the same reason.

+5
source

What you are looking for is similar to .NET Native . Unfortunately for you, its only a preview and right now works only with Store Apps for devices. Statements like this

We will continue to develop and improve our own compilation for a range of .NET applications.

can be found on the Internet, but nothing specific about \ Azure web applications.

So far the answer is no

+3
source

Source: https://habr.com/ru/post/975744/


All Articles