Unity Hololens System.web.httputils doesn't exist in target Framework - c#

I am trying to build an app for the Hololens. It already worked a lot of times, as I am developing since about 10 months. But all of a sudden, a reference is broken. I have appended a screenshot.
I have already tried (for weeks):
Downgrading to version before, I also tried all unity versions available since 2018
Reimporting all assets
Running a virus scanner because crypto mining malware can affect imports
Talked to Microsoft support
Did manual imports with a csc.rsp file
Tried building in unity and running in vs code.
Tried to delete the dlls
Tried to add missing dlls in a lot of places.
Creating a whole new project but error persists.
A lot of other things I can not remember right now.
It looks like Unity is not able to copy System.web.dll into the Temp\Staging folder. Kind regards

Since the build completes in the end, did you test deploying the app?
We have a similar list of errors when building our app, but it still works as expected when deployed to a HoloLens.
It appears similar bugs have appeared a number of times before as well:
https://github.com/microsoft/MixedRealityToolkit-Unity/issues/3939
https://fogbugz.unity3d.com/default.asp?1146307_k5pfi2qqltmcvqm5

Related

VSCode intellisense with Unity not working

Note this is on my desktop;
I started a little side project in unity several weeks ago, and intellisense was working just fine. It had been working since I switched my unity code editor to VSCode long before I started this project. I went to work on it a little today and it was just gone. The only suggestions it gave me were words it had already seen, i.e. C# methods I'd used like AddLast from a LinkedList or a few method names from my own classes I'd referenced.
Every suggestion was either marked with the little "abc" tag instead of the icons indicating whether they were properties or methods, or the suggestion was a method related to unity with a missing icon.
This is especially weird, because I have a "duplicate" project on my laptop that I carry with me on campus so I can jot ideas down the second I get them. Everything is the same between both devices, the same project settings, the same preferences, the same VSC environments, the same extensions, settings, preferences, and packages.
I get intellisense on my laptop.
I've been reading threads for hours, and nothing has worked from any of them! Fresh install of C# dev kit, eliminating sln/csproj files and regenerating them from preferences, changing .net compatibility level, pointing omnisharp "in the right direction," and hours of watching unity, vscode, and my desktop shut down and reboot just to name a few.
Thanks in advance for any helpful pointers, proof I belong in a mental ward, or both!
I found the issue
Modern C# extension updates with vs code don't support unity.
See here:
Following the issue's heed, I turned off modern net with omnisharp while using extension version 1.25. Then, I updated my vs code package to the latest version (1.2.5 as of writing) and regenerated all project files from preferences (having vs code set as the designated editor).
All credit to sleepysheepy for pointing me in this direction
Does it help if you go to the C# extension and roll back to version v1.24.4, and then reload VSCode?
Pardon me if you already said you tried that! That's what did the trick when IntelliSense stopped working for me recently.

When opening Unity project, it is stuck on importing

I'm working on a Unity project (2020.2.1f1) on both my home PC and a workplace PC (which is 64-bit aswell and has the same Unity version). It all worked fine until today, when I tried opening my Unity project from my external SSD on my workplace PC, the opening process got stuck on "Importing... (busy for )"
What I tried so far:
Restarting my PC
Deleting various files in a copy of the project, such as the library or the meta files (deleting those just led to the resulting project looking awful and all script implementations missing ect)
The upm.log file states:
[INFO] Resolving dependencies using SAT solver
The editor.log has a massive bunch of code, but the last line states:
[C:/PROJECTNAME/Library/PackageCache/com.unity.ide.visualstudio#2.0.5/Editor/FileUtility.cs line 22]
(PROJECTNAME equals my project name which I dont wanna reveal here)
Anyone got an idea how I can get my project running again?
I've run into this a few times and have typically been able to resolve it by deleting the package cache at /Users/<USERNAME>/AppData/Local/Unity/cache before launching the editor.
Not sure what the root cause is though - so this is a workaround at best.
Do you use Unity Hub?
If so, just uninstall the unity version you are using and reinstall it or a newer one.

Windows Embedded Standard 7 won't find my .dll

Several weeks ago I have build a Native C++ .dll that wraps a third-party .dll to be used with C# P/Invoke in several applications to be deployed in WES7. I've been using Windows 10 as a dev box and everything works as expected. This week I finally got my hands on the box with embedded Windows and things are not doing that well anymore... I've tried to deploy three different C# applications that use the .dll I built alongside the third-party one but they all fail with a DllNotFoundException. Obviously both .dll files are in the same folder as my executable file for each project, but I keep getting the DllNotFoundException. My native .dll targets the Win32 platform, the embbedded windows is a 32-bit system, and all my C# apps are built to target the x86 architecture, so I've ruled that out. I've wasted the last hour messing around with the system32 folder to no avail, so I've run out of options. Any suggestions will be appreciated.
Edit: I just talked to a co-worker who works remotely and he had the exact same problem when trying to run our .dll under WES7. I'll update this question as soon as I have more info.
In the end, I happened to be dumb enough to deploy a DEBUG version in the target machine, which didn't have msvcp100d.dll and msvcr100d.dll. I used Dependency Walker to figure that out (apparently it was too hard for me to take a look at the project properties page drop-down) and deployed a release version in the target. It finally worked, but I had a different problem that leads to another question...

A dependent dll was not found

My app does not run on "Release x86" when running the app it crashes immediately after the splash screen. Output shows the following exception:
The program '[8204] dfz.exe' has exited with code -1073741515 (0xc0000135) 'A dependent DLL was not found'.
It also tells me the module is build without symbols, however in build settings I have set debug info to Full.
The first time I build the app for the Windows Store it built correctly and I also published that version to the store. When I did a manual rebuild to check if ads where inserted correctly it would not run.
However, I can run the app on ARM and X64 with no problems on release. Only x86 with .Net native toolchain will throw the missing dependant DLL.
What I have tried so far:
Created a new project, Added all my files and Nuget packages, No dice
Removed and updated all my existing references.
Tried to debug the release version so i can find out what DLL is missing from the package. However it keeps telling me there are no symbol files.
I am looking for any suggestions I can try because I am really at a loss here of why it will not run on x86.
Edit:
A blank UWP project also returns the DLL error when i run it. It looks like i have a broken development environment.
Edit2:
Just did a remote debugging session to another laptop and the app worked with no problems. So the problem is an environment related issue.
Could one of the projects in your dependencies be configured specifically for x64?
Another thing to check is that one of your projects is not set to build for that configuration (I vaguely remember some problem I had years ago that sounds kind like your situation ... although not for windows store apps ... and it turned out one of my projects wasn't set to compile for the configuration I was selecting ).

Couldn't find the required information in the lock file. Make sure you have .NETCore,Version=v5.0/win10-anycpu mentioned in your targets

I'm working on a Windows 10 universal app. The aim was to have a JS front end connecting to a C# library for the heavy lifting. Though when I add the reference and trey to compile I get the following error
Couldn't find the required information in the lock file. Make sure you
have .NETCore,Version=v5.0/win10-anycpu mentioned in your targets.
I've looked around and in a few cases the solution has been to update Visual Studio and the NuGet packages which I have done.
Any suggestions would be great,
Thanks
Just change build configuration to x86 or ARM and it should work.
Any CPU is not supported by UWP projects, because they are built using .NET Native. You can read more about it here.

Categories

Resources