简体   繁体   中英

Can't Compile Xamarin UWP App

I created this repo: https://github.com/MelbourneDeveloper/Adapt.Presentation.git

I haven't been able to get any of the samples in this project compiling or running. I'm biting one off at a time. In particular the UWP sample won't compile or run. For a start, the code that Visual Studio is generating has compilation errors. I have tried Git cleaning the solution over and over. I have also deleted all the Xamarin temp files here: C:\\Users[USERNAME]\\AppData\\Local

I have the latest version of Xamarin , and Visual Studio 2017 (15.2 26430.12).

Xamarin 4.5.0.476 (1be4f0c)

Xamarin.Android SDK 7.3.1.2 (9dbc4c5)

Xamarin.iOS and Xamarin.Mac SDK 10.10.0.35 (4cffddf)

How can I get it to compile and run?

These are the errors I get :

在此处输入图片说明

Obviously, all the compilation errors are in the generated code that I have no control over.

The problem turned out to be that there was no default root namespace in the highest level project. It turns out that if you do not specify a default root namespace in a UWP project, it generates code incorrectly. This makes sense.I consider it a bug in Visual Studio or the csproj format, but at least I know why it is happening now.

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