首页 文章

错误:未为项目'Project.Web.csproj'设置OutputPath属性

提问于
浏览
0

构建我的Jenkins / MSBuild解决方案给了我这个错误

建设开始于18-03-2017 14:38:15 . 节点1上的项目"C:\Program Files (x86)\Jenkins\workspace\Development\Project.Web\Project.Web.csproj"(默认目标) . C:\ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets(609,5):错误:未为项目'Project.Web.csproj'设置OutputPath属性 . 请检查以确保您为此项目指定了Configuration和Platform的有效组合 .
配置= 'Release'平台= 'BPC' . 您可能会看到此消息,因为您正在尝试构建没有解决方案文件的项目,并且已指定了此项目不存在的非默认配置或平台 . [C:\ Program Files(x86)\ Jenkins \ workspace \ Development \ Project.Web \ Project.Web.csproj]完成构建项目"C:\Program Files (x86)\Jenkins\workspace\Development\Project.Web\Project.Web.csproj"(默认目标) - 失败 .

Build 失败 .

"C:\Program Files (x86)\Jenkins\workspace\Development\Project.Web\Project.Web.csproj"(默认目标)(1) - >(_ CheckForInvalidConfigurationAndPlatform target) - > C:\ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets(609,5):错误:未设置OutputPath属性对于项目'Project.Web.csproj' . 请检查以确保您为此项目指定了Configuration和Platform的有效组合 .
配置= 'Release'平台= 'BPC' . 您可能会看到此消息,因为您正在尝试构建没有解决方案文件的项目,并且已指定了此项目不存在的非默认配置或平台 . [C:\ Program Files(x86)\ Jenkins \ workspace \ Development \ Project.Web \ Project.Web.csproj]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.61构建步骤'使用MSBuild构建Visual Studio项目或解决方案'标记构建为失败完成:FAILURE

我在.csproj文件中有这个

<PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">Any CPU</Platform>
    <ProductVersion>
    </ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{F1258E67-9E32-480033D0}</ProjectGuid>
    <ProjectTypeGuids>{349c5851-65df-165b846f21};{fae04ef79efbc}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Project.Web</RootNamespace>
    <AssemblyName>Project.Web</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <MvcBuildViews>false</MvcBuildViews>
    <UseIISExpress>true</UseIISExpress>
    <IISExpressSSLPort />
    <IISExpressAnonymousAuthentication />
    <IISExpressWindowsAuthentication />
    <IISExpressUseClassicPipelineMode />
    <WebGreaseLibPath>..\packages\WebGrease.1.5.2\lib</WebGreaseLibPath>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-VersionIncrement|Any CPU' ">
    <OutputPath>bin\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    <ErrorReport>prompt</ErrorReport>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Any CPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <PlatformTarget>AnyCPU</PlatformTarget>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Any CPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>

1 回答

  • 0

    看起来您尝试构建具有错误项目' platform and configuration for current solution'平台和配置的解决方案 . 如何在项目中定义平台 BPC 未定义 . 检查 .sln 文件或仅使用 MSBuild 构建 .csproj 文件 .

相关问题