ClickOnce how to set: processorArchitecture="msil" ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CRS1
    New Member
    • Aug 2010
    • 2

    ClickOnce how to set: processorArchitecture="msil" ?

    Hello,

    I am using Visual Studio 2008 to build and deploy a C# ClickOnce Application for .NET 3.5. Yesterday, I had to find out that all a sudden, my ClickOnce deployment breaks. The users now get the error message that the identity of the application changed.

    I already googled a lot and found out what belongs to the identity of the application. Comparing the new ".applicati on" file in the publishing location to a backup of an old one, the only thing that changed is the processorArchit ecture. It used to be "msil" and now it is "x86".

    I did not change it on purpose nor should there be any reason why it must now be "x86" but I simply don't manage to change it back.

    I compared the Build tab settings for the last deployment to the ones for the current deployment.
    "Target Plattform" is in both cases "Any CPU" and also in the configuration manager all the project of the solution are set to (Release)"Any CPU".

    The settings might have been different in between, because I accidentally changed something - but now they should be back to what they were, however the output of the ".applicati on" file is still changed.

    Do you have any clues where I need to check for additional settings ? Or is there a way (from withing Visual Studio or otherwise) the set the processorArchit ecture back to "msil" ???

    Cheers, Christian
  • Alex Papadimoulis
    Recognized Expert New Member
    • Jul 2010
    • 26

    #2
    This happened to me at least once or twice.

    I wish I could be more specific as to how or why, but as I recall, the problem was that the project file got munged somehow. Looking at the XML of the .csproj, there were a whole bunch of publishing settings that were added, but that I couldn't change/modify from the UI.

    The way that I solved it was reverting to a previons version of the .csproj file and re-adding in whatever I needed to add in.

    Are you using ClickOnce through Visual Studio, or are you generating the manifest files through mage.exe?

    Comment

    • CRS1
      New Member
      • Aug 2010
      • 2

      #3
      Thanks a million for pointing me at the .csproj file - I already looked at this file, but the changes were so minor, I simply didnt't realized that they were essential. In my case, the fix was quite easy. The .csproj file has several sections like:

      Code:
        <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
          <DebugType>none</DebugType>
          <Optimize>true</Optimize>
          <OutputPath>bin\Release\</OutputPath>
          <DefineConstants>TRACE</DefineConstants>
          <ErrorReport>prompt</ErrorReport>
          <WarningLevel>4</WarningLevel>
          [B]<PlatformTarget>AnyCPU</PlatformTarget>[/B]
        </PropertyGroup>
      The relevant section is the one you select in Visual Studio by Configuration | Platform either in the Build tab of the Project or in the Standard Toolbar.

      Here somehow this line got added here:
      <PlatformTarget >AnyCPU</PlatformTarget>

      My wild guess would be that any changes you make to be Plattform setting causes the adding of such a line. You can change the <PlatformTarget > via Visual Studio's Build settings, but it seems, you cannot delete it - this is what you have to do manually in the .csproj file.

      ps. I don't use mage - just Visual Studio's dialogs.

      Comment

      Working...