我有一個第三方DLL,我需要在解決方案中的多個c#項目中引用。在多個項目中引用常見的二進制文件
目前引用如下。
<Reference Include="Contoso.App, Version=4.0.5.0, Culture=neutral, PublicKeyToken=xxxxxxxx, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ThirdParty\Contoso\4.0.5.0\Contoso.App.dll</HintPath>
</Reference>
我有我的解決方案大約40個項目,其中引用Contoso.App.Dll
每當DLL版本改變一個新的文件夾,如下所示
..\ThirdParty\Contoso\5.0\
我必須去創建並按照以下方式更新我所有的40個項目。
<Reference Include="Contoso.App, Culture=neutral, PublicKeyToken=xxxxxxxx, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ThirdParty\Contoso\5.0\Contoso.App.dll</HintPath>
</Reference>
有沒有更好的方法來管理DLL的版本更改?
我可以在解決方案中創建單個變量並在所有項目中重複使用它嗎?
你在所有解決方案中的項目中使用它或者是它只是一個子集? – Scheme
其實並非所有的項目。我有大約70個解決方案項目。其中40個引用了DLL。 –
你爲什麼不使用'\第三方\ Contoso的\ CURRENTVERSION \ Contoso.App.dll'的路徑和DLL版本5.0複製到其中。 – TriV