c# - I've read that assemblies manually placed inside Bin are also automatically referenced by -



Q1

We add assembly reference to a web Through the project, website -> add context , and all pages of that web project will automatically reference the assembly.

But I have read somewhere that even if we only copy it (thus we do not add it to website -> add context ) in the bin directory through an assembly Web project, it will still be automatically referenced by all the pages of that project. But as far as I can tell, this is not the case!


Q2

A) The posted web site project also generates the precompiled. Config and website1_deploy.wdproy

Should both of these files be copied to the server?

B) Deployed web application projects also generate WebApplication1.csproj and WebApplication1.csproj.user.

  • Should two files also be copied to the server? If so, why?

  • I think the obj directory should not be copied to the web server?

thanx

means more than just copying Dell directly into the bin. This means to keep the dependency in the app.config and to keep a hint file that helps in the visual studio to find DLL from the source. This path is used by visual studio to copy the DLL directly into the bin (if it is removed) and to provide "updated reference" functionality, DLL, registered in AP.Config, uses the correct version of DEL By requiring Runtime to compile your code.

Q2A: website1_deploy.wdproy is not required. PrecompiledApp.config This file tells the runtime that the website was already precompiled and ASPX files are only placeholders for IIS.

Question 2b: You do not have to copy all those files. The .csproj file is for your studio only, which is to keep track of all the files in your project. Runtime does not do anything with it. The .csproj.user file has its own settings, then the runtime does not do anything with it also does not understand. The Obj folder is a temporary directory for the compiler. It is not required even after compilation.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -