Understanding a csproj assembly reference

前端 未结 1 1227
醉梦人生
醉梦人生 2020-12-07 13:20

I am using VS2010 and I tried to add a few assemblies from local hard disk to my C# project through file reference. Peeking into the csproj file, I found someti

1条回答
  •  暖寄归人
    2020-12-07 13:50

    Which reference-type you get depends on how you link the assembly.

    • select the referenced assembly in the project-explorer
    • go to the properties-page

    there you find a boolean flag "specific Version"

    • true means: the assembly must have version=xxx
    • false means: ignore the assembly version

    (I only have a german-vs2010 so the english translation for the german "Spezifische Version" may be slightly different)

    [update]

    I tried the following using vcs2010-express german

    add reference with default SpecificVersion=False : no version

    
      ..\..\..\lib\fluentNHibernate\Castle.Core.dll
    
    

    modified reference: SpecificVersion=True : added version

    
      ..\..\..\lib\fluentNHibernate\Castle.Core.dll
    
    

    modified reference again: SpecificVersion=False : version remains and new element SpecificVersion

    
      ..\..\..\lib\fluentNHibernate\Castle.Core.dll
      False
    
    

    It seems that the specific version is remembered but ignorede because of False

    0 讨论(0)
提交回复
热议问题