为了尝试根据我的配置更新我的引用,我通过添加一个属性并更改所有引用以使用它来调整我的 .csproj 文件,如下所示:
<PropertyGroup>
<ReferencePath Condition=" '$(Configuration)' == 'Release'">foo\release\1.0.0.9\bin\</ReferencePath>
<ReferencePath Condition=" '$(Configuration)' == 'Debug'">bar\debug\</ReferencePath>
</PropertyGroup>
<Reference Include="BasicControls, Version=5.0.53.0, Culture=neutral, PublicKeyToken=25ad4b03c913ffff, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(ReferencePath)\BasicControls.dll</HintPath>
</Reference>
出现问题并阻止更改传播。我对 .csproj 文件所做的任何操作都不会更改引用的路径 - 无论我做什么,右键单击引用并在属性中查看它的路径会显示它在我开始编辑文件之前显示的相同路径。
- 我试过卸载和重新加载项目
- 我尝试将配置从 Debug 更改为 Release
- 我已经打开并关闭了解决方案
- 当解决方案关闭时,我删除了 .suo 文件。
- 我在解决方案资源管理器上单击了重新加载。
.csproj 中的所有引用都使用$(ReferencePath)
设置,并且我的 ReferencePaths 都不使用原始路径。
我错过了什么?我使用该物业的方式有问题吗?