gpt4 book ai didi

c# - 未为项目设置 OutputPath 属性

转载 作者:行者123 更新时间:2023-11-30 13:26:34 25 4
gpt4 key购买 nike

我有一个已在 Team City 中成功构建了一年多的解决方案。开发人员向解决方案添加了两个项目,我们立即收到以下错误:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(483, 9):未为项目“Compass.Communication.Server.Config.csproj”设置 OutputPath 属性。请检查以确保您已为此项目指定了有效的配置和平台组合。配置='DEV' 平台='AnyCPU'。您可能会看到此消息,因为您正尝试在没有解决方案文件的情况下构建项目,并且指定了该项目不存在的非默认配置或平台。

项目 Compass.Communication.Server.Config\Compass.Communication.Server.Config.csproj 失败。 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(483, 9):未为项目“Compass.Communication.Server.Processor.csproj”设置 OutputPath 属性。请检查以确保您已为此项目指定了有效的配置和平台组合。配置='DEV' 平台='AnyCPU'。您可能会看到此消息,因为您正尝试在没有解决方案文件的情况下构建项目,并且指定了该项目不存在的非默认配置或平台。

我已经尝试了我能找到的关于任何 CPU 与 AnyCPU 的大部分内容以及许多其他东西,但都没有成功。这是第一个的项目文件:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5FC19B70-7DB4-4D8A-B33F-748528E5A042}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Compass.Communication.Server.Config</RootNamespace>
<AssemblyName>Compass.Communication.Server.Config</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Compass.Communication.Server.Config.XML</DocumentationFile>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CommunicationConditionalElement.cs" />
<Compile Include="CommunicationConditionalSection.cs" />
<Compile Include="CommunicationConfigurationManager.cs" />
<Compile Include="CommunicationCriterionElement.cs" />
<Compile Include="CommunicationCriterionSection.cs" />
<Compile Include="CommunicationElementExtensions.cs" />
<Compile Include="CommunicationIntroductionElement.cs" />
<Compile Include="CommunicationIntroductionSection.cs" />
<Compile Include="CommunicationSectionElement.cs" />
<Compile Include="CommunicationSectionSection.cs" />
<Compile Include="CommunicationTypeElement.cs" />
<Compile Include="CommunicationTypeSection.cs" />
<Compile Include="GenericConfigurationElementCollection.cs" />
<Compile Include="RefElement.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Compass.Communication.Entities\Compass.Communication.Entities.csproj">
<Project>{25B8C709-0574-496E-BD1D-5F4DF966F258}</Project>
<Name>Compass.Communication.Entities</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

最佳答案

几周前我遇到了类似的问题,在我的案例中,问题是由于“任何 CPU”之间的空间引起的

您需要确保“AnyCPU”在构建定义中使用的任何位置都不包含任何空格。

问候

关于c# - 未为项目设置 OutputPath 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20891245/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com