Protobuild / Protobuild

This project has been retired.
MIT License
150 stars 33 forks source link

Protobuild fails on Windows 7 / .net 4.5 with InvalidOperation #1

Closed JoschaMetze closed 11 years ago

JoschaMetze commented 11 years ago

I can't run the Protobuild.exe as each call to the logger runs into a InvalidOperation exception (Task attempted to log before it was initialized). The gui loads but after creating a module fails with the same error. Googling the error points to a need to initialize the build environment or check for the build environment and otherwise don't use the TaskLoggingHelper.

at Microsoft.Build.Utilities.TaskLoggingHelper.LogMessage(MessageImportance importance, String message, Object[] messageArgs) at Protobuild.SyncProjectsTask.Execute() at Protobuild.Actions.SyncProjects(ModuleInfo module, String platform) at Protobuild.Actions.ResyncProjects(ModuleInfo module, String platform) at Protobuild.MainClass.Main(String[] args)

hach-que commented 11 years ago

Looking into this issue now.

I know there's an outstanding issue relating to generating solutions on Windows (due to the XSLT doing something that .NET doesn't automatically handle but Mono does), but I haven't had a chance to look at that yet.

As far as I know, the logging issue was solved with 0b565413, where it now writes to the console if the log is not available, which you can see in https://github.com/hach-que/Protobuild/blob/0b565413a4544982883213dea44b9452d3f81670/Protobuild/Tasks/BaseTask.cs. Perhaps .NET initializes the Log property but it's just not in a valid state, vs Mono which leaves it as null for tasks created outside the build environment?

hach-que commented 11 years ago

Going to need to wait until I can get my hands on a Windows machine since this isn't reproducible under Linux / Mono. That might be today or on the weekend.

hach-que commented 11 years ago

This should be fixed with eb70064c0838cea5a4e7df85130d6aab75db47f1, but I'm just waiting on Tychaia to clone onto Windows to make sure that's the case.

hach-que commented 11 years ago

Seems like this is fixed.