I have a .Net Maui app.
I used to test on an android physical device. Everything was working fine. But recently, I can't deploy anymore. I'm getting the following error :
Error XARDF7024 System.IO.IOException: The directory is not empty.
à System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
à System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
à Xamarin.Android.Tasks.RemoveDirFixed.RunTask() P99-SoireeSympa C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.440\tools\Xamarin.Android.Common.targets 2449
The project compiles properly. The error is raised only when trying to deploy to an android device.
Does anyone know how to solve that please ?
Thanks
Related
I am trying to create a program using libusb library on Windows with Visual Studio 2019 (MSVC).
I am UNIX main, and little bit new in windows programming. So I may miss some easy issues.
First I dowloaded libusb on the official website : https://libusb.info/.
I extracted everything and opened the libusb-1.0.24\msvc\libusb_2019.sln project.
I built the dll and lib in all x86/x64 Debug/Release possibilities.
Any probleme with building the library.
I started a Visual Studio new project, with a single sample file (just display connected devices).
I added the include and a x64 Debug dll version off the library, same as the project.
But when I build the program, I have a link error :
"[...]libusb-1.0.24\lib\libusb-1.0.dll : fatal error LNK1107: fichier non valide ou endommagé : impossible de lire à 0x348"
In english : invalid or corrupted file : impossible to read at 0x348.
I tried to build with the static version off the library and I didn't had any issue. The program works with my static build of libusb.
I must use a dynamic link with the library for this project, so this is not a solution for me.
I also tryed to download directly the dll on the website : https://wikidll.com/fr/libusb/libusb-1.0-dll - WARNING THE FIRST DOWNLOAD BUTTON IS AN ADD - and I got same issue when running (the only difference is the corrupted line).
Thank for anyone trying to help me,
Leo
I have a project and I use GitHub in order to save each new steps. However, since few days, I just got a Mac and I worked on this project from a Windows OS before.
So, I installed Xamarin for Mac and cloned my git repo. But.. Mac doesn't want to compile the Android project part, I don't understand why but it throws Error MSB4018: The "CheckDuplicateJavaLibraries" task failed unexpectedly.. I created a new Forms Project from my Mac machine and, it does compile. So, I was like "Ok, let's create a new solution from windows (maybe the previous one is obsolete)", but the error come back...
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error MSB4018: The "CheckDuplicateJavaLibraries" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file 'obj/Debug/__library_projects__/Xamarin.Android.Support.Animated.Vector.Drawable/library_project_imports/classes.jar'.
File name: 'obj/Debug/__library_projects__/Xamarin.Android.Support.Animated.Vector.Drawable/library_project_imports/classes.jar'
at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x00207] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/io/__error.cs:188
at System.IO.FileInfo.get_Length () [0x00038] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/io/fileinfo.cs:171
at (wrapper remoting-invoke-with-check) System.IO.FileInfo:get_Length ()
at Xamarin.Android.Tasks.MonoAndroidHelper+SizeAndContentFileComparer.GetHashCode (System.IO.FileInfo obj) [0x00001] in /Users/builder/data/lanes/4695/9dbc4c53/source/xamarin-android/src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.cs:101
at System.Linq.Set`1[TElement].InternalGetHashCode (TElement value) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/corefx/src/System.Linq/src/System/Linq/Set.cs:206
at System.Linq.Set`1[TElement].Add (TElement value) [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/corefx/src/System.Linq/src/System/Linq/Set.cs:74
at System.Linq.Enumerable+DistinctIterator`1[TSource].MoveNext () [0x00083] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/corefx/src/System.Linq/src/System/Linq/Distinct.cs:72
at System.Linq.Enumerable+SelectEnumerableIterator`2[TSource,TResult].ToArray () [0x00030] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/corefx/src/System.Linq/src/System/Linq/Select.cs:155
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00015] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/external/corefx/src/System.Linq/src/System/Linq/ToCollection.cs:19
at Xamarin.Android.Tasks.MonoAndroidHelper.DistinctFilesByContent (System.Collections.Generic.IEnumerable`1[T] filePaths) [0x00001] in /Users/builder/data/lanes/4695/9dbc4c53/source/xamarin-android/src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.cs:164
at Xamarin.Android.Tasks.CheckDuplicateJavaLibraries.Execute () [0x000fb] in /Users/builder/data/lanes/4695/9dbc4c53/source/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/CheckDuplicateJavaLibraries.cs:29
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:632
at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00249] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/msbuild-15.0/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:787 (MSB4018) (AppTESTwindows.Android)
It seems like a Xamarin Forms android project from windows cannot be compiled on Mac. But the thing is, from Mac, you cannot manage the NuGet packages and it doesn't create the UWP side...
I then tried to two following solutions:
Windows to iOS - Xamarin Forms PCL project created from Windows and compiled on Mac
Cannot be compiled (Error MSB4018)
NuGet packages cannot be managed
iOS to Windows - Xamarin Forms PCL project created from Mac and compiled on Windows
Can be compiled
NuGet packages cannot be managed on the PCL part (only Android/iOS)
The UWP side of the project doesn't exist
I don't understand because I almost spent a day on it and I can't find anything on the internet... They just say that NuGet isn't available on Mac, so alright, why not, but it means that I need to create the solution from windows then? However, I can't manage the NuGet packages of the shared part (PCL).
It's also weird because I can't believe that we can't work from Mac and Windows on the same solution, how does work teammates that share a project over git then?
If you can explain to me what I didn't understand, then please reply.. I need to work often outside of my house and, I need to manage my nuget packages...
Thank in advance !
I have read this, this, this, this and this questions and answers, none of them have help me at all.
I'm trying to install Visual Studio 2015 Express or Community edition, I have W7 SP1, I have tried with admin rights, I've checked that no preview VS have been installed but no matter what I do, I still can't install VS and I don't understand what the log says, I'll append a picture and what I think is an important part of the log file:
[0D48:1794][2015-10-20T19:36:45]i000: MUX: Feed uri to register: http://go.microsoft.com/fwlink/?LinkID=558779&clcid=0x409
[0D48:1794][2015-10-20T19:36:47]e000: MUX: Exception: Info: Unable to load dynamic feed
[0D48:1794][2015-10-20T19:36:47]e000: MUX: ERROR: Could not load file or assembly 'System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
[0D48:1794][2015-10-20T19:36:47]e000: MUX: Stack: at Microsoft.Web.PlatformInstaller.Util.IsSignatureValid(String xmlFile)
at Microsoft.Web.PlatformInstaller.ProductManager.LoadFromXml(String xmlFile, Boolean loadEnclosures, Boolean isOnlineFeedLoaded, Boolean verifySignature)
at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory, Architecture architecture, Int32 osType, String& finalFeedCacheLocation, Boolean& isOnlineFeedLoaded, Boolean& onlineFeedLoadError, String localFeed, Boolean verifySignature, String feedUri, String lastUsedFeedLocationKey, BundleProperties currentBundle)
at Microsoft.Web.PlatformInstaller.ProductManager.Load(Uri productFileUrl, Boolean filterByArchitectureAndOS, Boolean loadEnclosures, Boolean useCachedVersion, String cacheDirectory, String& finalFeedCacheLocation, Boolean& isOnlineFeedLoaded, Boolean& onlineFeedLoadError, String localFeed, Boolean verifySignature, String feedUri, String lastUsedFeedLocationKey, BundleProperties currentBundle)
at Microsoft.Devdiv.Bootstrapper.Utility.SecondaryInstallerUtility.LoadProductManager()
[0D48:05C8][2015-10-20T19:36:54]i000: MUX: View loaded
[0D48:05C8][2015-10-20T19:36:54]i000: MUX: Go to Blocker page.
[0D48:05C8][2015-10-20T19:36:54]i199: Detect complete, result: 0x0
Apparently, the problem is in:
Could not load file or assembly
'System.Security, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'
UPDATE
After devlin carnate suggestion and reading answers from this site and this one too I have tried the following:
Update my OS. Except for the "update to W10" I have installed all updates (even some of those marked as optionals).
Run a "scan now" from command prompt, bassically, I followed instructions from this site, and even when something were marked as corrupted I don't know how to repair it ('cause no dll or file were detected).
Uninstall the .NET Framework and install a prev version (from 4.5 to 4) but the problem persist (also, after this, windows suggest to update to 4.5 so I reinstall 4.5 version).
Use the .NET Framework Repair Tool with no results.
UPDATE 2
I just format my HDD unit and reinstall (the same) W7 SP1 all over again, after that, I was able to install VS Community Edition, but I don't take this as a solution since is just too drastic and I don't know the original reason of why this happened in the first place.
i have an application that is causing me alot of trouble. the guy who created it doesnt work at our company anymore and it is up to me to fix and release the program for our windows 7 machines
However i get the following stacktrace:
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.18063
System.Deployment.dll : 4.0.30319.17929 built by: FX45RTMREL
clr.dll : 4.0.30319.18063 built by: FX45RTMGDR
dfdll.dll : 4.0.30319.17929 built by: FX45RTMREL
dfshim.dll : 4.0.41209.0 (Main.041209-0000)
SOURCES
Deployment url : file://nkm18427/PRV-JSKR/Backup/DOPeSolutions.application
Deployment Provider url : http://nkm18f53:8181/DRIFT/DOPe%20Data%20Management/DOPeSolutions.application
Server : Apache-Coyote/1.1
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\nkm18427\PRV-JSKR\Backup\DOPeSolutions.application resulted in exception. Following failure messages were detected:
+ The deployment identity at the deployment provider is not the same as the original deployment identity.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [05-03-2014 13:45:05] : Activation of \\nkm18427\PRV-JSKR\Backup\DOPeSolutions.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [05-03-2014 13:45:05] System.Deployment.Application.InvalidDeploymentException (SubscriptionSemanticValidation)
- The deployment identity at the deployment provider is not the same as the original deployment identity.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Can anyone tell me why this is happening and how i can fix it?
Problem
I usually get this error whenever I tried to publish a click once app with a different target architecture then what is currently installed on a machine (x86 vs x64)
OR
When the signature/certificate of the application is different than the original publish
Solution
I would try making sure that your target architecture has not been changed (if you published it originally as x32, make sure the version you are trying to install is still x32)
or
make sure that nothing has changed with the signature settings (if you published originally with a certificate, make sure it is still the same certificate)
If you made these changes on purpose however, all you'll need to do on the host machine is uninstall the existing application on the machine, and re-install with the version you are trying to install, that should resolve the error and allow you to install the new version.
You will get the same exception when you changed the "Publish Location" -> "Installation Folder URL (if different than above)", but forgot to change the following: "Install Mode and Settings" -> "Updates..." -> "Update location (if different than publish location)".
I just ran into this error message in the following situation. I updated my ClickOnce application to sign the ClickOnce manifests with a trusted certificate issued by my organization. This particular application was using a self-signed certificate in the previous version. This in turn changes the publisherIdentity element (https://msdn.microsoft.com/en-us/library/dd996956.aspx) and it's generated hash in the ClickOnce Deployment Manifest (.application file).
In your situation, it's possible that the previous developer re-signed the application with a different certificate than the previous version. Or perhaps the application had not been signed in the previous version. Judging by the error message you are seeing, this is almost certainly an application that has been published as a ClickOnce application.
Assuming that you have your hands on the code, and that you are using Visual Studio, right-click on the project in Solution Explorer and select Properties. Then click on Signing to see signing details such as whether or not the manifests are signed, and if so, which certificate was used.
I received this exception because I had downloaded the .application file using an IP address instead of the full DNS name. The application was being hosted on a CDN, so certainly would not be a typical situation but in my case switching to the full name fixed the issue.
In my case, I was getting this error while trying to install it from a different internet URL than specified in the project properties.
When testing several different ClickOnce updates in a short time, I noticed that I got this error ("Application cannot be started" with details "The deployment identity at the deployment provider is not the same as the original deployment identity."), even when I uninstalled all previously installed packages!
Clearing the ClickOnce cache (as described here) and rebooting didn't solve the problem.
But after I cleared the browser cache (Chrome in my case), I was able to install the ClickOnce package. So before you test installing an update (as a developer, by visiting the Installation URL), make sure you clear the (default) browser cache first.
For Chrome: once or disable cache during session
For Edge: once
I'm getting the following exception from System.IO.Path.CheckInvalidPathChars() in mscorlib:
[ArgumentException: Illegal characters
in path.]
System.IO.Path.CheckInvalidPathChars(String
path) +142
System.IO.Path.NormalizePath(String
path, Boolean fullCheck, Int32
maxPathLength) +100
System.IO.Path.GetFullPath(String
path) +187
System.Xml.XmlResolver.ResolveUri(Uri
baseUri, String relativeUri) +114
System.Xml.XmlTextReaderImpl..ctor(String
url, XmlNameTable nt) +135
System.Xml.XmlDocument.Load(String
filename) +85
Sitecore.Web.UI.WebControls.WebEditRibbon.ConvertToJson(String
layout) +210
Sitecore.Web.UI.WebControls.WebEditRibbon.Render(HtmlTextWriter
output, Item item) +1268
Sitecore.Web.UI.WebControl.Render(HtmlTextWriter
output) +387
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter
writer, ICollection children) +246
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter
writer) +315
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter
writer) +48
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter
writer, ControlAdapter adapter)
+11279890 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter
writer, ICollection children) +246
System.Web.UI.Page.Render(HtmlTextWriter
writer) +40
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) +5274
The thing is, I don't what the path value is that's causing this error. It would help if I could debug the method so I can see the value of the path parameter. I enabled stepping into the .Net Framework code in Visual Studio 2010. I've also loaded the related .Net Framework Symbols from the Microsoft Symbol Servers. However, it seems these PDBs don't include the source; so I can't step into CheckInvalidPathChars and retrieve the path value.
Is it possible to debug mscorlib and step through its source?
Relevant info:
.Net Framework 4.0.
Visual Studio 2010
Any constructive input is greatly appreciated.
Thanks,
Frank
You can get the reference source for the .NET libraries.
http://referencesource.microsoft.com/
Looking at your stacktrace, the problem appears to be originating in Sitecore.Web.UI.WebControls.WebEditRibbon.ConvertToJson. That thing is trying to load an XML file.
Using reflector would allow you to do that.
Is it possible that you enabled to break on all exceptions? Doing that would certainly account for internal exceptions showing up in the debugger. If this is the case, you can safely ignore the exception.
Well mscorlib.dll on your machine is of release build so even though you can very well debug into it, you won't be able to see values local variables/objects etc. The code in this binary is optimized. If you want perfect debugging experience of Microsoft .NET code then you will need to install debug version of .NET on your machine.