xamarin / app-crm

MIT License
387 stars 249 forks source link

XamerinCRM Solution doesn't compile in VisualStudio 2015 #99

Closed qipengwu closed 8 years ago

qipengwu commented 8 years ago

When compile XemerinCRM solution in VS2015, below errors are showing. Lots of InitializeComponent does not exist error. Any ideas?

Severity Code Description Project File Line Suppression State Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\App.xaml.cs 46 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\About\AboutDetailPage.xaml.cs 30 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\About\AboutItemListPage.cs 32 Active Error CS0103 The name 'AboutItemList' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\About\AboutItemListPage.cs 37 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Customers\CustomerDetailPage.xaml.cs 34 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Customers\CustomerOrderDetailPage.xaml.cs 40 Active Error CS0103 The name 'productSelectionEntry' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Customers\CustomerOrderDetailPage.xaml.cs 51 Active Error CS0103 The name 'productSelectionEntry' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Customers\CustomerOrderDetailPage.xaml.cs 81 Active Error CS0103 The name 'productSelectionEntry' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Customers\CustomerOrderDetailPage.xaml.cs 93 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Customers\CustomerOrdersPage.xaml.cs 35 Active Error CS0103 The name 'AddNewOrderButton' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Customers\CustomerOrdersPage.xaml.cs 37 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Customers\CustomerSalesPage.xaml.cs 35 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Customers\CustomersPage.xaml.cs 35 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\MenuPage.xaml.cs 39 Active Error CS0103 The name 'ListViewMenu' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\MenuPage.xaml.cs 47 Active Error CS0103 The name 'ListViewMenu' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\MenuPage.xaml.cs 56 Active Error CS0103 The name 'ListViewMenu' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\MenuPage.xaml.cs 58 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Products\CategoryListPage.xaml.cs 37 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Products\ProductDetailPage.xaml.cs 35 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Products\ProductListPage.xaml.cs 37 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Splash\SplashPage.xaml.cs 39 Active Error CS0103 The name 'SignInButton' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Splash\SplashPage.xaml.cs 44 Active Error CS0103 The name 'SkipSignInButton' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Splash\SplashPage.xaml.cs 51 Active Error CS0103 The name 'SignInButton' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Splash\SplashPage.xaml.cs 70 Active Error CS0103 The name 'SkipSignInButton' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Pages\Splash\SplashPage.xaml.cs 71 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerCategorySalesChartView.xaml.cs 34 Active Error CS0103 The name 'doughnutSeries' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerCategorySalesChartView.xaml.cs 36 Active Error CS0103 The name 'doughnutSeries' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerCategorySalesChartView.xaml.cs 50 Active Error CS0103 The name 'doughnutSeries' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerCategorySalesChartView.xaml.cs 54 Active Error CS0103 The name 'chart' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerCategorySalesChartView.xaml.cs 55 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerDetailAddressView.xaml.cs 36 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerDetailContactView.xaml.cs 33 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerDetailHeaderView.xaml.cs 36 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerDetailPhoneView.xaml.cs 30 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerListView.xaml.cs 32 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerOrderListView.xaml.cs 32 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Customers\CustomerWeeklySalesChartView.xaml.cs 33 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\NonPersistentSelectedItemListView.xaml.cs 31 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Products\CategoryListView.xaml.cs 32 Active Error CS0103 The name 'InitializeComponent' does not exist in the current context XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Products\ProductListView.xaml.cs 32 Active Error CS0165 Use of unassigned local variable 'font' XamarinCRM C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\Views\Sales\SalesDashboardChartView.cs 193 Active Error Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: System.IO.FileNotFoundException: Could not load assembly 'XamarinCRM, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? XamarinCRM.Android
Error Metadata file 'C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM\bin\Debug\XamarinCRM.dll' could not be found XamarinCRM.iOS C:\Users\axlocaladmin\Source\Repos\app-crm\src\MobileApp\XamarinCRM.iOS\CSC

jgold6 commented 8 years ago

There is a customer hitting this issue as well. Desk case #247506

That said, I noted that on my end the PCL would not build due to using an unassigned variable in SalesDashboardChartView.cs in the ChartAxisFont static property:

static Font ChartAxisFont
{
       get
       {
           //Font font; // <--- causing use of unassigned variable error noted below
           Font font = Font.SystemFontOfSize(12.0); // <----- to resolve the error

           Device.OnPlatform(
               iOS: () =>
               { 
                   font = Font.SystemFontOfSize(Device.GetNamedSize(NamedSize.Default, typeof(ChartAxisTitle)) * 0.6); 
               },
               Android: () =>
               { 
                   font = Font.SystemFontOfSize(Device.GetNamedSize(NamedSize.Default, typeof(ChartAxisTitle)) * 1.7);
               }
           );
           return font; // <---- use of unassigned variable error
       }
}

Once I did the above the solution built fine. However I never did get all of the CS0103 errors about "The name 'InitializeComponent' does not exist in the current context XamarinCRM " on my end.

qipengwu commented 8 years ago

Are you using VS2015?

renattomachado commented 8 years ago

+1

DaymareDev commented 8 years ago

Same problem here.

taniasa commented 8 years ago

Same problem here.

vonovak commented 8 years ago

same here! (VS 2015) and this? "Coming soon" and Last edit September 2015??

mizhou2011 commented 8 years ago

I saw the codes inside "SalesDashboardChartView.cs->ChartAxisFont" have been changed, but the same errors are still there. Wonder has it really been fixed?

ExtremeKaos commented 8 years ago

Same here , some workaround ?

jsauvexamarin commented 8 years ago

My latest commits seem to have fixed this. The core PCL Forms XamarinCRM (XamarinCRM) was not building when the platform projects (XamarinCRM.Android & XamarinCRM.iOS) were built. When these platform project are built, the core project is supposed to build first automatically, but wasn't for some reason. A workaround seemed to be that one could build the core PCL XamarinCRM project first, and then build the platform projects.

I updated the core project to target PCL profile 111 instead of 78, and that seemed to fix the issue. I also updated many of the referenced NuGet packages.

I am now able to pull a fresh clone of the repo and build either one of the platform projects without first building the core PCL project.

And yes, Visual Studio 2015 (or Xamarin Studio) is required to build this solution, because of C# 6 language features.