A1260298814KBxvZ - PowerPoint PPT Presentation

About This Presentation
Title:

A1260298814KBxvZ

Description:

(????????? ? ?? RUT.netmodule) ???????????? #4. ????????? ?? ?????-??????? ??????? ... (????????? ? ?? RUT.netmodule) IL ???, ?????????? ?? FUT.cs. ????????? ... – PowerPoint PPT presentation

Number of Views:98
Avg rating:3.0/5.0
Slides: 36
Provided by: Svetli8
Learn more at: https://www.devbg.org
Category:

less

Transcript and Presenter's Notes

Title: A1260298814KBxvZ


1
(No Transcript)
2
????????? ? Deployment
???????????? ?? .NET Framework
http//www.nakov.com/dotnet-project/
?????? ??????? ????????? ???????, Sciant Inc.
www.sciant.com Microsoft Student
Consultant www.fmi.uni-sofia.bg/microsoft/
3
?????????? ??????
  • ?????? ???????? ?? .NET Framework ? CLR (Common
    Language Runtime)
  • ?????? ???????? ?? ?????? ??????? ?? ?????? ?
    .NET (Common Type System CTS)
  • ???????? ?? ????? C
  • ????????? ?? ????????????? ?? .NET Framework SDK

4
??????????
  • ????? ? ????????
  • ??? ?? ???????????
  • ???????? ?? ???????
  • ????????????? ?? ???????
  • ???????? ?? ?????? ? ????????
  • ????? ????????? ?? ???????
  • Global Assembly Cache (GAC)
  • ??????
  • ??????? ?? ????????? (probing)
  • ??????????????? ???????

5
????? ? ????????
  • ?????????? ?? ???????, ?????????
  • ????????? ?? ?????? (???)
  • ?????????
  • ??????? ? ??????? (.bmp, .ico, )
  • ???? ?? ????????? ?? ?????? ?? ??????? ?. ???.
    ????????
  • ???????????? ????? ?? ???????
  • ??????? ??????? ?? ?????????, ??????????
    ?????????
  • ??????? ????????, ?????????, ???????? ? ????????
    ?????????????? ??????

6
????? ? ????????
  • ????????? ? ???-??????? deployment ??????? ? .NET
    Framework
  • ?????????? ? ???????? (DLL hell) ? .NET ?? ??????
    ? ???????? ?? ?????? ?? ???? ???????
  • ??????? ???????? ?????? ?? ???? ? ???? ???????
    ????? ?? ??????????? ? ?? ?? ?????????
    ????????????
  • ?????? ?? ?????????? ? ???????? ???????????
  • XCopy installation

7
???? ???????
  • ... ??????? IL ??? ?? ??????????
  • ????? ?? ??????? ? Portable Executable (PE) ????
    (DLL, EXE)
  • ?????? ?? ??? ?????? ????? (entry point)
    DllMain(), WinMain() ??? Main()
  • ... ??????? security boundary
  • ?? ???? ??????? ?? ??????? ? ???????? ?????????
    ?? ???????????
  • ... ??????? type boundary
  • ???????? ?? ???? ??????? ? ??????? ?? ???????? ??
    ????????, ????? ???????

8
???? ??????? (2)
  • ... ??????? reference scope boundary
  • ???????? ? ????????? ????? ?? ????? private ??
    ???? ??????? ??? ?? ?? ???????? ????? ?????????
  • ... ??????? version boundary
  • ?????? ?????? ? ??????? ?????? ???????? ?? ????
    ???? ????
  • ... ? ??????? ?? ?????????
  • ??? ??????????? ????????? (shared assembly)
  • ... ??????? deployment unit

9
???????? ?? ???????
  • ?????????, ???????? ?????????
  • ????????
  • ?????????????
  • ??? ?????? ??????? ?????????? (????)
  • ?????? ?? ?????? ?????? (???????)
  • ?????????? ?????????
  • ?????????, ?? ????? ?? ??????, ?? ?? ??????
  • ???????????? ?????? ? ???????
  • ????????? ????? ?? ??????

10
????????????? ?? ???????
  • ??? ?? ?????????
  • ???????? ???
  • ??????
  • ??????? 4 ?????????????? ????????? ? ?????
    Major.Minor.Build.Revision (????. 2.0.1765.2)
  • ???????? ?? ?? CLR ??? version policy
  • ???????? ?? ?????????
  • ?????????? ???? ?? ????????????? ?? ?????????
    (assembly vendor public key)
  • ??????? (????. en-US)
  • RFC1766 ???, ??????? ?????????? ?????????
    (locale) ?? ?????????

11
???????????? 1
  • ??????????? ?? ????????? ?? ??????? ? ildasm

12
???????? ?? ?????? ? ????????
  • ????????, ????? ??????? ???? ???????
  • VS.NET ??????? ??????? ???? ?? ??????????,
    ???????? ????????? AssemblyInfo.cs

