Microsoft.Xna.Framework.Graphics.Viewport missing in WP8? - c#

I finally upgraded my WP7 app to WP8. Everything worked fine and the process was smooth. Unfortunately, it seems like the Microsoft.Xna.Framework.Graphics.Viewport namespace cannot be found anymore.
The type or namespace name 'Viewport' could not be found (are you
missing a using directive or an assembly reference?)
Unfortunately, I have no idea how to resolve this issue, as I need this viewport stuff in my augmented reality app to define the final monitor image...
Any ideas? Thank you very much!

There is no Viewport class available in Windows Phone 8. But there was the same problemn for GART toolkit, and it was solved by implementing own Viewport class.
Being your app an Augmented Reality app too, I think their solution will be valid for you too. You can get the source code here:
http://gart.codeplex.com/SourceControl/latest#GeoARToolkit/NonXnaUtils/Viewport.cs

Microsoft has deprecated the XNA Framework in Windows Phone 8. Some XNA assemblies can still be referenced but not Microsoft.Xna.Framework.Graphics.dll.
Here is the list of assemblies that can still be referenced:
Microsoft.Xna.Framework.dll Microsoft.Xna.Framework.GamerServices.dll
Microsoft.Xna.Framework.GamerServicesExtensions.dll
Microsoft.Xna.Framework.Input.Touch.dll
Microsoft.Xna.Framework.Media.dll
Microsoft.Xna.Framework.MediaLibraryExtensions.dll
For more information, check out the MSDN page on this topic.

Related

the type or namespace name 'mixedreality' does not exist in the namespace 'microsoft' (are you missing an assembly refrence?)

I am currently developing an app for the Hololens 2 with Unity and mrtk. I am trying to get the Gaze direction from the GazeProvider.cs which is attached to the camera, because i want to spawn objects in front of the players face. I am trying to access it like the mrtk site states:
void LogGazeDirectionOrigin()
{
Debug.Log("Gaze is looking in direction: "
+ CoreServices.InputSystem.GazeProvider.GazeDirection);
Debug.Log("Gaze origin is: "
+ CoreServices.InputSystem.GazeProvider.GazeOrigin);
}
However when trying to using Microsoft.MixedReality.Toolkit; the error
the type or namespace name 'mixedreality' does not exist in the namespace 'microsoft' (are you missing an assembly refrence?)
occurs. Therefore CoreServices is also not recgonized. Also i recognised, that the GazeProvider.cs hat this path in the package folder Packages/com.microsoft.mixedreality.toolkit.foundation/Services/InputSystem/GazeProvider.cs. I don't know how to fix this or how to access the gaze direction of the player, i have been searching for a while now.
I would appreciate some help, thanks!
In order to get acces to the toolkit you probably have to install the package from the nuget package manager. Check out this Link to see how you can include it.
Thanks for the answers, but it unfortunately did nothing for me. I had to create a complete new project and migrated some prefabs i used there. Something with the Assemblies was broken and not created right. Some of the mrtk packages probably generated new assamblies, but i do not know which one.
Hi I’m Wayne Wang from the Microsoft for Founders Hub team!
Here is my suggestion:
make sure you are using latest "Mixed Reality Feature Tool" to install packages dependencies as "Local tarball"
Go to the unity menu: "Edit" ->"Preferences" ->"External Tools". It was the place you can change your visual studio versions.
You may see a list with checkbox looks like this List of checkboxes
Make sure the generation of "Local tarball" was selected
after the setting was saved, the pacakge you referenced may create new projects in your project of C#. These projects actually can be references of your current major project. The errors should be gone by then.
File→Build Settings→Play Settings→As shown below
in OtherSettings
Change it to the one that is different from the original, ctrl+s save
can try it, thank you

using Zxing.Net Mobile for forms does is not recognize

