【发布时间】:2017-03-10 05:53:19
【问题描述】:
从 Git 更新代码后,csproj 出现错误,因为 file 路径不存在。这是引发错误的代码:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ZAL_Release|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Release\bin\soft\</OutputPath>
<DefineConstants>TRACE;ZAL</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Optimize>true</Optimize>
<IntermediateOutputPath>C:\Users\HARRY~1\AppData\Local\Temp\vs543E.tmp\x64\ZAL_Release\</IntermediateOutputPath>
</PropertyGroup>
这个filepath 存在于Harry 的计算机上,但不在我的计算机上。这个名字的人不知道他是如何创建的,所以我假设是 Visual Studio 创建的。这就是为什么我有三个问题:
1. csproj 中的IntermediateOutputPath 标签的目的是什么? (我已经查过MSDN文档,但还是不清楚)
2. Harry 是如何生成代码的(因为他不知道)?
3. 是否可以使用通用变量来获取每个人都可以使用的文件路径?在这种情况下,这个IntermediateOutputPath 是程序运行所必需的吗?
【问题讨论】:
-
@TheGeorgeous :我不明白你为什么要我删除 csproj 文件然后打开项目。如果我这样做,它不会打开项目,我什至会丢失一些数据,比如项目引用。
-
无论如何,你绝对应该不从 git 中删除这个文件。 .csproj 文件是每个 Visual Studio 项目的中心项目文件,没有它,人们将无法处理您的项目。
标签: c# git visual-studio csproj