FAQ's for Developers: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
(NUnit problem 64 bit)
No edit summary
Line 1: Line 1:
= Compiler Errors =
==Compiling==
== File name xyz is too long or invalid ==
 
=== Compiler Errors ===
==== Q: I get 'File name xyz is too long or invalid' message====
  [solution] Building 'Ict.Petra.Client.MReporting.Gui.MConference' [Debug] ...
  [solution] Building 'Ict.Petra.Client.MReporting.Gui.MConference' [Debug] ...
  [solution] CSC: Error CS2021: File name '..\..\..\..\_bin\ObjCode\Ict.Petra.Client.MReporting.Gui.MConference.TFrmAttendanceSummaryReport.resources' is too long or invalid
  [solution] CSC: Error CS2021: File name '..\..\..\..\_bin\ObjCode\Ict.Petra.Client.MReporting.Gui.MConference.TFrmAttendanceSummaryReport.resources' is too long or invalid
Line 11: Line 13:
  [solution] CSC: Error CS2021: File name '..\..\..\..\_bin\ObjCode\Ict.Petra.Client.MReporting.Gui.MPersonnel.TFrmEmergencyContactReportStaff.resources' is too long or invalid
  [solution] CSC: Error CS2021: File name '..\..\..\..\_bin\ObjCode\Ict.Petra.Client.MReporting.Gui.MPersonnel.TFrmEmergencyContactReportStaff.resources' is too long or invalid
  [solution] Project 'Ict.Petra.Client.MReporting.Gui.MPersonnel' failed!
  [solution] Project 'Ict.Petra.Client.MReporting.Gui.MPersonnel' failed!
Solution: my working path had too many characters "C:\Documents and Settings\timotheusp\My Documents\openpetra\bzr\dev_0000159_exportimportgiftbatch". I renamed the branch part, and compilation works fine again!


= NUnit =
'''Solution''': my working path had too many characters "C:\Documents and Settings\timotheusp\My Documents\openpetra\bzr\dev_0000159_exportimportgiftbatch". I renamed the branch part, and compilation works fine again!
== Assembly Not Loaded: System.BadImageFormatException ==
 
 
==Unit Testing==
 
=== NUnit ===
==== Q: I get 'Assembly Not Loaded: System.BadImageFormatException' Exception====
When starting NUnit on 64-bit Windows, you might get this error:
When starting NUnit on 64-bit Windows, you might get this error:
  Assembly Not Loaded
  Assembly Not Loaded
Line 21: Line 27:
  You may be attempting to load an assembly built with a later version of the CLR than the version  
  You may be attempting to load an assembly built with a later version of the CLR than the version  
  under which NUnit is currently running (2.0.50727) or trying to load a 64-bit assembly into a 32-bit process.
  under which NUnit is currently running (2.0.50727) or trying to load a 64-bit assembly into a 32-bit process.
Solution: run the nunit-x86.exe instead of the nunit.exe from your directory C:\Program Files (x86)\NUnit 2.5.8\bin\net-2.0 or similar.
 
'''Solution''': run the nunit-x86.exe instead of the nunit.exe from your directory C:\Program Files (x86)\NUnit 2.5.8\bin\net-2.0 or similar.
 
 
==Other FAQ Pages==
[[FAQ's for the General Community]]

Revision as of 16:20, 31 January 2011

Compiling

Compiler Errors

Q: I get 'File name xyz is too long or invalid' message

[solution] Building 'Ict.Petra.Client.MReporting.Gui.MConference' [Debug] ...
[solution] CSC: Error CS2021: File name '..\..\..\..\_bin\ObjCode\Ict.Petra.Client.MReporting.Gui.MConference.TFrmAttendanceSummaryReport.resources' is too long or invalid
[solution] Project 'Ict.Petra.Client.MReporting.Gui.MConference' failed!
[solution] Continuing build with non-dependent projects.
[solution] Building 'Ict.Petra.Client.MFinance.Gui.Gift' [Debug] ...
[solution] Building 'Ict.Petra.Client.MPartner.Gui' [Debug] ...
[solution] Building 'Ict.Petra.Client.MReporting.Gui.MPersonnel' [Debug] ...
File name '..\..\..\..\_bin\ObjCode\Ict.Petra.Client.MReporting.Gui.MConference.TFrmAttendanceSummaryReport.resources' is too long or invalid
[solution] CSC: Error CS2021: File name '..\..\..\..\_bin\ObjCode\Ict.Petra.Client.MReporting.Gui.MPersonnel.TFrmEmergencyContactReportStaff.resources' is too long or invalid
[solution] Project 'Ict.Petra.Client.MReporting.Gui.MPersonnel' failed!

Solution: my working path had too many characters "C:\Documents and Settings\timotheusp\My Documents\openpetra\bzr\dev_0000159_exportimportgiftbatch". I renamed the branch part, and compilation works fine again!


Unit Testing

NUnit

Q: I get 'Assembly Not Loaded: System.BadImageFormatException' Exception

When starting NUnit on 64-bit Windows, you might get this error:

Assembly Not Loaded
System.BadImageFormatException : Could not load file or assembly 'Tests.Common, Version=0.0.9.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 
An attempt was made to load a program with an incorrect format.
You may be attempting to load an assembly built with a later version of the CLR than the version 
under which NUnit is currently running (2.0.50727) or trying to load a 64-bit assembly into a 32-bit process.

Solution: run the nunit-x86.exe instead of the nunit.exe from your directory C:\Program Files (x86)\NUnit 2.5.8\bin\net-2.0 or similar.


Other FAQ Pages

FAQ's for the General Community