Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 3246 [details]
Configure some category filter using the "options" entry in the right-click
context menu for test groups in unit test view then close the solution. If you reopen it the settings will no longer be there, and looking in the appropriate csproj file you can see nothing has been saved.
I have traced this problem to how NUnitService is registering its property at runtime. It's using MonoDevelop.Projects.Services.ProjectService.DataContext directly, so it goes behind the back of ProjectService.OnPropertiesExtensionChanged which means ProjectService.DataContextChanged will not fire and thus the actual MSBuildProjectService.DataContext will not be updated (recreated) hence the property won't be saved.
I have tried the attached simple fix to move the registration to the addin xml and it sort-of works. Problem is, MonoDevelop cannot read back the settings it writes, saying "Error while trying to load the project 'foo.csproj': Could not set property 'UnitTestInformation' in type 'DotNetProjectConfiguration'". This occurs only when MonoDevelop is exited and restarted, closing and reopening the solution without exiting MonoDevelop works.
Here is a section of the csproj:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Options EnableFilter="True" Exclude="True" ctype="NUnitCategoryOptions">
I find it suspicious that there are 2 levels of <UnitTestInformation>. If I remove one the project loads without error but also without the settings.
I'll look at it after the feature stop.
UnitTestInformation is no longer supported by the addin. Marking as RESOLVED INVALID.