简体   繁体   中英

Unable to reference Xamarin.Forms in brand new project

I am trying to write a Xamarin Forms example for the PCL based socket implementation. The project will not build due to not being able to resolve 'Forms'. The Project is brand new (5/27/2015) and I have yet to add any custom code or packages to it. I am using Xamarin Forms 1.4.2. If I remove the MainView.xaml the project will build. Main View is default with no custom code.

Error CS0234: The type or namespace name 'Forms' does not exist in the namespace 'Websocket.Portable.Xamarin' (are you missing an assembly reference?) (CS0234) (Websocket.Portable.Xamarin)

Other Xamarin projects build and run fine, but, I am unable to create anything new.

在此处输入图片说明 Project Download

That's a namespace conflict. You have Xamarin in your namespace and the compiler is confused. Adjust your namespace so that it does not include Xamarin .

To be safe, do not use the following words in your namespaces:

  • Xamarin
  • Android
  • iOS

You can use the following safely:

  • Droid
  • iPhone
  • iPad
  • Universal (or even iOSUniversal )
  • Shared
  • Common

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM