You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this issue is present in the develop branch
I have searched open and closed issues to ensure it has not already been reported.
MonoGame Version
3.8.x
Which MonoGame platform are you using?
N/A
Operating System
Windows
Description
You get a weird error message with an exception in it when you specify the wrong target platform in MGCB when using the MonoGame.Content.Builder.Task in your project.
Steps to Reproduce
Add the wrong target platform to MGCB.
Minimal Example Repo
No response
Expected Behavior
Better error message.
Resulting Behavior
You get this error message:
2>------ Build started: Project: FrameworkTests, Configuration: Debug Any CPU ------
2>MonoGame Content Builder
2>Builds optimized game content for MonoGame projects.
2>
2>Invalid value 'Switch2' for option 'platform'
2>
2>Usage: dotnet <Options>
2>
2>Options:
2>Unhandled exception. System.IO.IOException: The handle is invalid.
2> at System.ConsolePal.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
2> at MonoGame.Content.Builder.MGBuildParser.ShowError(String message, Object[] args) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\Tools\MonoGame.Content.Builder\CommandLineParser.cs:line 570
2> at MonoGame.Content.Builder.MGBuildParser.SetOption(MemberInfo member, String value) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\Tools\MonoGame.Content.Builder\CommandLineParser.cs:line 404
2> at MonoGame.Content.Builder.MGBuildParser.ParseArgument(String arg) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\Tools\MonoGame.Content.Builder\CommandLineParser.cs:line 347
2> at MonoGame.Content.Builder.MGBuildParser.ParseFlags(String arg) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\Tools\MonoGame.Content.Builder\CommandLineParser.cs:line 278
2> at MonoGame.Content.Builder.MGBuildParser.Parse(IEnumerable`1 args) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\Tools\MonoGame.Content.Builder\CommandLineParser.cs:line 140
2> at MonoGame.Content.Builder.Program.Main(String[] args) in C:\BuildAgents\MonoGameWin1\work\f7381a85a626990\Tools\MonoGame.Content.Builder\Program.cs:line 35
2>C:\Users\tom\.nuget\packages\monogame.content.builder.task\3.8.0.1641\build\MonoGame.Content.Builder.Task.targets(138,5): error MSB3073: The command "dotnet C:\Users\tom\.nuget\packages\monogame.content.builder.task\3.8.0.1641\build\\..\tools\netcoreapp3.1\any\mgcb.dll /quiet /@:"D:\Projects\xxxxx\FrameworkTests\Content\content.mgcb" /platform:Switch2 /outputDir:"D:/Projects/xxxxx/FrameworkTests/Content/bin/Switch2/content" /intermediateDir:"D:/Projects/xxxxx/FrameworkTests/Content/obj/Switch2/content" /workingDir:"D:/Projects/xxxxx/FrameworkTests/Content/"" exited with code -532462766.
2>Done building project "FrameworkTests.csproj" -- FAILED.
Which is weird... that exception shouldn't be happening. It should also probably tell you what the correct platforms are.
Files
N/A
The text was updated successfully, but these errors were encountered:
Prerequisites
develop
branchMonoGame Version
3.8.x
Which MonoGame platform are you using?
N/A
Operating System
Windows
Description
You get a weird error message with an exception in it when you specify the wrong target platform in MGCB when using the
MonoGame.Content.Builder.Task
in your project.Steps to Reproduce
Add the wrong target platform to MGCB.
Minimal Example Repo
No response
Expected Behavior
Better error message.
Resulting Behavior
You get this error message:
Which is weird... that exception shouldn't be happening. It should also probably tell you what the correct platforms are.
Files
N/A
The text was updated successfully, but these errors were encountered: