UnityContainerExtensions.cs not found - visual-studio

After updating some NuGet packages, it turned out that some things in my website got broken by new code. I updated to the new Unity inversion control 5.0.0, etc. So after a while of hunting around and trying to fix it, I was able to get it to finally build and launch the site. However, the Unity IOC was broken because I kepts getting the "Error in Application '~/', controller must have a parameterless constructor". I saw that my couple of Unity files (UnityConfig.cs and UnityMvcActivator.cs) were gone, so I replaced them with ones I had in the backup folder.
Well, now it launches a loading site, but in VS it now says "UnityContainerExtensions.cs not found". I see that it looks all over for this file, around 'C:\ Program Files (x86)\Microsoft Visual Studio 14.0\VC...' and then it goes looking through 'c:\projects\unity]Abstractions\src\Utility...' - a folder that I can't even see.
This is in VS2015, doing a web application with Framework 4.6.
What can I do to just make it work again, as when I first had it so many months ago?

Alright, I was able to fix my Unity problem by rolling back on some of the packages. I'm the kind of person who likes to have no notifications, so I clicked Update All, and apparently the updates weren't necessarily compatible with my project here. To get it working again I has to bring back:
Unity.Abstractions = 2.0.0
Unity = 4.0.1
Unity.AspNet.WebApi = 4.0.1
Unity.Mvc = 4.0.1
Now to great relief, all works just as it did before!
However, I do wish I knew why the breakages happen and also why these packages are listed as updates when they are not going to work with my project.
Till the future, my system is going to have to consist of a Post-It "Do not update these xxxx packages, they will break stuff". And I wish to gain an understanding of what is the reason behind such Unity mess.

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.

MSB3073 UE4 exited with code 6 - how do I fix this?

Ok, so I'm taking a udemy course on UE4 and when compiling I have a issue where I'm presented with my file location and told it exited with code 6. There are also a lot of errors saying that say it can't read my macros - how do I fix this? I'm relatively new to this so try to make it as simple as possible when answering. Thank you.
I would advise paying close attention to syntax and UPROPERTY (what is in here).
For example, I had this situation:
struct FGridCoord
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Grids")
int Col = 0;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Grids")
int Row = 0;
/** Default constructor (no initialization). */
FORCEINLINE FGridCoord() {} <<<------ This was giving same error ---->>> FORCEINLINE FGridCoord();
And other one I had:
UPROPERTY(VisibleAnywhere, Category = "Grids", meta = (AllowPrivateAcsess = "true")) <<<---- It had BlueprintReadOny and was giving an error
USceneComponent* RootComp;
I was getting the exact error this question lists (also taking a Udemy course on Unreal LOL), syntax all looked fine (this project/environment worked fine the last time I used it, some months ago) and hadn't changed, so I decided to clean the solution and rebuild.
This time I got a slightly different error, and it mentioned needing Windows SDK installed.
A quick Google of that seems to show that yeah, that's what's needed. Visual Studio Installer showed under C++ Game Development that none of the Windows SDK options were checked/installed. Since I'm running Windows 10 I checked the most recent/highest version of W10SDK and installed that.
After that I tried loading my project from the Epic Games Launcher, just like I did before starting my Udemy course 30 minutes prior. Now that said it was missing a module and that it needed to be rebuilt. Clicked "OK." The project rebuild failed.
I saw Unreal Engine could be updated from 4.27.1 (which I created my project in and which had been working without issue some months ago, like I said) to 4.27.2. Downloaded the 4GB update, still got the "missing module, rebuild" error but after clicking "OK" that time it built and UE 4 opened the project. VS2022 now builds the solution, and I can play the project within UE 4.
I have no fricking clue what just happened here, cause this all worked last time I worked on it and I changed nothing in the meantime, but it all works now.
So for others that get this, maybe:
Try cleaning your solution and see if you perhaps need to install Windows SDK
Maybe upgrade your UE 4 a minor version, if it's available
Head asplodes 🤷‍♂️🤷‍♂️🤷‍♂️

How to migrate/update to newer version of Xamarin.Forms?

