未为项目设置OutputPath属性
构建我的Jenkins / MSBuild解决方案会给我这个错误
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(483,9): error : The OutputPath property is not set for project '<projectname>.csproj'. Please check to
make sure that you have specified a valid combination of Configuration and Platform
for this project. Configuration='Latest' Platform='AnyCPU'. You may be seeing this
message because you are trying to build a project without a solution file, and have
specified a non-default Configuration or Platform that doesn't exist for this project.
[C:\<path>\<projectname>.csproj]
有任何想法吗?
我的.csproj文件中有这个
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Latest|AnyCPU'"> <OutputPath>bin\Latest\</OutputPath>
</PropertyGroup>
回答:
在文本编辑器中打开csproj,看看是否有一个属性组部分,应如下所示:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Latest|AnyCPU' "> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Latest\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
您是否有“最新”构建配置?如果没有,则将以上部分添加到csproj中。
以上是 未为项目设置OutputPath属性 的全部内容, 来源链接: utcz.com/qa/426086.html