Added an Option for errors and messages, which use MessageBox to write to Output Window #284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WE has various cases of showing MessageBox for Information purposes (not YesNo boxes).
Sometimes, when user re-saves bundles too quick, the File System has file in lock and bad things will happen, causing MessageBox to show up. That's not necessarily a bug, as writing some save-queue would require not appropriate to the problem time.
Still being on version 1.4.1 I have been experiencing the file not found errors for the js and css in bundles. I assume, that under normal conditions, when paths are specified fully and the Sharepoint Mapped Folders are not the case, everything will work as expected.
The bundle errors "path not found" appear sporadically, I was not able to debug the exact reason, as it is being used on a production project, however they are ALL FALSE POSITIVE.
Having N bundles with relative Sharepoint mapped paths causes each bundle to fail (first or last file not found error) causing in turn N MessageBoxes which in turn frustrate a programmer (he have to click his way through all of them), assuming the bundles are being recompiled every time onBuild and onSave.
So as an acceptable alternative we just implement an option to route MessageBox.Show to Output Window, so no user interaction would be necessary.
The option is defaulted to FALSE and has no affect on existing configuration until toggled.
When user toggles the options, he understands, that errors will go to the output and he have to check it periodically, so no harm in not showing a MB.
Regards,
Max