PDA

View Full Version : compiling to any cpu not working


Deon
03-25-2011, 09:50 AM
I'm trying to build to any cpu but the 32 bit flag is still set on the resulting dll. If I build just through VS2005 then the 32 bit flag is cleared. It is if the build is done through VBPro that 32 bit flag is set. I'll list off the obvious settings that I have.

In VBPro:
- Configuration - Release|Any Cpu

In Visual Basic Project File
- Platform - Active(Any Cpu)
- Under Advanced Compile Options, Target CPU - AnyCPU

By the way I'm using "Corflags" to determine if the 32 bit flag is set on the dll.

Any ideas of what I'm doing wrong in VBPro. I'm using VBPro 6.2a

kinook
03-25-2011, 12:14 PM
VBP v6 is no longer being supported or updated, but the attached v7 project produces the expected result in v7.7a:

3/25/2011 11:11:53 AM: -------------------- Starting Build: 'build.bld' --------------------
3/25/2011 11:11:53 AM: Building project step 1 - Project steps...
3/25/2011 11:11:53 AM: Building project step 2 - Delete Files...
Delete files in folder 'C:\WindowsApplication1\WindowsApplication1\bin\Re lease\'...
WindowsApplication1.exe
1 file(s) deleted
3/25/2011 11:11:53 AM: Building project step 3 - Make VS 2005...
Pre-processing...

Rebuilding configuration 'Release|Any CPU'...
Microsoft (R) Build Engine Version 2.0.50727.42
[Microsoft .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation 2005. All rights reserved.

Build started 3/25/2011 11:11:53 AM.
__________________________________________________
Project "C:\WindowsApplication1\WindowsApplication1.sln" (rebuild target(s)):

Target ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
Target Rebuild:
Target WindowsApplication1:Rebuild:
__________________________________________________
Project "C:\WindowsApplication1\WindowsApplication1.sln" is building "C:\WindowsApplication1\WindowsApplication1\Windows Application1.vbproj" (Rebuild target(s)):

Target CoreClean:
Deleting file "bin\Release\WindowsApplication1.pdb".
Deleting file "bin\Release\WindowsApplication1.xml".
Deleting file "obj\Release\WindowsApplication1.Resources.resource s".
Deleting file "obj\Release\WindowsApplication1.vbproj.GenerateRes ource.Cache".
Deleting file "obj\Release\WindowsApplication1.exe".
Deleting file "obj\Release\WindowsApplication1.xml".
Deleting file "obj\Release\WindowsApplication1.pdb".
Target CoreResGen:
Processing resource file "My Project\Resources.resx" into "obj\Release\WindowsApplication1.Resources.resource s".
Target CoreCompile:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Vbc. exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collec tions,System.Collections.Generic,System.Data,Syste m.Drawing,System.Diagnostics,System.Windows.Forms /nowarn:42016,41999,42017,42018,42019,42032,42036,4 2020,42021,42022 /rootnamespace:WindowsApplication1 /doc:obj\Release\WindowsApplication1.xml /define:"CONFIG=\"Release\",TRACE=-1,_MyType=\"WindowsForms\",PLATFORM=\"AnyCPU\"" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0. 50727\System.Data.dll,C:\WINDOWS\Microsoft.NET\Fra mework\v2.0.50727\System.Deployment.dll,C:\WINDOWS \Microsoft.NET\Framework\v2.0.50727\System.dll,C:\ WINDOWS\Microsoft.NET\Framework\v2.0.50727\System. Drawing.dll,C:\WINDOWS\Microsoft.NET\Framework\v2. 0.50727\System.Windows.Forms.dll,C:\WINDOWS\Micros oft.NET\Framework\v2.0.50727\System.Xml.dll /main:WindowsApplication1.My.MyApplication /debug:pdbonly /optimize+ /out:obj\Release\WindowsApplication1.exe /resource:obj\Release\WindowsApplication1.Resources .resources /target:winexe Form1.vb Form1.Designer.vb "My Project\AssemblyInfo.vb" "My Project\Application.Designer.vb" "My Project\Resources.Designer.vb" "My Project\Settings.Designer.vb"
Target CopyFilesToOutputDirectory:
Copying file from "obj\Release\WindowsApplication1.exe" to "bin\Release\WindowsApplication1.exe".
WindowsApplication1 -> C:\WindowsApplication1\WindowsApplication1\bin\Rel ease\WindowsApplication1.exe
Copying file from "obj\Release\WindowsApplication1.pdb" to "bin\Release\WindowsApplication1.pdb".
Copying file from "obj\Release\WindowsApplication1.xml" to "bin\Release\WindowsApplication1.xml".

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.26
3/25/2011 11:11:54 AM: Building project step 4 - Run Program...
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.

Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 1
ILONLY : 1
32BIT : 0
Signed : 0
3/25/2011 11:11:54 AM: Build successfully completed (elapsed = 00:00:00).