I am new in Xamarin.Forms and I want use the bar code scaner by Zxing.
however I install the plugin form nuget:
1)ZXing.Net.Mobile for Forms
2) ZXing.Net.Mobile. -> install it since I read somewhere it would help my problem but its not.
as far as I understood I need to add this line: to the Android project in main Activity
However alotugh I install the packages I am still getting an error of:
The type or namespace name 'Andorid' does not exist in the namespace 'ZXing.Net.Mobile.Forms' (are you missing an assembly reference?) ScannerZXing.Android
what can I do? (perofrm clean and rebuild for the project didn't help)
also would like to add that it is added in the referecnes of the projects.
Thanks for the ansewrs.
In my case the reason was that I installed only ZXing.Net.Mobile.Forms. After installing ZXing.Net.Mobile it`s gone. (two libraries need to be installed)
UPDATE: After trying to run the project I discovered that you actually need both Nuget Packages
Previous: Just in case anyone had the same issue as me there are actually two ZXing.Net.Mobile packages both of which by Redth. They both have the exact same description as well unfortunately. I tried the first one which at the time of this writing had the most downloads... however it produced the error as described. By uninstalling and reinstalling the second I resolved the issue:

ARCamera Issue when migrating to Qualcomm Augmented Reality vuforia-unity-android-ios-3-0-6

FYI: I am using unity4.5.1f3 pro free version as of now.
My app is using ARCamera and I have migrated unity project for "vuforia-unity-android-ios-3-0-6 by following steps mentioned over here : [https://developer.vuforia.com/resources/dev-guide/migrating-your-unity-project]
After that I am receiving an error as below:
Type DefaultTrackableEventHandler' does not contain a definition forar_detected' and no extension method ar_detected' of typeDefaultTrackableEventHandler' could be found (are you missing a using directive or an assembly reference?)
In older version there is a bool flag of "ar_detected" in DefaultTrackableEventHandler.cs located at plugin path : Qualcomm Augmented Reality/Scripts/DefaultTrackableEventHandler.cs and in new version vuforia-unity-android-ios-3-0-6 this flag is not available, I am getting stucked with this change to identify what change will I required to do in my C# script,
Is there any other dependency I have missed when migrating to new version of Qualcomm Augmented Reality?
any one who can guide me on this?
Thanks,
Kiran
I got the solution for migration issue of Qualcomm Augmented Reality for vuforia-unity-android-ios-3-0-6 version,
Actually when older version is there other developer makes some change inside the DefaultTrackableEventHandler.cs to get ride for Augmented Reality for Camera feature,
I did same changes with new DefaultTrackableEventHandler.cs and got no error and it working fine now :)

Assembly resource missing exception with MonoTouch

I'm facing an assembly resource missing exception with MonoTouch. I don't know what to do.
The context: I've ported some existing code from SL to WP7 and MonoTouch. Internationalization is performed via satellite assemblies. Resources XYZ.Designer.cs is generated using the ResXFileCodeGeneratorEx.
So under MonoTouch: I've the XYZ.de.resx, XYZ.fr.resx, etc... The compilation from MonoDevelop gives me the de/XYZ.resources.dll, fr/XYZ.resources.dll, etc...
On the simulator, I get a System.Resources.MissingManifetResourcesException!
A quick check on the app package shows me that the satellite assemblies de/XYZ.resources.dll, fr/XYZ.resources.dll are really missing.
Cheers, patrick
This was my mistake, a typo on the definition of the default namespace.
Once the default namespace is ok, everything works as expected. Sorry guys.

How to fix C# error "The type or namespace name '[x]' could not be found (are you missing a using directive or an assembly reference?)"

I would like to use the open source code from here - Roger Lipscombe's .NET wizard form classes.
Unfortunately for me my target is a Windows Mobile 6.5 device and not a Win7/VS 2010 project. So since I could not use the projects as is I decided to create the two dependency projects by hand for the mobile device in VS2008.
Things seemed to go well until I tried to compile.
I am not sure now why i get the following error:
Error 1 The type or namespace name 'CategoryAttribute' could not be
found (are you missing a using directive or an assembly
reference?) C:\Development\SmartDeviceProject1\Wizard.Controls\EtchedLine.cs 50
The line of code is:
[Category("Appearance")]
I think the open source project is using .NET 2 and the mobile project is 3.5.
I am a C++ developer trying to make a mobile app with a wizard UI.
Can someone perhaps point out what I may be missing and what this error means and how to fix it?
EDIT
Thanks all who answered.
Commenting those decorators out fixed the problem (though I have a lot of issues apparently with things that are NOT supported in the compact framework. Oh well - it wa worth a shot)
The CategoryAttribute is used when the control is loaded in visualstudio i.e. when editing the form and how to find the associated property in the property grid. You could probbaly just comment it out with no ill effects. The associated property will just appear somewhere else in the grid.
The category attribute can just be commented out without any negative consequences.
If you have that error with other code, ask again and we'll try to help you find an equivalent for .NETCF or a workaround.
It appears that [Category("Appearance")] adds a new Design-time option in the
Designer under the "Appearance" category in this instance.
Note that in the examples that I've found use [CategoryAttribute("Appearance")]
The property is then followed by a variable, as the sample you've provided would allow you to set a color for Light and Dark of an etched line.
Here is a very detailed article on the subject, however the line of code [Category("Appearance")] may not be required as it's for the Designer only.
http://msdn.microsoft.com/en-us/magazine/cc164159.aspx#S8 - Figure 11

Categories

Resources