assembly AssemblyTitle("") assembly
AssemblyDescription("") assembly
AssemblyConfiguration("") assembly
AssemblyCompany("") assembly
AssemblyProduct("") assembly
AssemblyCopyright("") assembly
AssemblyTrademark("") assembly
AssemblyCulture("") assembly
AssemblyVersion("1.0.") assembly
AssemblyDelaySign(false) assembly
AssemblyKeyFile("") assembly
AssemblyKeyName("")
13
????? ????????? ?? ???????
  • ????? ?? ????????? ?? ???????? ????????????? ??
    ???? ???????
  • ???
  • ??????
  • ???????
  • ??? ?? ????????? ????
  • ??????
  • ???? ????? ??????????? ????????? ????? ?? ??
    ?????????? ? GAC

"myDll, Version1.0.0.1, Cultureneutral,
PublicKeyToken 9b35aa32c18d4fb1"
14
???????????? 2
  • ????????? ?? ????? ????????? ???????

15
Global Assembly Cache (GAC)
  • ?????????, ? ????? ?? ?????????? ?????????
    ????????? (shared assemblies)
  • ????? ?? ?? ????????? ?? ?????? ??????????
  • ???????? ? ?????????????? ? GAC ?? ??? ????????
    ?????? ?? ???? ???????
  • ?????? ?? ?????????????? ?? GAC
  • gacutil
  • Windows Explorer Shell Extension
  • .NET Configuration Management Console

16
??????????? ? GAC
  • ?????-??????????? ????????? ????? ?? ??
    ?????????? ? Global Assembly Cache
  • ??????????? ? ????????????? ?? GAC
  • ??? ???????? ?? ?????????? ?? ????? ???????
    (A.dll) ??? ?????-????????? ??????? (S.dll)
  • ?????????? ???? ?? S.dll ?? ??????? ?
    ????????????? ??????? A.dll
  • ???? A.dll ?? ??????? ???? ? ??????????? ??????
    ?? ????????? S.dll

gacutil i MyAssembly.dll
gacutil u MyAssembly
17
???????????? 3
  • ?????? ? GAC (gacutil, shellextension)

18
??????
  • ???? ??????? ???? ?? ?? ?????? ?? ??????? ?????
  • ????? ???? ?? ??? ?? ?????? ?????
  • ???? ?? ??? ??????? ????????? ?? ?????????
  • ???????? ?? ????????, ???? ??? ???????????? ??
    ?????? ?? ???
  • ?????? ???? ?? ?? ? ???????? ???????
  • jpg, xls, dbf
  • VS.NET ????????? ???? ??????? ? ???? ????? (??
    ???????? ?????-??????? ?????????)

19
?????? ??????
  • FUT.cs ????? ?????????? ??????

namespace FrequentlyUsedTypes public class
AFrequentlyUsedType
RUT.cs ????? ?????????? ??????
namespace RarelyUsedTypes public class
ARarelyUsedType
20
?????? ??????
  • RUT.netmodule MyLibrary.dll

21
???????????? 4
  • ????????? ?? ?????-??????? ???????

22
?????? ??????
  • RUT.netmodule MyLibrary.dll

FUT.netmodule
23
???????????? 5
  • ????????? ?? ?????-??????? ??????? ????
    ??????????? al.exe

24
??????? ?? ???????
  • ??????, ? ????? ?????? ???????
  • ??? ????????? ?? ?????? ????? ????????? ???????
    (Late Binding)
  • ??? ??????????, ?????????? ????? ?????????
  • ??? ????????? ?? ????? ????????? ??????? ?? GAC
  • ??? ????????? ?? ?????? ????? ????????? ???????
  • ???????? ?? ??????? ?? ?????? probing

25
??????? ?? ????????? (probing)
  • ??????? ?? ????? ????????? ???????
  • ??????
  • ???????? ?? ? BaseDir
  • ??????? ?? ?? ????????? MyAssembly

?????? ? ???????????????? ????
BaseDir\MyAssembly.dll BaseDir\MyAssembly\MyAssemb
ly.dll BaseDir\privatePath1\MyAssembly.dll BaseDir
\privatePath1\MyAssembly\MyAssembly.dll BaseDir\pr
ivatePath2\MyAssembly.dll BaseDir\privatePath2\MyA
ssembly\MyAssembly.dll (????? ?????? ???????, ??
? ?????????? .exe)
26
??????? ?? ????????? (probing)
  • ??? ?? ??????? ?? ???????, CLR ?? ?? ????? ??
    ???????? ?????
  • ????????? ? ??????????? ???????
  • ???????? ?????????? ?? ????????????
  • ???????????? ? ????? ?? ????????? (AsmbName)
  • ???????? ?????? ?????? ?? ???????, ???????? ?
    ???????????????? ????
  • ??? ????? ?? ???????? ?????? ? ?????????? ? ?????
    ?? ?????????

27
??????? ?? ????????? ?????????
  • ????????? ????????? ????????? ??? ????????
    ???????, ???????? ?? ?????????????
  • ??????
  • ???????? ?? ? BaseDir
  • ??????? ?? ?? MyAsmb ? ??????? en-US