I have some xamarin.forms 1.xx( I dont know which version) project on multiple platforms Android and iOS. And I've been asked to upgrade it to the maximum available right now version of xamarin.forms.
Therefore, I have 2 questions:
1) How to determine which version of forms I'm using right now (I'm working in Windows environment using Visual Studio 2015 ).
2) How to migrate/update to newest version of forms? (step by step, if it's possible). I have no idea how the result of that kind of operation supposed to look like, cuz I have never done anything like this before in my life. And what the best practices are?
What I've done is opened VS2015->Help->Xamarin release notes, however there was nothing about version of Forms I'm using. Also, I went to the official xamarin website and there was no guide how to do that. I also tried to look at the release notes the last Forms update and trying to find and fix differences, but my project is so big and I thought that this way doesn't seems right.
I'll answer first the What are the best practice regarding upgrading a Xamarin.Forms application? first and then address your other concerns.
I recently upgraded from 1.5.1 to 2.3.2, and from my experience, this is the steps to go through:
Decide which version you will upgrade from and to.
Read the change logs for all stabled releases between these two versions and look for breaking changes/bugfixes. You can find the release notes on Xamarin's website or on NuGet's website too.
Check regularly for new releases on the Xamarin.Forms forum and check if any reported issues may affect you. Every time Xamarin makes a release, there is a thread full of comments from other developers that may have encountered issues you might be interested in.
Using your favorite versioning software, make sure that all local changes are commited or stashed and create a new branch for your Xamarin.Forms upgrade (you don't know how long the upgrade will take and you still want to be able to send patches during the process)
Upgrade: Read the Important notes at Xamarin.Forms 2.3.2 release notes, especially the When upgrading Xamarin.Forms take care not to simply "update all" as ... part. Remember to upgrade on your PCL project, on your iOS project and on your Android project.
Test your whole app on as many devices as possible and for the longest possible period before you merge your branch back into your development/master/Main branch and address the potential incompatibility issues that may have been created in your development/master/Main simultaneously.
Step 3 is very important as it will allow you to reset back to your starting point and restart if you should fail to upgrade for whatever reason.
Xamarin.Forms is moving fast so it's important that you always keep an eye on what's going on even if you don't upgrade.
Which version am I using right now?
You can check that in the NuGet package interface or in the packages.json file in your project.

Program updating does not works properly

I have a program which has several versions. In the last version I have a problem: when I'm trying to update previous version to new one, the installer of new version removes files from previous version, but don't installs new files.
Just installing works fine, but updating process has this problem.
What can be the reason of this problem ?
Upade: I'll try to describe more detail
I have VS project where I have a project of program and an installer of this project. Till present all were working fine, but after my last big update ,the installer start work incorrectly.
And another question:
How I can debug installation process ?
I dont know which program you have. Generally programs have problems because of multible versions, because programmers arrange this. For example ;
Lets consider Microsoft Framework. If you have 4.5 you cannot install 4.0, so that with similar idea you cannot update it.
Try to delete other versions and update them and install others. Or you can also stop services which you dont want to update.Then other one will be updated without any problem.

How do I get MailCore to work correctly?

I'm trying to build MailCore into my app but I keep getting
"_OBJC_CLASS_$_CTCoreAccount", referenced from:
That is the only error I'm getting and CTCoreAccount is in the project.
In order to use mail core framework, visit the link follow step by step process and you are done.
I have an answer. It is not "The Answer" but I have an answer and it worked.
Eidt: For this: After a slew of issues, I've realized that "this" particular fix is that you need to add libmailcore.a to the frameworks. It keeeps getting deleted by XCode, or you may ahve added the MailCore Framework instead.
Started a fresh project, erased everything by removing application files to trash, then deleting references. "Added" via group (unsure if it matters) all my folers/files from the project I was trying to.
Had to tell it where the pch and Info.plist were, (essentially pointing it to my old project). Re-added all frameworks, and voila, it compiled.
I'm suspecting XCode 4.5 has different framework settings as far as library paths and valid flags for linker, etc. But nothing I tried regarding that fixed it. I would love to do this more direclty, old project is on 4.3, and won't be upgrading it if this is happening. Anyway, up and running, hope others are soon too. Would like real answer myself

Resources