У меня есть две ссылки на сборку SQLite: одну для 32-битной и одну для 64-битной, которая выглядит так (это тестовый проект, чтобы попытаться избавиться от предупреждения, не зацикливаться на нем пути):
<Reference Condition=" '$(Platform)' == 'x64' " Include="System.Data.SQLite, Version=1.0.61.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=AMD64">
<SpecificVersion>True</SpecificVersion>
<HintPath>..\..\LVK Libraries\SQLite3\version_1.0.65.0\64-bit\System.Data.SQLite.DLL</HintPath>
</Reference>
<Reference Condition=" '$(Platform)' == 'x86' " Include="System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<SpecificVersion>True</SpecificVersion>
<HintPath>..\..\LVK Libraries\SQLite3\version_1.0.65.0\32-bit\System.Data.SQLite.DLL</HintPath>
</Reference>
Это вызывает следующее предупреждение:
Warning 1 The referenced component 'System.Data.SQLite' could not be found.
Возможно ли, чтобы я избавился от этого предупреждения?
Один из способов взглянуть на него, чтобы просто настроить мой проект на 32-битный, когда я буду развиваться, и позволить сборщику исправлять ссылку при создании для 64-битного, но это кажется немного неудобным и, вероятно, ошибки.
Любые другие варианты?
Причина, по которой я хочу избавиться от этого, заключается в том, что предупреждение, по-видимому, подхвачено TeamCity и периодически помечено как что-то, что мне нужно для изучения, поэтому я хотел бы полностью избавиться от него.
Изменить. На ответ я пробовал это:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
...
<SqlitePath>..\..\LVK Libraries\SQLite3\version_1.0.65.0\32-bit</SqlitePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
...
<SqlitePath>..\..\LVK Libraries\SQLite3\version_1.0.65.0\32-bit</SqlitePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
...
<SqlitePath>..\..\LVK Libraries\SQLite3\version_1.0.65.0\64-bit</SqlitePath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
...
<SqlitePath>..\..\LVK Libraries\SQLite3\version_1.0.65.0\64-bit</SqlitePath>
</PropertyGroup>
а затем в моей ссылке:
<Reference Include="System.Data.SQLite">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(SqlitePath)\System.Data.SQLite.DLL</HintPath>
</Reference>
Это избавилось от предупреждения, но верно ли оно?