I'm new to Xamarin development. I just tried to create a new Blank Xamarin Forms project in Visual studio. It's really frustrating that this brand new project doesn't build and I can't resolve the issue. I tried to update Xamarin Forms in the Android solution, but it didn't help..
The first error message is: "The type or namespace 'System' could not be found (are you missing a using directive or an assembly reference?)"
This Forms project doesnt have a "references" node so I can't reference anything to it...
Any ideas?
Screenshots:
did you tried to clean & rebuild your solution? Maybe that'll help :)
Check all your references and make sure they are resolving correctly in each project.
I deleted every other project but the android one and it works now, I don't need the others for now, so it's good enough for me.
Related
I have created a brand new Xamarin.Forms project, targeting iOS, in Visual Studio for macOS, and when I try to build I get the following errors, in AppDelegate.cs, about missing assembly references.
I have tried adding references, but I am presented with a blank window.
I also tried updating all NuGet packages, since I found an SO answer which suggested this might resolve the issue, but I'm still having the same problems.
This is my first experience of trying to use Xamarin, and so I really have no idea what I'm supposed to do or what references the project requires to be able to build.
The following are all the dependencies the template project starts out with.
Does anybody know what it is that's missing? How can I get this working? I have XCode 9.3 installed, and Visual Studio is up to date, so that shouldn't be an issue I don't think.
The following image shows the structure of the two projects created when I ran the wizard to generate the new Xamarin.Forms solution.
I'm having troubles building my Unity project. I tried both a custom scene, created by me, and the example scenes located into Examples/ServiceExamples.
Basically, I want to take a picture with the HoloLens webcam and call IBM Watson visual recognition service. All Mixed Reality settings have been configured correctly. When I try to build the project I get lots of errors and they're all related to Watson SDK. For instance, the first error is the following:
Assets\Watson\ThirdParty\WebSocketSharp\Ext.cs(54,36): error CS0234: The type or namespace name 'X509Certificates' does not exist in the namespace 'System.Security.Cryptography' (are you missing an assembly reference?)
I tried to install directly from the solution some of these packages that i'm missing, but the error remains there. Do you think it could be due to my Visual Studio project settings (e.g.: .NET targets, ecc)?
Here are my Unity settings:
My settings imgur link
Am I missing something else? Any ideas? Thanks!
You have a Unity package recently added for this particular need, see https://github.com/watson-developer-cloud/unity-sdk/issues/173 I believe is not part of the official release as for now, but you can get it from GitHub.
I was trying out MonoGame. I installed the MonoGame add-in, and then created a new Universal Project. Looked good.
Then I noticed that both the Mac and Android projects created had bad references to a MonoGame assembly. Some googling revealed this is a known issue, and I was able to remove the bad reference and add the correct one.
But now when I build, I get an error:
Error: /Users/davevr/Documents/github/MonoTestGame/iOS/MonoTestGame.iOS.csproj could not import "$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets"
I can't find these files anywhere on my machine so I am not sure what the issue is.
Any help would be appreciated!
Did you install the MacOS download?
http://www.monogame.net/2016/03/17/monogame-3-5/
It should install those targets to your machine. It might also be possible that the project templates are old and do not correctly reference the right paths.
I have a Xamarin.Forms project, and it worked just fine until I updated my Xamarin Studio Community to latest 5.10.3 (build 51) and updated Xamarin.Forms to 2.2.0.31
When I compile my android project, it showed me
"mynamespace.Droid.Resource.Attribute" does not contain a definition for "actionBarSize"
I did not change anything after upgrade and it works before, I know some others faced the same problem like me when I search on google, seems no one asked this in stackoverflow yet so I would like to get some help here.
If the above doesn't work try this
1) Delete Bin and Obj folders in project folder
2) Delete contents of C:\Users{your username}\AppData\Local\Xamarin\zips
3) Rebuild project
*This will take a while because xamarin will re-download the required files. it should work after its done.
That's a bug listed here. There are different workarounds about this, please try:
Failed to use Android Support Library v4
Creating a Hello World in Visual Studio with Xamarin Forms Fails
Xamarin cross-platform (portable class) project compilation error
I do as tutorial here
https://msdn.microsoft.com/en-us/library/mt679501.aspx
and when I try to change default page in App.cs.
I can't find this App.cs file in PCL project.
What I do wrong or how can I create App.cs file?
Thank you in advance.
in xamarin.android remove the reference of xamarin.forms project and add it again. it worked for me.
The newer versions of the Forms project templates will name the default startup class file "MyProject.cs" (ie, whatever you named your project when you created it) instead of App.cs.