vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
SEPA-Dateien erstellen inkl. IBAN-, BLZ-/Kontonummernprüfung  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2024
 
zurück
Rubrik: Entwicklungsumgebung · VB-IDE allgemein   |   VB-Versionen: VB2008, VB201024.11.10
32-Bit VS2010Express Anwendung(VB) auf 64-Bit-Rechnern

Der Tipp/Trick beschreibt eine Möglichkeit, VB-Programme, die mit einem 32-Bit-System unter VS2010Express compiliert wurden, auf 64-Bit-Systemen anzuwenden.

Autor:   Dietrich HerrmannBewertung:     [ Jetzt bewerten ]Views:  13.461 
ohne HomepageSystem:  Win2k, WinXP, Win7, Win8, Win10, Win11kein Beispielprojekt 

Ich hatte das Problem, dass ich ein auf meinem System (32-Bit, Windows7, VS2010Express) erstelltes Programm auf einem 64-Bit-System laufen lassen musste. Das ging zunächst nicht ohne Weiteres. Programm startete nicht. Nach einigen Recherchen im Internet fand ich einen Trick, der das dann ermöglichte.

Es reicht nicht aus und funkioniert auch nicht, dass für das Compilieren im VS2010E als Plattform 'Any CPU' voreingestellt ist. Mein Programm lief damit nicht auf 64-Bit. Der Trick besteht darin, dass man mittels Notepad (o.a. Texteditor) die Datei meinProjekt.vbproj ändert. In meinem Fall sah diese Datei original so aus:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <PublishUrlHistory>C:\Therapie\|publish\</PublishUrlHistory>
    <InstallUrlHistory>
    </InstallUrlHistory>
    <SupportUrlHistory>
    </SupportUrlHistory>
    <UpdateUrlHistory>
    </UpdateUrlHistory>
    <BootstrapperUrlHistory>
    </BootstrapperUrlHistory>
    <FallbackCulture>de-DE</FallbackCulture>
    <VerifyUploadedFiles>false</VerifyUploadedFiles>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <StartArguments>
    </StartArguments>
</PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <StartArguments>
    </StartArguments>
</PropertyGroup>
</Project>

Nun muss man die folgende Zeile an entsprechenden Stellen einkopieren:

<PlatformTarget>x86</PlatformTarget>

Danach sieht die .vbproj so aus:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <PublishUrlHistory>C:\Therapie\|publish\</PublishUrlHistory>
    <InstallUrlHistory>
    </InstallUrlHistory>
    <SupportUrlHistory>
    </SupportUrlHistory>
    <UpdateUrlHistory>
    </UpdateUrlHistory>
    <BootstrapperUrlHistory>
    </BootstrapperUrlHistory>
    <FallbackCulture>de-DE</FallbackCulture>
    <VerifyUploadedFiles>false</VerifyUploadedFiles>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <StartArguments>
    </StartArguments>
</PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <StartArguments>
    </StartArguments>
  <PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
</Project>

Speichern der .vbproj und das Projekt erneut compilieren.
Dann ist die Anwendung auf 64-Bit-System als 32-Bit-Anwendung lauffähig!