How can I solve the “The OutputPath property is not set for this project” err?

送分小仙女□ 提交于 2019-12-23 05:27:04

问题


In my Windows CE app, I have been trying to change all project references from "Any CPU" (or "AnyCPU") to "x86"

To do so, I've hand-edited the .csproj file (Project > Properties... only has "Any CPU" available as an option, no "x86" (or anything else).

Now that I've dont that, though, I get, "The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='Debug' Platform='AnyCPU'"

Where the problem is I can't imagine. The .csproj file no longer has any "CPU" in it!

And now I notice that there is also a mysterious .csdproj (extra "d" embedded within the extension) file, too... but that also has no "CPU" let alone "AnyCPU" in it...

Furthering the confusion is that the .csproj file seems to indicate that many DLLs are required by the project, such as Symbol*.DLL files - yet these do not exist on the handheld device, and the .exe runs there fine. What's going on?

Here is the .csproj file (with the especially boring parts elided), followed by the .csdproj file:

<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectType>Local</ProjectType>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{CA63566E-76DE-4EE5-8292-71EBF90A9AC9}</ProjectGuid>
    <SccAuxPath>SAK</SccAuxPath>
    <SccProvider>SAK</SccProvider>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <ApplicationIcon>.\HHS.ico</ApplicationIcon>
    <AssemblyKeyContainerName>
    </AssemblyKeyContainerName>
    <AssemblyName>HHS</AssemblyName>
    <AssemblyOriginatorKeyFile>
    </AssemblyOriginatorKeyFile>
    <DelaySign>false</DelaySign>
    <OutputType>WinExe</OutputType>
    <OutputFileFolder>\Program Files\PDAClient</OutputFileFolder>
    <RootNamespace>PDAClient</RootNamespace>
    <StartupObject>PDAClient.MainApplication</StartupObject>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation>
    </UpgradeBackupLocation>
    <OldToolsVersion>0.0</OldToolsVersion>
    <NativePlatformName>Windows CE</NativePlatformName>
    <FormFactorID>
    </FormFactorID>
  </PropertyGroup>
  <PropertyGroup>
    <PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
    <PlatformFamilyName>WindowsCE</PlatformFamilyName>
    <DeployDirSuffix>$(AssemblyName)</DeployDirSuffix>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <OutputPath>bin\Debug\</OutputPath>
    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
    <BaseAddress>0</BaseAddress>
    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
    <ConfigurationOverrideFile>
    </ConfigurationOverrideFile>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DocumentationFile>
    </DocumentationFile>
    <DebugSymbols>true</DebugSymbols>
    <FileAlignment>4096</FileAlignment>
    <Optimize>false</Optimize>
    <RegisterForComInterop>false</RegisterForComInterop>
    <RemoveIntegerChecks>false</RemoveIntegerChecks>
    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
    <WarningLevel>4</WarningLevel>
    <DebugType>full</DebugType>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <OutputPath>bin\Release\</OutputPath>
    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
    <BaseAddress>0</BaseAddress>
    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
    <ConfigurationOverrideFile>
    </ConfigurationOverrideFile>
    <DefineConstants>
    </DefineConstants>
    <DocumentationFile>
    </DocumentationFile>
    <DebugSymbols>false</DebugSymbols>
    <FileAlignment>4096</FileAlignment>
    <Optimize>true</Optimize>
    <RegisterForComInterop>false</RegisterForComInterop>
    <RemoveIntegerChecks>false</RemoveIntegerChecks>
    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
    <WarningLevel>4</WarningLevel>
    <DebugType>none</DebugType>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <GenerateSerializationAssemblies>off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="HUtilCE, Version=1.5.0.1, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\HHS\HUtilCE.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.WindowsCE.Forms">
      <Name>Microsoft.WindowsCE.Forms</Name>
    </Reference>
    <Reference Include="mscorlib">
      <Name>MSCorLib</Name>
      <Private>False</Private>
    </Reference>
    <Reference Include="OpenNETCF, Version=1.3.50123.0, Culture=neutral">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\HHS\OpenNETCF.dll</HintPath>
    </Reference>
    <Reference Include="OpenNETCF.Windows.Forms, Version=1.3.50123.0, Culture=neutral">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\HHS\OpenNETCF.Windows.Forms.dll</HintPath>
    </Reference>
    <Reference Include="Symbol">
      <Name>Symbol</Name>
    </Reference>
    <Reference Include="Symbol.Barcode">
      <Name>Symbol.Barcode</Name>
    </Reference>
    <Reference Include="Symbol.BarcodeForms">
      <Name>Symbol.BarcodeForms</Name>
    </Reference>
    <Reference Include="Symbol.Printing">
      <Name>Symbol.Printing</Name>
    </Reference>
    <Reference Include="Symbol.StandardForms">
      <Name>Symbol.StandardForms</Name>
    </Reference>
    <Reference Include="System">
      <Name>System</Name>
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Data">
      <Name>System.Data</Name>
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Data.SqlClient">
      <Name>System.Data.SqlClient</Name>
    </Reference>
    <Reference Include="System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=3be235df1c8d2ad3, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System.Drawing">
      <Name>System.Drawing</Name>
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Windows.Forms">
      <Name>System.Windows.Forms</Name>
      <Private>False</Private>
    </Reference>
    <Reference Include="System.Xml">
      <Name>System.XML</Name>
      <Private>False</Private>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="AppSettings.cs">
      <SubType>Code</SubType>
    </Compile>
    <Compile Include="AssemblyInfo.cs">
      <SubType>Code</SubType>
    </Compile>
. . .
    <Compile Include="WriteXML.cs">
      <SubType>Code</SubType>
    </Compile>
    <EmbeddedResource Include="frmAbout.resx">
      <DependentUpon>frmAbout.cs</DependentUpon>
    </EmbeddedResource>
. . .
    <EmbeddedResource Include="PrinterPickerForm.resx">
      <DependentUpon>PrinterPickerForm.cs</DependentUpon>
    </EmbeddedResource>
    <Content Include="HHS.ico">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="HHT.ICO">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
        <HostingProcess disable="1" />
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
  <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
  <PropertyGroup>
    <PreBuildEvent>
    </PreBuildEvent>
    <PostBuildEvent>
    </PostBuildEvent>
  </PropertyGroup>
  <Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
</Project>

PDAClient.csdproj has no "AnyCPU" (or "x86") in it...

UPDATE

Now the project file says it is "unavailable" when I unload the project in order to edit it (the .csproj file); maybe it always said that, and I just noticed it, but at any rate it's "interesting" that it's unavailable; I can access/edit it from Windows Explorer...

UPDATE 2

Closing and reopening the project caused it to tell me it had been created in an earlier version of Visual Studio and needed to be upgraded..???...I let it go ahead, especially as it was creating a backup copy in place, and the error went away...???


回答1:


This is one of your confusing attempts to flood stackoverflow with questions about your project. There is no need to specify a processor architecture for a .NET project. DotNet produces IL code that will be translated by the DotNet runtimes.

You do NOT need to manipulate the project files.



来源:https://stackoverflow.com/questions/23276291/how-can-i-solve-the-the-outputpath-property-is-not-set-for-this-project-err

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!