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 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.
Upon creating a Xamarin Forms project, the following warning is thrown:
>The "XamlCTask" task failed unexpectedly.
>System.IO.FileNotFoundException: Could not find file 'F:\Projects\Personal\Csharp\FormsPortableTest_V3\FormsPortableTest_V3\FormsPortableTest_V3.Droid\obj\Debug\FormsPortableTest_V3.Droid.dll'.
>File name: >'F:\Projects\Personal\Csharp\FormsPortableTest_V3\FormsPortableTest_V3\FormsPortableTest_V3.Droid\obj\Debug\FormsPortableTest_V3.Droid.dll'
> at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
> at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share)
> at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
> at Xamarin.Forms.Build.Tasks.XamlCTask.Compile()
> at Xamarin.Forms.Build.Tasks.XamlCTask.Execute()
> at Microsoft.Build.Framework.ITask.Execute()
> at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
> at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() FormsPortableTest_V3.Droid
# Steps to Reproduce
1. Open Visual Studio
2. New Project > Visual C# > Cross-Platform > Blank App (Xamarin Forms Shared or Portable)
# Expected Results
Project(s) should be created without error
# Actaul Results
Above referenced error is visible in Warnings pad
Microsoft Visual Studio Professional 2015
Version 14.0.25424.00 Update 3
Microsoft .NET Framework
Installed Version: Professional
LightSwitch for Visual Studio 2015 00322-40000-00000-AA256
Microsoft LightSwitch for Visual Studio 2015
Visual Basic 2015 00322-40000-00000-AA256
Microsoft Visual Basic 2015
Visual C# 2015 00322-40000-00000-AA256
Microsoft Visual C# 2015
Visual C++ 2015 00322-40000-00000-AA256
Microsoft Visual C++ 2015
Visual F# 2015 00322-40000-00000-AA256
Microsoft Visual F# 2015
Windows Phone SDK 8.0 - ENU 00322-40000-00000-AA256
Windows Phone SDK 8.0 - ENU
Application Insights Tools for Visual Studio Package 7.1.00719.1
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)
ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/
Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools
NuGet Package Manager 3.4.4
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Data Tools 14.0.60519.0
Microsoft SQL Server Data Tools
TypeScript tools for Visual Studio
Visual Studio Tools for Universal Windows Apps 14.0.25420.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Xamarin 22.214.171.124 (1b3e004)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Inspector Support 0.9.0.14 (4d868da)
Adds support for inspecting Xamarin and WPF apps.
Xamarin.Android 126.96.36.199 (4a7d97a)
Visual Studio extension to enable development for Xamarin.Android.
Xamarin.iOS 188.8.131.52 (a5ae61c)
Visual Studio extension to enable development for Xamarin.iOS.
It looks like at the time this bug was filed the core problem was that XamarinVS Cycle 7 SR 1 was using quite an old version of Xamarin.Forms into the templates. More recent versions of XamarinVS include more recent versions of Xamarin.Forms in the templates and no longer hit this problem.
As for the fix in the Xamarin.Forms package itself, I think the cleanup that was done in the Xamarin.Forms .targets file to fix Bug 33181 was likely what solved this warning message.
## Steps followed to test (completed once for the shared template and once for the PCL template)
(a) GOOD: If I upgrade the projects in XamarinVS 184.108.40.206 (Cycle 7 SR 1) to Xamarin.Forms 220.127.116.11 and then complete the "reset steps" as described below, the particular warning mentioned in Comment 0 _no longer occurs_.
(b) BAD: If I downgrade the projects _back_ to Xamarin.Forms 18.104.22.16882 and then complete the "reset steps" as described below, the warning mentioned in Comment 0 _reappears_.
(c) GOOD: If I create a new project from template in XamarinVS 22.214.171.124 (Cycle 8 SR 1), the warning does _not_ appear (because the project is already using Xamarin.Forms 126.96.36.199).
### Reset steps (used after changing Xamarin.Forms versions)
1. Quit Visual Studio.
2. Delete the hidden .vs directory in the solution directory.
3. Re-open the solution.
4. Quit Visual Studio again.
5. Re-open the solution once more.
(Testing note: The repetition of quitting and restarting Visual Studio again in steps 4 and 5 was _crucial_ to observe the difference in behavior when using the PCL template on XamarinVS Cycle 7 SR 1. But I was able to skip this repetition when testing on XamarinVS Cycle 8 SR 1.)
## Verification status for Xamarin.Forms: no longer reproducible as of 188.8.131.52 (and maybe earlier)
> GOOD: Xamarin.Forms 184.108.40.206 (May 30, 2016)
> BAD: Xamarin.Forms 220.127.116.1182 (November 17, 2015)
## Verification status for the templates in Xamarin for Visual Studio: fixed as of 4.2.1 Cycle 8 SR 1 (and maybe earlier)
> GOOD: XamarinVS 18.104.22.168 (872717c) Cycle 8 Service Release 1 (November 22, 2016)
The cross-platform project templates use Xamarin.Forms 22.214.171.124.
> BAD: XamarinVS 126.96.36.199 (fcbe082) Cycle 7 Service Release 1 (August 1, 2016)
The cross-platform project templates use Xamarin.Forms 188.8.131.5282.
## Additional testing environment info (brief)
Android SDK Tools 24.0.2
Android SDK Platform-tools 21
Android SDK Build-tools 23.0.1
Java JDK 8u111 (1.8.0_111) 64-bit
Microsoft Visual Studio Enterprise 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Windows 8.1 (64-bit), Version 6.3 (Build 9600)
## Status update
This bug has now been marked "verified" based on the testing in Comment 1. If any user comes across a similar warning message in the future when using Xamarin.Forms 184.108.40.206 or higher, please submit a new bug report that includes as many details  as possible. Thanks in advance!
*** Bug 42909 has been marked as a duplicate of this bug. ***