0

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...???

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862

1 Answers1

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.

josef
  • 5,951
  • 1
  • 13
  • 24
  • I have seen answers elsewhere saying that that is exactly what was causing other people problems - that they had "Any CPU" selected when what they needed was "x86." Further confusing matters is that when you install the CF on a handheld device, you have to choose between a plethora of choices as to which one to deploy (armv4, mipsii, mipsiv, sh4, x86). – B. Clay Shannon-B. Crow Raven Apr 28 '14 at 18:02
  • According to a text file I found on my device (one which was obviously auto-genned): "Device CPU: 'ARMV4I'" – B. Clay Shannon-B. Crow Raven Apr 28 '14 at 18:34
  • 1
    DotNet uses an IL. The device's or host's runtimes must match the processor. Similar to JAVA runtimes: the java apps use an IL and the Java runtimes must be compatible with the processor and OS, but the Java app remains independet from processor. – josef Apr 29 '14 at 08:14
  • So what you're saying is the cab that needs to be installed on the handheld device is that one from the armv4 folder, right? – B. Clay Shannon-B. Crow Raven Apr 29 '14 at 15:45
  • 1
    Correct, you need to install the cab from the correct processor dir: ArmV4 or ArmV4i or whatever. If the cab does not match the processor of the device it will be normally rejected (depends on the cab settings) by the device. – josef May 01 '14 at 08:41
  • "This is one of your confusing attempts to flood stackoverflow" Actually, this is one of my attempts to extract "wisdom" from the StackOverflow crowd. I quotarized the word "wisdom" because, contrary to popular opinion, knowledge != wisdom. – B. Clay Shannon-B. Crow Raven May 01 '14 at 15:48