BaseDir\en-US\MyAsmb.dll BaseDir\en-US\MyAsmb\MyAs
mb.dll BaseDir\en-US\privatePath1\MyAsmb.dll BaseD
ir\en-US\privatePath1\MyAsmb\MyAsmb.dll BaseDir\en
-US\privatePath2\MyAsmb.dll BaseDir\en-US\privateP
ath2\MyAsmb\MyAsmb.dll (????? ?????? ???????, ??
? ?????????? .exe)
28
??????????????? ???????
  • App.exe.config (Web.config)
  • ????????? ??
  • ?? ??????????????
  • ?? ????????????? ?? ??????
  • ?? ??????? ?? ??????
  • ?????? ???????? ?? ?????? ? ????????
  • ????? ?? ?? ??????? ????????????? ?????????? ?????

29
????????. ??????? ??????
lt?xml version"1.0" encoding"utf-8"?gt ltconfigurat
iongt ltruntimegt ltassemblyBinding
xmlns"urnschemas-microsoft-comasm.v1"gt
ltprobing privatePath"libbin\debug"/gt
lt/assemblyBindinggt lt/runtimegt ltappSettingsgt
ltadd key"http-proxy" value"10.0.0.13128"/gt
lt/appSettingsgt lt/configurationgt
?????? ?????? ?? ??????? ?? ?????????
????????????? ????? ?? ????????????
30
???????????? 6
  • ????????? ? ??????????????? ???????

31
????????? ? Deployment???????? ??!
????????
?????? ??????? ????????? ???????, Sciant Inc.
www.sciant.com Microsoft Student
Consultant www.fmi.uni-sofia.bg/microsoft/
32
??????????
  1. ???????? ??????? Student.dll ??? ????? ??? ?
    ??????? ? ??????????? ?? ???????? ?????????? ???
    "???????", ???????? "??????? ??? ???", ???????
    "bg-BG", ?????? "0.0.0.1". ????????? ????????? ?
    ?????? ????, ????? ?????????? ????.
  2. ???????????? ????????? Student.dll ? GAC (?
    Windows Explorer ??? ? ?????????? ?? gacutil).
  3. ?????????????? ??????? Student.dll ?? GAC (?
    Windows Explorer, ? ?????????? ?? gacutil).
  4. ???????? ????? Student, ????? Professor ? ?????
    Employee. ????????? ?? ? ????????? Faculty.dll.
  5. ???????? ???? ????? ??? ????-??????????? ???????
    Faculty.dll ?????? ?? ????????? (??? ?????? ??
    ????? ?? ??? http//fmi.uni-sofia.bg).

33
?????????? ??????????
  • Microsoft QuickStart Tutorials How Do
    I...Create an assembly with a strong name?
    http//samples.got dotnet.com/quickstart/howto/doc
    /sharedname.aspx
  • Microsoft QuickStart Tutorials MSDN Library,
    How Do I...Create a delay signed shared assembly?
    http//samples.gotdotnet.com/quickstart/howto/do
    c/delaysign.aspx
  • Microsoft QuickStart Tutorials How Do I...Work
    with the global assembly cache?
    http//samples.gotdot net.com/quickstart/howto/doc
    /gac.aspx
  • Microsoft QuickStart Tutorials How Do
    I...Change the search path for private
    assemblies? http//samples. gotdotnet.com/quicks
    tart/howto/doc/searchpath.aspx
  • Microsoft QuickStart Tutorials How Do I...Use
    Assembly Version Policy? http//samples.gotdotne
    t. com/quickstart/howto/doc/Version.aspx

34
?????????? ??????????
  • Microsoft QuickStart Tutorials How Do
    I...Create a Publisher Policy Assembly?
    http//samples. gotdotnet.com/quickstart/howto/doc
    /pubpolicy.aspx
  • MSDN Library, Packaging and Deploying .NET
    Framework Applications http//msdn.microsoft.com
    / library/default.asp?url/library/en-us/cptutoria
    ls/html/ packaging_and_deploying__net_framework_ap
    plications.asp
  • MSDN Library, Configuration File Schema
    http//msdn.microsoft.com/library/default.asp?url
    /library/en-us/cpgenref/html/ gngrfnetframeworkco
    nfigurationfileschema.asp
  • MSDN Library, Ildasm.exe Tutorial http//msdn.
    microsoft.com/library/default.asp?url/library/en-
    us/cptutorials/html/il_dasm_tutorial.asp

35
?????????? ??????????
  • MSDN Library, .NET Framework Reference
    Documentation http//msdn.microsoft.com/netframe
    work/support/documentation/default.aspx?pull/lib
    rary/en-us/netstart/html/cpframeworkref_start.asp
  • MSDN Library, Glossary http//msdn.microsoft.com
    / netframework/support/documentation/default.aspx?
    pull/library/en-us/netstart/html/cpframeworkref_s
    tart.asp
  • MSDN Library, Assemblies http//msdn.microsoft.
    com/library/default.asp?url/library/en-us/cpguide
    / html/cpconassemblies.asp
Write a Comment
User Comments (0)
About PowerShow.com