Red Gate forums :: View topic - Build Fails Using 64-bit MSBuild
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Build Fails Using 64-bit MSBuild

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
martincostello



Joined: 13 Sep 2011
Posts: 14
Location: London, UK

PostPosted: Thu Feb 16, 2012 11:41 am    Post subject: Build Fails Using 64-bit MSBuild Reply with quote

Hi,

I'm trying to use SmartAssembly from within targets called by the 64-bit version of MSBuild. The assembly to be processed by SmartAssembly is compiled as x86.

I get the following error in the MSBuild log:

Code:

  SmartAssembly v6.6.1.44
  Copyright Red Gate Software 2005-2012
  Loading project MyProject.saproj
    Input=MyTool.exe
    Output=MyTool.exe
  Loading...
  Starting...
SmartAssembly.targets(19,5): error : SmartAssembly build failed: [MyProject.csproj]
SmartAssembly.targets(19,5): error : Using Jet databases is not possible in 64 bits applications. Please compile your assembly targeting x86 platform. [MyProject.csproj]
SmartAssembly.targets : warning : Using Jet databases is not possible in 64 bits applications. Please compile your assembly targeting x86 platform. [MyProject.csproj]
SmartAssembly.targets : warning :    at ..(String ) [MyProject.csproj]
SmartAssembly.targets : warning :    at ..() [MyProject.csproj]
SmartAssembly.targets : warning :    at ..(String ) [MyProject.csproj]
SmartAssembly.targets : warning :    at ..( ) [MyProject.csproj]
SmartAssembly.targets : warning :    at ..( ) [MyProject.csproj]
SmartAssembly.targets : warning :    at SmartAssembly.ConsoleApp.PerformBuild(String ,  , Dictionary`2 ) [MyProject.csproj]
SmartAssembly.targets : warning :    at SmartAssembly.ConsoleApp.PerformProjectAction(String ,  , Todo , Dictionary`2 ) [MyProject.csproj]
SmartAssembly.targets : warning :    at SmartAssembly.ConsoleApp.CommandLineAction(String , Todo , Dictionary`2 ) [MyProject.csproj]
SmartAssembly.targets : warning :    at SmartAssembly.ConsoleApp.Run(String[] ) [MyProject.csproj]
Done Building Project "MyProject.csproj" (default targets) -- FAILED.


It appears that SmartAssembly is being called in-proc and inheriting the 64-bit-ness of MSBuild, and then failing due to a dependency on an 32-bit component (i.e. JET).

Building the same project using 32-bit MSBuild or using Visual Studio succeeds.

Regards,
Martin
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6643

PostPosted: Thu Feb 16, 2012 3:44 pm    Post subject: Reply with quote

Hi Martin,

Sorry to say the only thing you can do about this is to move SmartAssembly's database to SQL Server. There is no 64-bit API for Jet (Access) databases.
Back to top
View user's profile Send private message
martincostello



Joined: 13 Sep 2011
Posts: 14
Location: London, UK

PostPosted: Thu Feb 16, 2012 3:45 pm    Post subject: Reply with quote

Ah - I must have something misconfigured somewhere, as SmartAssembly should be pointing at our in-house SQL server database.
Back to top
View user's profile Send private message
martincostello



Joined: 13 Sep 2011
Posts: 14
Location: London, UK

PostPosted: Thu Feb 16, 2012 3:50 pm    Post subject: Reply with quote

Indeed, I had forgotten to configure SmartAssembly with our custom SQL database name and web service URL when I installed it onto a different build server. User error :)

It might be worth wrapping the exception in a future version of SmartAssembly so an error such as "MDB databases cannot be used calling SmartAssembly from a 64-bit MSBuild process." is printed to the MSBuild log. I'd have probably found the configuration issue a lot quicker if that had been the case, as the message lead me to believe it was a SmartAssembly bug.

Regards,
Martin
Back to top
View user's profile Send private message
larryroth



Joined: 22 Mar 2012
Posts: 1

PostPosted: Thu Mar 22, 2012 8:47 am    Post subject: 64 bit and Standard Edition Reply with quote

Hi,

I am trying to run a TFS build using SmartAssembly and my Build Server is 64 bit. I cannot change the target platform of the Solution because my projects rely on it being set to 64 bit. I have the Standard Edition of SmartAssembly, so I cannot switch to from Access to SQL Server.

Help! What are my options here??

Thanks,

Larry
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group