Reputation: 1
I get the error message "The "ConvertResourcesCases" task failed unexpectedly" in Xamarin.Forms . I solution path changed but nevertheless i displaying error message. I would appreciate if you help. Thanks.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\users\user\documents\visual studio 2015\Projects\App1\App1\App1.Droid\obj\Debug\__library_projects__\Xamarin.Forms.Platform.Android\library_project_imports\res'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.EnumerateDirectories(String path, String searchPattern, SearchOption searchOption)
at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(ITaskItem item, Dictionary`2 acwMap)
at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(Dictionary`2 acwMap)
at Xamarin.Android.Tasks.ConvertResourcesCases.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App1.Droid
This error mesage, i displaying during compilation. This code for example
MainPage = new ContentPage
{
Content = new StackLayout
{
VerticalOptions = LayoutOptions.Center,
Children = {
new Label {
XAlign = TextAlignment.Center,
Text = "This is a text!"
}
}
}
};
Upvotes: 0
Views: 926
Reputation: 801
I too faced the same problem while building the project. Below is what has happened :
Cause :I copied my project folder from one location to another in same drive. But my xamarin studio was still considering old project path
Solution : 1.close current project
2.go to your project folder which you want to run. example D:\Projects\my project\hybridappApp
locate you project solution file (Microsoft Visual Studio Solution (.sln))
double click the file and it opens the xamarin studion for you.
clean the solution and build before you run the project.
Hope this helps.
Upvotes: 0
Reputation: 3306
Copy your project to a location with short path.
For example :
Your original file location looks like : c:\users\user\documents\visual studio 2015\Projects\App1\
Copy and paste it into another location like E:\App1
.
Upvotes: 1