.Net 5 RC 1.20451 Blazor App Fails to launch - visual-studio

I realise this is pretty 'bleeding edge' stuff so no complaints. I just wonder if anyone else is having the same issue. I am trialing .Net 5 Blazor Web Assembly and have been expanding out from the template app. Local server with built in auth. I have reached a point, size, complexity.. hard to pin down where the app just crashes out when trying to run a debug build. It seems to kill the .NET Host because if I go and remove it using task manager, with a clean start, I can then run it just fine -once.
On the second occasion there is an exception and the launch adapter fails to start.. see the two errors in the image:
There is very little more information since it has failed in 'external code' and I can't get to it to see if I have set something up incorrectly as a null ?
This error message came from the 'Copy Details link':
Any ideas anyone... I was hoping the RC would be about ready for primetime, but I realise that is why it is a release candidate...
I am using VS 2019 16.8.0 Preview 3.2

Related

Blazor Web Assembly/Server App No Longer Builds or seems to exist. Packages 'Disappeared'

I am developing a Web assembly app with the template model which I had so far successfully migrated to .Net 6. It follws the template format of Client, Server, Shared. All working so far.
I wanted to move the ApplicationDBContext into the SHARED project as it feels a bit out of sorts in the SERVER Proj, and I need a another Webjob Project to reference it so it seemed like a good idea... (Checking in before I did it - just in case).
I moved it and changed the namespace and rebuilt the SHARED. Then thinking I would have a load of namespace fixups to do. Cutting a possibly long story short, the App then failed to build with ALL the packages in the client showing a yellow 'warning' triangle, but without indicating what the error/warning is:
I am also seeing this error:
Error NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'. RaffleGames.Client
I decided to abandon the tidy up and revert to how it was... Sadly though, it is now broken with the same errors.
If I remove the reference to the SHARED project, then the warnings dissappear, but of course the CLIENT will no longer build.
Adding it back causes it to build but again with the above error.
I did wonder if some of the dependencies arent allowed in a blazor app as I did see that somewhere.. heres the project re-added:
I have re-started VS, and the machine, just in case... but to no avail.
I realise this is not a very clear question, but obviously something changed as a part of the build process and and I am looking for some pointers. Thanks in advance.

How to I solve a Visual Studio Fatal Error during debugging involving Desktop CLR, CoreCLR and recommending Managed Debugger

I'm afraid the error is so baffling to me I didn't even know how to word the question! I'm writing a plugin that's a class library for a Third Party Application (call it 'ApplicationX'). I had this successfully set up in a debug environment where it would build to ApplicationX's Plugin folder with the .pdb file and then the VS debug would start ApplicationX, thus enabling me to debug the plugin/class library code. This was working fine until I had a System Drive crash >.< (my first ever + ouch!).
Here's the debug setup:
I've just come back to it. I couldn't tell you all the changes, but I'm on VS2022 now as opposed to 2019. Now when I run it (the source code and ApplicationX is still much the same), I get this really weird error:
I've read through all the SO articles I could find and tried the suggesitons therein, but nothings worked. Firstly, I just can't understand the error. Secondly, Are there any suggestions on what to do. Here's what I've tried:
Installing .net Core 3.1 and 6 (full + desktop versions)
In options>debugging>general, checked "automatically close the console when debugging stops"
Some other stuff that I can't remember right now!
Be grateful of any help as this has brought my dev to a grinding halt!
Solution: I got in touch with the author of 'ApplicationX' He confirmed that he'd migrated it to .net Core. So that was the issue. I haven't got the solution in terms of solving it from that perspective, as I switched to the .net Framework version of ApplicationX instead! Non-the-less, the error's a bit clearer.

Running unit tests in Xcode 8 causes error "could not load inserted library '.../IDEBundleInjection' because image not found"

