In my Xamarin Android app I am storing screen shots in the following path System.Environment.SpecialFolder.MyDocuments. When I am running the app on windows simulator, where exactly this file get stored ? I searched almost my entire systen but no luck. I refered to many links on internet no luck again. where exactly I can see this data on windows 10 system. The file path I am setting it as using following code is
string filepath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments)+"/Screen1.png";
while debugging I can see the value of filepath as "/data/user/0/ArcGISAndroid.ArcGISAndroid/files/Screen1.png"
When I am tryiing with A local directory in app I am getting follow error :{Java.IO.FileNotFoundException: C:\T\sampless.png: open failed: EROFS (Read-only file system) ---> Android.Systems.ErrnoException: open failed: EROFS (Read-only file system)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0
at Java.Interop.JniEnvironment.
Is their a way in Xamarin.Android to store the files in local to cross check them ?
You can push and pull files to a virtual sd folder from the SD card tab of the advanced tools options.
See: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/debug-on-emulator/visual-studio-android-emulator/
The file is not stored on the Windows but on the virtual machine that runs on it. You can't get it from Windows.
Related
I am using SevenZipExtractor (https://www.nuget.org/packages/SevenZipExtractor/) to extract CAB files using below code, it's works on my windows machine,
using (ArchiveFile archiveFile = new ArchiveFile(#"C:\TEMP\x.cab"))
{
foreach (Entry entry in archiveFile.Entries)
{
Console.WriteLine(entry.FileName);
// extract to file
entry.Extract(entry.FileName);
}
}
While I am pushing this to Linux container, it's throws below error,
This seems the NuGet package using some internal Windows DLL.
Question: can I make some docker file change and make it running on Linux container?
> ❯ docker run -i test
Unhandled exception. SevenZipExtractor.SevenZipException: Unable to
initialize SevenZipHandle ---> System.DllNotFoundException: Unable to
load shared library 'kernel32.dll' or one of its dependencies. In
order to help diagnose loading problems, consider setting the LD_DEBUG
environment variable: libkernel32.dll: cannot open shared object file:
No such file or directory at
SevenZipExtractor.Kernel32Dll.LoadLibrary(String lpFileName) at
SevenZipExtractor.SevenZipHandle..ctor(String sevenZipLibPath) at
SevenZipExtractor.ArchiveFile.InitializeAndValidateLibrary() ---
End of inner exception stack trace --- at
SevenZipExtractor.ArchiveFile.InitializeAndValidateLibrary() at
SevenZipExtractor.ArchiveFile..ctor(String archiveFilePath, String
libraryFilePath) at ConsoleDocker.Program.Main(String[] args) in
/src/Program.cs:line 33
https://www.nuget.org/packages/SevenZipExtractor/
C# wrapper for 7z.dll (included)
You trying to use windows dll under linux.
Instead, you can use https://www.7-zip.org/sdk.html - there is pure c# code, not .dll wrapper
I made an application with c# mvc 4.8 and I have few reports made with crystal reports.
On Visual Studio 2019 on debug is working perfectly. Once I made a deploy to local IIS the reports not working.
I have the below error. May I have to add something in config file? I have already install runtime sap latest version 64 bit.
Report Cannot be printed CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: The system cannot find the file specified.
at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
--- End of inner exception stack trace ---
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
at ArsWeb.Controllers.ReportsController.ActivityLogReport(ActivityLog model)
Any solution?
Thanks
Normally, there are 2 reasons for this error, you can try the following methods to solve the problem.
Permission issue
The application must have access to the Temp folder. You have two choices to solve this (Choose any one).
1.How to Assign Permissions for the Windows Temporary Folder on the Web Servers.
2.ASP.NET Impersonation.
ASPNET machine account to be added to the Temp directory, so we have to specify username and password attributes for tag in Web.config file for identifying the IIS Authenticated Account or User.
<identity impersonate="true" userName="accountname" password="password" />
Invalid File path or File name
1.Ensure the Report file name is correct (may be Typo or something. Example: Repotr1.rpt instead of Report1.rpt).
2.Ensure the Report path is correct (Example: "Reports/Report1.rpt" instead of "~/Reports/Report1.rpt").
3.Actually some of us forget to copy the report files to the publish folder (IIS virtual directory).
Whenever I try to sign into Xbox Live on my Unity game (using creators program Unity plugin), both on UWP PC and Xbox One, the game throws an exception:
Exception thrown at 0x00007FFAEF0AA899 in Boulder Falls.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x000000E51B6FEC20. HRESULT:0x803E0110 The application does not have the cloud notification capability.
WinRT information: The application does not have the cloud notification capability.
Stack trace:
>[External Code]
The program '[5896] Boulder Falls.exe' has exited with code 0 (0x0).]
I am using the included prefab to sign in, and I do have developer mode enabled on both the PC and the Xbox, they are all in the correct sandbox, XboxServices.config has XboxLiveCreatorsTitle set to true, and the account I am using is in the test account list. Is there any solution to this?
Edit:
If I try to continue past the exception, it throws another one:
Exception thrown at 0x00007FFA7F1BA839 in Boulder Falls.exe: Microsoft C++ exception: Platform::AccessDeniedException ^ at memory location 0x000000D2BA3FE740. HRESULT:0x80070005 Access is denied.
WinRT information: A network capability is required to access this network resource occurred
I fixed it, I just rebuilt the program in a new folder from Unity, and compiled it from Visual Studio 2017 instead of 2019.
We ran into this issue, too. For us it turned out to be setting the "InternetClient" capability in the Unity PlayerSettings. However, even after checking that, we had to delete the existing build folder because Unity wouldn't update the existing files with the new capability. For reference, there's a quick mention of setting the capability (step 10):
https://learn.microsoft.com/en-us/gaming/xbox-live/get-started/setup-ide/managed-partners/unity-win10/live-partner-unity-uwp-il2cpp
lately I have encountered a following problem. Azure Function that is run in Visual Studio always throws an exception:
System.IO.IOException HResult=0x80131620 Message=Error loading
native library
"C:\Users\\AppData\Local\AzureFunctionsTools\Releases\2.16.0\cli\grpc_csharp_ext.x86.dll"
Source=Grpc.Core StackTrace: at
Grpc.Core.Internal.UnmanagedLibrary..ctor(String[]
libraryPathAlternatives) at
Grpc.Core.Internal.NativeExtension.LoadUnmanagedLibrary() at
Grpc.Core.Internal.NativeExtension.LoadNativeMethods() at
Grpc.Core.Internal.NativeExtension..ctor() at
Grpc.Core.Internal.NativeExtension.Get() at
Grpc.Core.GrpcEnvironment.GrpcNativeInit() at
Grpc.Core.GrpcEnvironment..ctor() at
Grpc.Core.GrpcEnvironment.AddRef() at
Grpc.Core.Server..ctor(IEnumerable`1 options) at
Microsoft.Azure.WebJobs.Script.Grpc.GrpcServer..ctor(FunctionRpcBase
serviceImpl) in
C:\azure-webjobs-sdk-script\src\WebJobs.Script.Grpc\Server\GrpcServer.cs:line
24
The file that is supposedly missing is at its place of course. I've tried to reinstall Azure Function Tools and Visual Studio and nothing helped. Any ideas?
Thanks in advance.
EDIT1:
The problem seems to be caused by non-english characters in the path to the library. I've just created another account without them and suddenly everything started to work.
from the point that the root cause of error is because of the non-english characters in the path to the library, you can consider to rename path of your user profile.
To do so, here is the steps
Log out and login with another Administrator user to your PC
open command prompt by CTRL + R then type cmd
type wmic useraccount get name, sid and get SID of your profile
type regedit under start menu, right click on it and select Run as Administrator
Go under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\YOUR_SID_HERE
Double Click on ProfileImagePath and change the value data according to your need (you can close Registry Editor)
go under USER PROFILES folder (%USERPROFILE%\..\) and change the path of your user profile accordingly
Restart your computer
i have purchase for enterprise edition of Xamarin products. Installed it. No i can create Android application, but can not test it because, No Devices Attached showing. What happening guys? I simply want to test it on Andorid Emulator
EDITED:
when clicking on Open Android Emulator Manager and Start Android SDK Manager it does not do anythink. no any dialog or windows opening
EDITED:
I see below error. could not create avd. but why it attempt it to create it on 'U:' disc. when 'U' disc is a network disk. which i connected to.
[2014-05-22 06:40:44.928] [Error] Could not create AVD 'MonoForAndroid API 15'. Failed to create AVD directory 'U:.android\avd\MonoForAndroid API 15.avd'
[2014-05-22 06:40:44.930] [Exception] Creation of AVD 'MonoForAndroid API 15' failed with exception,
[2014-05-22 06:40:44.930] [Exception] System.IO.DirectoryNotFoundException: Could not find a part of the path 'U:.android\avd\MonoForAndroid API 15.avd'.
[2014-05-22 06:40:44.930] [Exception] at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
[2014-05-22 06:40:44.930] [Exception] at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
[2014-05-22 06:40:44.930] [Exception] at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
[2014-05-22 06:40:44.930] [Exception] at Xamarin.Web.Installer.Installer.AndroidSoftwareItem.CreateAvd(String basePath, AvdInfo info, List`1 avdList)
On command line
1.i am going to C:\Users\\AppData\Local\Android\android-sdk\tools .
2.AND write emulator.exe -avd MonoForAndorid_API_ -partition-size 512 on command line.
It activate avd.
3.On visual Studio click on Start Android Adb command prompt.
4.After all a see MonoForAndorid_API_ attached to list.
But it is not to work with command line every time. i still looking for good answer
I had the same problem when i first wanted to test my app on a real device. The phone turned up, but not in Xamarin.
It turned out to be a problem with my drivers (Windows). You need a special set of drivers, in my case from Samsung, for Xamarin to be able to recognize the phone. Not every system have them installed.
You also need to set up the device itself, so you can get the deugging and all that. You do that under "Developer options".
This guide should take you through most of it: http://docs.xamarin.com/guides/android/getting_started/installation/set_up_device_for_development/
The installation of Android SDK from the Xamarin Installer worked always very fine for me. Did you have any error messages while installing?
Try to uninstall or repair the installation.
It would be good if you describe you environment (Os, admin rights, firewall etc.)
if you have a samsung smartphone, install Samsung Kies (Not version 3)
Then the samsung drivers get installed (you can deinstalled Kies after it works)
Also you have to enable developer options on the smartphone.
UPDATE:
So it seems your environment variable USERPROFILE is set to U: (which is very unusual)
It should be at least U:\ to be a valid directory name.
"Normally" it points to <ROOTDRIVE>:\Users\<username> e.g. C:\Users\testuser.
My "AVDs" are stored under C:\Users\testuser\.android\avd\
I assume you or an administrator changed the environment variable USERPROFILE manually.
Maybe someone wanted to change the environment variable HOMEDRIVE which usually holds a drive name,
( e.g. HOMEDRIVE=U: ) and picked the wrong one USERPROFILE.