Elvas Tower: Unable to Compile Testing Version "PostBuildActions.bat Exits with Code 1" - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Unable to Compile Testing Version "PostBuildActions.bat Exits with Code 1" Rate Topic: -----

#1 User is offline   Bill 

  • Apprentice
  • Group: Status: First Class
  • Posts: 7
  • Joined: 28-July 14
  • Gender:Male
  • Location:Southern US
  • Simulator:Open Rails
  • Country:

Posted 24 December 2023 - 05:56 AM

I am trying to compile the out of the box testing version, but I get the "Error MSB3073 The command "PostBuildActions.bat" exited with code 1."

In looking at the batch file, it fails on the following line:

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="PostBuildActions.bat" />
</Target>

If I remove the lines, the error goes away but I receive a runtime error about opening Mono Game files.

I suspect this is a simple issue but is there something I am missing that causes this error?

System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not find file 'C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Program\Content\Loading.mgfx'.
Source=mscorlib
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at Orts.Viewer3D.Shader.GetEffectCode(String filename) in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Shaders.cs:line 40
at Orts.Viewer3D.Shader..ctor(GraphicsDevice graphicsDevice, String filename) in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Shaders.cs:line 33
at Orts.Viewer3D.Processes.GameStateRunActivity.LoadingShader..ctor(GraphicsDevice graphicsDevice) in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 1611
at Orts.Viewer3D.Processes.GameStateRunActivity.LoadingMaterial..ctor(Game game) in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 1465
at Orts.Viewer3D.Processes.GameStateRunActivity.LoadingPrimitive.GetMaterial(Game game) in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 1340
at Orts.Viewer3D.Processes.GameStateRunActivity.LoadingPrimitive..ctor(Game game) in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 1332
at Orts.Viewer3D.Processes.GameStateRunActivity.Load() in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 156
at Orts.Viewer3D.Processes.LoaderProcess.Load() in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 161
at Orts.Viewer3D.Processes.LoaderProcess.DoLoad() in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 134
at Orts.Viewer3D.Processes.LoaderProcess.LoaderThread() in C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 111
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

#2 User is online   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,783
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 26 December 2023 - 01:36 PM

Hi Bill,

You must always fix the first problem.

You need to find out what the batch file is doing to get Error MSB3073.

Google show many reasons for the error, You should start there.

#3 User is online   superheatedsteam 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 505
  • Joined: 28-June 08
  • Location:Perth, WA
  • Country:

Posted 26 December 2023 - 04:37 PM

View PostBill, on 24 December 2023 - 05:56 AM, said:


System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not find file 'C:\Users\dnh75\source\repos\Open.Rails.T1.5.1-776-g362e836a2.Source\Program\Content\Loading.mgfx'.
Source=mscorlib


Is the Loading.mgfx file in the location the bat file is looking for it?

#4 User is offline   Bill 

  • Apprentice
  • Group: Status: First Class
  • Posts: 7
  • Joined: 28-July 14
  • Gender:Male
  • Location:Southern US
  • Simulator:Open Rails
  • Country:

Posted 12 January 2024 - 06:53 PM

View Postsuperheatedsteam, on 26 December 2023 - 04:37 PM, said:

Is the Loading.mgfx file in the location the bat file is looking for it?



Looks like I did not copy the Monogame files over to the Program\Content directory. Thanks for the tips.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users