I am suddenly running into the error when testing my iOS 10 app in Xcode 8.
dyld: could not load inserted library
'__PLATFORMS__/iPhoneOS.platform/Developer/Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection'
because image not found
The app's tests ran successfully before. I had then deleted the skeleton UI Test Case class that was created together with the project, so this may have caused the problem (somehow). I have since recreated that class, but the problem remains.
What exactly does the error message indicate and how can I overcome the problem, i.e. successfully run the app's unit tests again.
UPDATE There must be another root case, for if I create another (empty) Single View Application project in Xcode and run its unit tests, the same error occurs.
The error only occurs when running unit tests on a device, not on simulators.
UPDATE This response from Apple to a similar report suggests the error is related to code signing. The app itself runs fine on the same device, so how could there be a code signing issue in my case?
Try these one by one:
Try to create a new UnitTest target, copying everything over, and removing the old one.
In General Tab Panel, do not leave the Team to "None". Select your team. And select the correct Code Signing Identity from Settings. It was set to a non default - changed to 'IOS Developer' for the Debug setting entry.
Disable "Enable guard Malloc" from diagnostics to run app in device.
This may be because Xcode mount wrong DeveloperImage. If you open the Settings-> Developer you will see that the "Enable UIAutomation» and others are missing. To fix:
(A) move all folders from "/Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport" except "10.0 (12A4297e)" to safe place
(B) reboot the phone
(C) connect your phone to xCode 8
(D) restore folders in DeviceSupport
This is the only thing that helped me. Even re-flashing on ios10 does not helps.
This is old, but it may help you: In the target's General tab, there is an Embedded Binaries field. When you add the framework there the crash is resolved.
Reference is https://devforums.apple.com/message/991384#991384 on Apple Developer Forums.
Best of luck!
There is a restart mechanism in Xcode testing infrastructure that detects crashes during tests and attempts to restart testing to complete any remaining tests. There may be an issue with how that mechanism is setting up DYLD_INSERT_LIBRARIES following a crash in your tests - please file a report at https://bugreport.apple.com and attach your project if possible.

All MVC3 App failing at runtime for same reason

I am starting to learn MVC(3) following a tutorial. I am a developer so I know basics and I cannot find an answer on the web that is relavent enough to fix my issue.
All the MVC apps are the default start up code. I select an "internet application" and choose to user HTML5. F6, build works. Rebuild works. F5, debugging is a different story.
Compiler Error Message: CS1541: Invalid reference option: 'C:\Users\Other\AppData\Local\Temp\Temporary ASP.NET Files\root\f20fc565\816eddc7\App_global.asax.lsdrp-bk.dll' -- cannot reference directories
I have searched my disc and no "App_global.asax.lsdrp-bk.dll" exists at all. Please help!
Shut down all of your visual studio web servers running in your system tray.
Delete everything from:
C:\Users\Other\AppData\Local\Temp\Temporary ASP.NET Files\
That's your first step.That's a good starting point.
The error shows up as:
http://msdn.microsoft.com/en-us/library/2zyc8wkc(v=vs.90).aspx
where it thinks App_global.asax.lsdrp-bk.dll is a folder for some strange reason.
Also if you reference any other projects in your solution, re-add those references.

Debugging a Google Web Toolkit application that has an error when deployed on Google App Engine

I have a Google Web Toolkit application that I am deploying to Google App Engine. In the deployed application, I am getting a JavaScript error Uncaught TypeError: Cannot read property 'f' of null. This sounds like the JavaScript equivalent of a Java NullPointerException.
The problem is that the GWT JavaScript is obfuscated, so it's impossible to debug in the browser and I can't reproduce the same problem in hosted mode where I could use the Java debugger. I think the reason I'm only seeing the error on the deployed application is that the database I'm using on the GAE server is triggering something differently than the test database I'm using during testing and development.
So, any ideas about the best way to proceed? I've thought of the following things:
Deploy a non-obsfucated version of my application. Despite a lot of Googling, I can't figure out how to do this using the automatic deploy script provided with the Google Eclipse Plugin. Does anyone know?
Download and copy my GAE data to the local server
Somehow point my development code to use the GAE server for data instead of the local test database. This seems like the best idea...
Can anyone suggest how to proceed here?
Finally, is there a way to catch these JavaScript errors on the production server and log them somewhere? Without logging, I won't have anyway to know if my users are having errors that don't occur on the server. The GWT.log() function is automatically stripped out of the production code...
1) If you can replicate the needed state of your GAE database locally, then run the javascript compiled version on your local machine. This will almost certainly give the same error, but is a lot less expensive than a full AppEngine deployment. Do this by compiling your app with the GWT compiler, then start it normally, then point your browser to the specified address without the ?gwt.codesvr=127.0.0.1:9997 part.
2) Use the -style PRETTY or -style DETAILED with the GWT compiler to get nicer javascript. If you compile locally with this flag once, then deploying to AppEngine (with the Eclipse plugin) will send the same non-obfuscated version.
3) Instrument your code (Window.alert() works fine) to figure out exactly where the error happens. This is especially useful to find where the javascript execution deviates from the hosted mode execution.
4) Speed-up your compilation process by keeping only one permutation. See how to do this there:
How do I speed up the gwt compiler?
5) Javascript errors that don't show up in the development version or in unit tests are (almost always) due to a bug in GWT, after you've investigated a little, drop by the GWT forum or issue tracker and see if it's a known bug and whether or not there is a workaround.

Resources