I am developing UWP application for remote device using VS17. I suddenly got this message
Error The "WireUpCoreRuntime" task failed unexpectedly.
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at Microsoft.Build.Net.CoreRuntimeTask.WireUpCoreRuntime.InternalExecute()
at Microsoft.Build.Net.CoreRuntimeTask.WireUpCoreRuntime.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() DataManagementApp
And I am stuck at this error for about week. I dont know what cause it. Last thing that I made was that I move GPIO routines to external library. After that, each build ends with this message.
What I tried:
Turn off antivirus
Redo last update (library is working on other similar solutions)
Redo several last changes in build
update VS, repair VS and repair SDKs
update versions of libraries
reboot target device
build project on other PC (with fresh VS), copy code on brand new project and
run it on my or other PC
get rid of anything that using Linq library in code.
Run VS as administrator
With no success at all. I will be very happy if anyone will help me with solving this problem.
I messed up with appxmanifest file. I use AppServices for background work. In this example they have got some changes in appxmanifest file, but they suddenly throws error.
<Application Id="AppServicesProvider.App"
Executable="$targetnametoken$.exe"
EntryPoint="AppServicesProvider.App">
Have to be simplified into
<Application Id="App">
And it throws no error anymore.
I experienced the same error renaming the Assembly name for a UWP application.
I discovered you also need to open Package.appxmanifest and change the Entry point to the same value you used in Assembly name.
Related
Whenever I attempt to open any Unity Template in order to create a new project, the importing process is interrupted by a compilation error, that prompts me to go into Safe Mode. Upon opening Safe Mode, I am confronted with 99 error messages, all in the style of
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\[myuser]\Library\Bee\artifacts\mvdfrm\Unity.VisualScripting.TextureAssets.dll_4E2F4234F69DBB7F.mvfrm'.
However, my project directory is not in that location. I have tried installing Unity on 3 different drives (2SSD, 1HDD; clean reinstall including deleting %appdata% files and Registry keys). I have also tried creating different projects (2D & 3D) in several locations. All with the same result. Copying a friends /artifacts/ directory did not solve the issue either. Upon closer inspection, I discovered that the files in question are indeed in the project\Bee\artifacts\ folder during the working installation/import and then disappear upon error message.
At this point I have tried reinstalls of Unity, UnityHub, several restarts and clean reinstalls. I tried reimporting Assets via Unity Menu, deleting singular folders in order to force a reimport, a manual reimport, manual editing of manifest.json, deleting and reinstalling packages via Package Manager all with the same result or lack thereof.
Version: 2021.3.6f1
OS: Windows 10 Build 19044.1826
I have worked successfully with Unity on this same PC before and no other programs have ever had any problems. At this point the problem just doesnt make any sense to me anymore, I appreciate every help I can get.
Thank you
EDIT: It appears to have been caused by Anaconda, which destroyed my entire primary drive during its deinstall. After fully resetting Windows and reinstalling virtually everything, Unity finally works.
However, I still dont know the exact cause of the problem, nor a solution that does not involve the nuclear option.
I have a small application, it launches properly without debugger and all the features work except one which uses IronOcr (package from NuGet package manager). When I try to use this feature the program just closes.
When I launch this application from within visual studio, everything works fine. No errors and all features work. I get the same result if I run it and attach the debugger to it afterwards. However if I run the exe by launching the exe /bin/release and do not attach the debugger it crashes when I try to use the feature involving IronOcr.
I tested this on a virtual machine, same results with/without debugger. I then tested it on a different computer (fresh install of windows only having VS installed) it gave me this error if debugger is attached:
System.IO.FileNotFoundException: 'Could not load file or assembly 'IronOcr, Version=2021.2.1.0, >Culture=neutral, PublicKeyToken=c2cbcea5ea3f6d8d' or one of its dependencies. The system cannot >find the file specified
I've spent the last few days looking up a reason for this but I have not found one so far that fixes the issue.
What is confusing me the most is:
I assume the error that causes the program to close is the same error that causes it to give this error on the different PC. When I run it through VS it has no issues (it finds the file?) but running it from the exe it cannot find the file. I'm not moving the exe, just running it where it is in the bin/release.
I'm hoping this program will be able to run as a standalone exe.
I am still relatively new to c# and VS, the error may be glaringly obvious, or I may be using the wrong words causing me to not find a solution.
probably a bit too late, but your problem certainly comes from the fact you're using the free licence of IronOCR. It seems that this one only works when the debugger is attached.
If you catch the exception, you get that message:
IronSoftware.Licenses.Exceptions.LicensingException: IronOcr must be
licensed for deployment outside of the Visual Studio development
environment. https://ironpdf.com/licensing
In my opinion this is too restrictive for proper evaluation, so I gave up trying to use it.
Make sure IronOcr.dll is exist at same directory as your executable file.
Try to execute your application from Bin/Debug and see if it runs ok or not.
Check to see if IronOcr.dll exist in Bin/Debug but does not exist in Bin/Release. if so then copy it from Bin/Debug to Bin/Release.
When I build or rebuild my solution I get the error:
Error CS2012 Cannot open 'C:\Users\myUserName\Documents\Visual Studio 2017\Projects\mySolutionFolder\myProjectFolder\obj\Debug\myExecutable.exe' for writing -- 'Access to the path 'C:\Users\myUserName\Documents\Visual Studio 2017\Projects\mySolutionFolder\myProjectFolder\obj\Debug\myExecutable.exe' is denied.'
However, when I build the project, it compiles fine. Once I build the project then a solution build doesn't throw any errors. I am running visual Studio 2017.
What I've tried (without success):
There is a second project in the solution, but I've unloaded it and it still errors.
I deleted the solution file and had visual studio create a new one.
Additional Info:
The error is somewhat random. Usually it errors out, but sometimes not. The odds of an error are reduced the longer I wait between a "Clean" and a rebuild. I have the same problem even when running in Administrator mode. I'm beginning to think it's a hard drive issue.
The application is still running.
\Debug\myExecutable.exe' is denied.' is telling you that you cant replace that because its currently open.
Open task manager and make sure that you end that process, and it should work fine after that.
This is usually what happens to me when I get that error.
Hope this helps
There is a file handle still open for myExecutable.exe. Probably because it is still running (check task manager/process explorer).
If that is not the case, you can try find out which process has has a handle open to said file:
get Process Explorer
Press Ctrl-F to find handle
Enter myExecutable.exe and look for processes that have a handle to the file.
I have a C#/WPF project built on Visual Studio 2013 Professional for work.
This project was originally built on a Windows 10 platform, but has been moved to another computer running Windows 7.
I have found that the project can be successfully built when the program first opens, and I have chosen "clean solution" first. After any change is made, an error appears (Note that I have removed the company name from the line):
"CSC : error CS1583: 'd:[Removed company+project name]\obj\Debug\CSCB4E1285F65D54791A82C162F265D41AD.TMP' is not a valid Win32 resource file".
I have searched for solutions and a common thing suggested is that there may be problems with an .ico files. I completely removed my icon file from the project and it did not resolve the error.
The Microsoft information on this error is:
"This error occurs when you specify a filename with the /win32res compiler option that is not a valid or correctly formatted Win32 resource file. In Visual Studio, the filename is specified in the Application pane of the Project Designer." I've looked in the Application pane and I could not find any /win32res options...
The building process itself is prone to hanging - Stopping at different points. I stop, clean solution, and rebuild which often gets a different result.
What could I do to better diagnose the error? Are there any tools that allow me to see where something went wrong?
Is there something that I have overlooked?
Any input would be great.
I'm trying to get started with this library: 32feet
I have a Broadcomm Bluetooth Stack and haven't been able to figure out how to get this library set up. When I run my code, I get:
Unhandled Exception: System.PlatformNotSupportedException: No supported Bluetooth protocol stack found.
After digging around on their site, I found this: Installation instructions
It says to copy the appropriate DLL's into the project and then run the Test32FeetWidcommWin32.exe. I've tried putting the files in every single folder in my Visual Studio project and then running that EXE, but I still get the same error. Initially I tried just adding the InTheHand.Net.Personal.dll file as a reference to my project, but that didn't work either.
What could I be doing wrong?
It may also simply be that BlueTooth is not turned on in Windows.
I was using the .NET InTheHand library, and received this message only because BlueTooth was turned off in Windows, and resolved it by activating BlueTooth.
I just solved this. I think the problem was an old reference in my project to the NETCF version of the DLL from when I was trying to brute-force a solution, so I wiped my project clean and then started adding everything again and it worked!
A helpful tool to those trying to figure out their problem with this is to copy and paste the app.config file into your release directory with the app you are creating, and change the name to <YOUREXENAME>.exe.config. When you then run your EXE file, it should create a more detailed trace file. For mine, I found that coredll.dll was the culprit by not loading and was masked by the Stack not supported exception. After an easy Google search I found the problem to be with NETCF.
edit: To be clear, after I cleaned out my project a bit I re-added the reference to the correct InTheHand.Net.Personal.dll file and also added the 32feetWidcomm.dll file to my Release folder.