Hallo Zusammen,
nach einer Neuinstallation von Windows habe ich mich entschieden VS 2012 Express zu installieren. Zuvor habe ich VS 2008 Express eingesetzt.
Nun habe ich ein mit VS 2008 erstelltes Projekt in VS 2012 geladen. Dabei wurde das Projekt korrekt aktualisiert, jedoch war danach Zielframework 4.0 eingestellt. Unter VS 2008 war es noch .Net 2.0.
Also habe ich in den Projekteigenschaften das Projekt zurückgesetzt auf Zielframework .Net 2.0.
Es wird erfolgreich kompiliert. Wenn ich jedoch in meinem Code eine externe OCX-Datei (32 Bit) anspreche, kommt folgende Fehldermeldung:
Eine nicht behandelte Ausnahme des Typs "System.BadImageFormatException" ist in Massenänderung.exe aufgetreten.
Zusätzliche Informationen: Die Datei oder Assembly "Interop.d3remote, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Die Assembly wird von einer Laufzeit erstellt, die aktueller als die derzeit geladene Laufzeit ist, und kann nicht geladen werden.
Anbei die vbproj, die entsprechende dll habe ich mit XXXXXXX maskiert.
Ich habe bereits längere Zeit nach einer Lösung geforscht, habe leider noch nichts finden können.
Gruß
derOptimist
nach einer Neuinstallation von Windows habe ich mich entschieden VS 2012 Express zu installieren. Zuvor habe ich VS 2008 Express eingesetzt.
Nun habe ich ein mit VS 2008 erstelltes Projekt in VS 2012 geladen. Dabei wurde das Projekt korrekt aktualisiert, jedoch war danach Zielframework 4.0 eingestellt. Unter VS 2008 war es noch .Net 2.0.
Also habe ich in den Projekteigenschaften das Projekt zurückgesetzt auf Zielframework .Net 2.0.
Es wird erfolgreich kompiliert. Wenn ich jedoch in meinem Code eine externe OCX-Datei (32 Bit) anspreche, kommt folgende Fehldermeldung:
Eine nicht behandelte Ausnahme des Typs "System.BadImageFormatException" ist in Massenänderung.exe aufgetreten.
Zusätzliche Informationen: Die Datei oder Assembly "Interop.d3remote, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Die Assembly wird von einer Laufzeit erstellt, die aktueller als die derzeit geladene Laufzeit ist, und kann nicht geladen werden.
Anbei die vbproj, die entsprechende dll habe ich mit XXXXXXX maskiert.
Code:
<?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> <PlatformTarget>x86</PlatformTarget> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{BF102140-73F8-4D13-A378-EFC5E9E873E9}</ProjectGuid> <OutputType>WinExe</OutputType> <StartupObject>Massenänderung.My.MyApplication</StartupObject> <RootNamespace>Massenänderung</RootNamespace> <AssemblyName>Massenänderung</AssemblyName> <FileAlignment>512</FileAlignment> <MyType>WindowsForms</MyType> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <OptionExplicit>On</OptionExplicit> <OptionCompare>Binary</OptionCompare> <OptionStrict>Off</OptionStrict> <OptionInfer>On</OptionInfer> <ApplicationIcon>0678-Programmicon.ico</ApplicationIcon> <ApplicationManifest>My Project\app.manifest</ApplicationManifest> <ManifestCertificateThumbprint>1EB2A094241E7CDC515BCF9FD1B2BA0DC1B32098</ManifestCertificateThumbprint> <ManifestKeyFile>Massenänderung_TemporaryKey.pfx</ManifestKeyFile> <GenerateManifests>true</GenerateManifests> <SignManifests>true</SignManifests> <IsWebBootstrapper>false</IsWebBootstrapper> <PublishUrl>publish\</PublishUrl> <Install>true</Install> <InstallFrom>Disk</InstallFrom> <UpdateEnabled>false</UpdateEnabled> <UpdateMode>Foreground</UpdateMode> <UpdateInterval>7</UpdateInterval> <UpdateIntervalUnits>Days</UpdateIntervalUnits> <UpdatePeriodically>false</UpdatePeriodically> <UpdateRequired>false</UpdateRequired> <MapFileExtensions>true</MapFileExtensions> <ApplicationRevision>1</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> <UseApplicationTrust>false</UseApplicationTrust> <PublishWizardCompleted>true</PublishWizardCompleted> <BootstrapperEnabled>true</BootstrapperEnabled> <FileUpgradeFlags> </FileUpgradeFlags> <UpgradeBackupLocation> </UpgradeBackupLocation> <OldToolsVersion>3.5</OldToolsVersion> <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>Massenänderung.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>Massenänderung.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.XML" /> </ItemGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Import Include="System.Collections" /> <Import Include="System.Collections.Generic" /> <Import Include="System.Data" /> <Import Include="System.Drawing" /> <Import Include="System.Diagnostics" /> <Import Include="System.Windows.Forms" /> </ItemGroup> <ItemGroup> <Compile Include="Datagridview_style.vb"> <SubType>Component</SubType> </Compile> <Compile Include="functions.vb" /> <Compile Include="Login.Designer.vb"> <DependentUpon>Login.vb</DependentUpon> </Compile> <Compile Include="Login.vb"> <SubType>Form</SubType> </Compile> <Compile Include="Main.vb"> <SubType>Form</SubType> </Compile> <Compile Include="Main.Designer.vb"> <DependentUpon>Main.vb</DependentUpon> <SubType>Form</SubType> </Compile> <Compile Include="My Project\AssemblyInfo.vb" /> <Compile Include="My Project\Application.Designer.vb"> <AutoGen>True</AutoGen> <DependentUpon>Application.myapp</DependentUpon> </Compile> <Compile Include="My Project\Resources.Designer.vb"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="My Project\Settings.Designer.vb"> <AutoGen>True</AutoGen> <DependentUpon>Settings.settings</DependentUpon> <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Include="validate.vb" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="Login.resx"> <DependentUpon>Login.vb</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Main.resx"> <DependentUpon>Main.vb</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="My Project\Resources.resx"> <Generator>VbMyResourcesResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.vb</LastGenOutput> <CustomToolNamespace>My.Resources</CustomToolNamespace> <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="My Project\Application.myapp"> <Generator>MyApplicationCodeGenerator</Generator> <LastGenOutput>Application.Designer.vb</LastGenOutput> </None> <None Include="My Project\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <CustomToolNamespace>My</CustomToolNamespace> <LastGenOutput>Settings.Designer.vb</LastGenOutput> </None> </ItemGroup> <ItemGroup> <COMReference Include="XXXXXXX"> <Guid>{740445A1-969B-11D2-8846-080009F80A1C}</Guid> <VersionMajor>1</VersionMajor> <VersionMinor>0</VersionMinor> <Lcid>0</Lcid> <WrapperTool>tlbimp</WrapperTool> <Isolated>False</Isolated> </COMReference> </ItemGroup> <ItemGroup> <None Include="Resources\XXXXXXX.OCX" /> </ItemGroup> <ItemGroup> <None Include="app.config" /> <None Include="Massenänderung_TemporaryKey.pfx" /> <None Include="My Project\app.manifest" /> <None Include="Resources\Interop.XXXXXXX.dll" /> </ItemGroup> <ItemGroup> <Content Include="0678-Programmicon.ico" /> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> <Visible>False</Visible> <ProductName>.NET Framework Client Profile</ProductName> <Install>false</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.2.0"> <Visible>False</Visible> <ProductName>.NET Framework 2.0 %28x86%29</ProductName> <Install>true</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.3.0"> <Visible>False</Visible> <ProductName>.NET Framework 3.0 %28x86%29</ProductName> <Install>false</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5"> <Visible>False</Visible> <ProductName>.NET Framework 3.5</ProductName> <Install>false</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> <Visible>False</Visible> <ProductName>.NET Framework 3.5 SP1</ProductName> <Install>false</Install> </BootstrapperPackage> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.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>
Ich habe bereits längere Zeit nach einer Lösung geforscht, habe leider noch nichts finden können.
Gruß
derOptimist
Comment