[英]Xamarin assembly conflicts with the imported type
So I was changing my Project name and also my folders etc. I followed guide from here How do I rename a Project Folder from within Visual Studio? 因此,我正在更改项目名称以及文件夹等。我从这里遵循了指南如何在Visual Studio中重命名项目文件夹? .
。 All seemed to work, I can launch my app, but I got some erros and lots of lots of warnings
一切似乎正常,我可以启动我的应用程序,但是我遇到了一些错误,并且收到了很多警告
Warning example: 警告示例:
Warning CS0436 The type 'ObservableObject' in 'C:\Users\Godhaze\Documents\Volaapp\Volaapp\Volaapp\Base\ObservableObject.cs' conflicts with the imported type 'ObservableObject' in 'TodoScheduler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'C:\Users\Godhaze\Documents\Volaapp\Volaapp\Volaapp\Base\ObservableObject.cs'. Volaapp C:\Users\Godhaze\Documents\Volaapp\Volaapp\Volaapp\Base\SelectableObject.cs 5 IntelliSense Active
And errors like this: 和这样的错误:
Error CS0234 The type or namespace name 'XamlFilePathAttribute' does not exist in the namespace 'Xamarin.Forms.Xaml' (are you missing an assembly reference?) Volaapp C:\Users\Godhaze\Documents\Volaapp\Volaapp\Volaapp\obj\Debug\TodoScheduler.Pages.MenuPage.xaml.g.cs 14 IntelliSense Active
The code of the error: 错误代码:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TodoScheduler.Pages {
[global::Xamarin.Forms.Xaml.XamlFilePathAttribute("C:\\Users\\Godhaze\\Documents\\Visual Studio 2017\\Projects\\Volaapp\\Volaapp\\Volaapp\\Pa" +
"ges\\MenuPage.xaml")]
public partial class MenuPage : global::TodoScheduler.Controls.BasePage {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
private global::Xamarin.Forms.ListView listView;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
private void InitializeComponent() {
global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(MenuPage));
listView = global::Xamarin.Forms.NameScopeExtensions.FindByName<global::Xamarin.Forms.ListView>(this, "listView");
}
}
}
So I think Its an problem with Assembly? 所以我认为这是组装的问题吗? I Added Reference In the first place, so what could be the problem?
我首先添加了参考,那么可能是什么问题?
Also do I need to change my namespaces? 还需要更改名称空间吗? My projects name of PCL is "Volaapp" But Im using namespaces like: TodoScheduler.Base, because I think its refers to the Assembly.
我的PCL项目名称为“ Volaapp”,但是我使用的命名空间为:TodoScheduler.Base,因为我认为它指的是Assembly。 I might misunderstood this!
我可能误会了!
I tried cleaning the solution then deleting bin,obj folders and then rebuilding it, but that dident help. 我试着清理解决方案,然后删除bin,obj文件夹,然后重建它,但这确实有所帮助。
So what should I do? 所以我该怎么做? I really want to fix this case and I can even give the full code of this to fix :(
我真的很想解决这个问题,甚至可以提供完整的代码来解决:(
我遇到了同样的问题,发现我正在意外地对包含图像的标签数组执行字体大小更改操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.