Bug 14516 - GetResourceStream (uri) fails with 'Cannot locate resource' but VS2012 runs it OK
Summary: GetResourceStream (uri) fails with 'Cannot locate resource' but VS2012 runs i...
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Windows
: Lowest normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-09-07 10:59 UTC by Hywel Thomas
Modified: 2018-03-15 10:40 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

zip file with full solution to be loaded and run (28.90 KB, application/x-zip-compressed)
2013-09-07 10:59 UTC, Hywel Thomas

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 GitHub or Developer Community 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.

Related Links:

Description Hywel Thomas 2013-09-07 10:59:26 UTC
Created attachment 4804 [details]
zip file with full solution to be loaded and run

Description of Problem:
After setting up a valid Uri, and calling Application.GetResourceStream (uri), program fails with "Cannot locate resource 'xaml/treeview.xaml' even though the file is in the correct folder/path.  Compiling with MS Visual Studio 2010 or 2010 works fine.

Steps to reproduce the problem:
1. Open the solution GetStream in the attached zip file and compile and run (step through) with Xamarin Studio
2. Repeat but using Visual Studio 2010/2012

Actual Results: With Xamarin Studio 4.0.12  - program fails.

Expected Results: Resource should be found - as happens with MS Visual Studio.

How often does this happen? Always

Additional Information:
Comment 1 Mike Krüger 2013-09-07 16:03:16 UTC
it's not a monodevelop/xamarin studio issue -> moving to WPF.
Comment 2 Marek Safar 2018-03-15 10:40:02 UTC
We deprecated xbuild and recommend using msbuild instead. Switching to msbuild will also most likely resolve the issue you reported.