.Net Project gives Many Errors 'Microsoft.VisualBasic.PowerPacks.OvalShape' is not defined, after Full Win10 Reinstall - visual-studio-2019

(Apologies- I originally posted this under another case that had the same type of error message:
Microsoft.VisualBasic.Powerpacks.ShapeContainer not found)
My VS2019 project loads with 53 errors now, after reinstalling everything on a new HDD, after the Dec 2022 MS update killed my old Win 10 system.
Opening the project in VS2019 gives lots of errors like: 'Microsoft.VisualBasic.PowerPacks.ShapeContainer' is not defined
'Microsoft.VisualBasic.PowerPacks.Shape' is not defined
'Microsoft.VisualBasic.PowerPacks.OvalShape' is not defined
or 'FillGradientStyle' is not a member of 'PowerPacks'.
On the old win 10 system, all my projects worked fine. I migrated one of the projects from VS2008 to VS2019 and got it working in both versions.
Now in the new Win 10 install, I installed VS2008 again and VS2019 then copied my project folders over to my C drive.
My old Win 10 system and my old Win 7 system had a directory in Program Files x86 called 'Microsoft Visual Basic 2005 Power Packs', and inside is a folder named '3.0'; but I cannot find this anywhere (the download link provided in the other case does not exist now), so I simply copied that old directory over to my new Win 10 C:\Program Files (x86).
Opening the project in VS2019 gives lots of errors as shown above.
I also tried copying my old VS2008 version project folder over, and even opening that in VS2008 it gives these errors now.
The project references in both versions of the project already have C:\Program Files (x86)\Common Files\microsoft shared\Visual Basic Power Packs\1.1\Microsoft.VisualBasic.PowerPacks.Vs.dll and when I select this in the references window, the properties window populates and shows it is Version 9.0.0 (but RunTime Version v2.0.50727). The actual DLL file referenced shows File and Product version 9.0.30729 and says the Product Name is Microsoft (R) Visual Studio (R) 2008. So it seems like both the VS2008 and the VS2019 projects already were referencing the Powerpacks.Vs that was installed by VS2008 and they should work. (They worked in the old Win 10 system before MS ruined it).
The Visual Basic 2005 Power Packs folder was only copied, not installed (possible problem?) but that may be a red herring because the project has a reference to the VisualBasic.PowerPacks.Vs.dll.
What has happened? How do I fix it?
More Info: The Toolbox is empty, but maybe that's because it only populates once a form is open. The main form will not open because it has components from the Powerpacks, like oval shapes and containers, so I understand the toolbox not populating there. When I open my 'About' form, the toolbox populates, but the VisualBasicPowerpacks section has only a Pointer and PrintForm icon! No other shapes/components!
Just tried 'Choose Items' context menu option for the toolbox, but there are no Powerpack entries there, even though the project references include the Powerpacks .Vs.

OK, I have finally stumbled upon a solution myself. (Been working on this for a few days).
I believe there may be some incompatibility/confusion in how Visual Studio references powerpack versions.
Although my project had powerpacks.Vs referenced, and the Vs dll was there at the path, it clearly wasn't working.
Just now I opened the references window and clicked Add, then browsed to the C:\Program Files (x86)\Microsoft Visual Basic 2005 Power Packs\3.0 directory that I had copied from my old drive, selected the Microsoft.VisualBasic.PowerPacks.dll there (file version 3.0.30214.0) and clicked OK.
Now both powerpack dlls are listed.
Then I opened the main form -bingo- it loaded. The errors seemed to vanish.
I opened the toolbox and had to select the main form then another tab a few times before it loaded.
I right-clicked in the toolbox and added a new tab, named it Visual Basic Powerpacks 3.0 then right-clicked and selected 'Choose Items".
I found all the shapes (rectangle, oval, line) and selected them and clicked oK. They now are in the toolbox.
So I don't know why it didn't just work when I copied the project files over to my new install, but maybe when I opened the project it couldn't find the 3.0 and so changed the reference to the Vs version?
Maybe someone knows what actually happened. At least if anyone is caught by this problem this is quite likely what they need to do.I was lucky that I still have access to that old Powerpacks 3.0 directory, because it seems Microsoft has taken the old download page away.

Related

Delphi 10.3 (Rio) Community Edition, opening project doesn't open any source files

I have installed Delphi 10.3 (Rio) Community Edition on two workstations. Both installations have the same issue.
When I open a Delphi project, none of the source files or form units are opened along with it. I have to either open them manually or via Project > View source and Open file at cursor
I have Delphi 10.4 (Sydney) Professional installed on my company laptop. Here it works as expected; upon opening the project, at least the main form unit is opened along with it.
Is this a setting that I'm overlooking, or is it just the way the community edition IDE works now?
You can get the IDE to remember which files you have open by checking Project Desktop in Tools->Options->Environment Options->Autosave options.
In Delphi 10.4 Sydney, the setting has been relocated to Tools->Options->IDE->Saving and Desktop->Autosave, where the checkbox is captioned Save project desktop when closing.

cannot be opened. The project type is not supported by this installation

.cs project file
The project was created using Visual Studio 2010 and I am trying to open it in Visual Studio 2010 itself but still I am facing this problem.
I have opened this project in VS 2012 and worked for few days but it has created in Visual studio 2010. Is there anything which preserve the project details on local machine?
This is the specific project section in my solution file:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project Name", "Project Name\project name.csproj", "{48C1190E-7700-461B-ADCD-B5E0F1ECAD21}"
ProjectSection(ProjectDependencies) = postProject
{1F5440B3-9FD8-4FE2-B621-8697489ABDC4} = {1F5440B3-9FD8-4FE2-B621-8697489ABDC4}
EndProjectSection
EndProject
In Visual Studio it is possible to add Project Types, e.g. for creating an MSI, by installing an Add-On to the development machine. It appears that in the past this was done, and then that new Project Type was used to add a Project to the Solution. But now you are opening the Solution on a machine that does not have that new Project Type.
Look for the GUID of the missing Project Type, it should be part of the error you are getting. Then google "project type {the-guid}" to see which Add-On you need to install on your development machine.
It is also possible that a new Project Type was used in the Solution that simply can not work with VS 2010. In that case your options are either to keep using VS2012, or to start over with a new Solution in VS2010 and migrate the projects into it that are compatible (which may be a bit tricky or hard to do if VS2012 saved them).
Would it be too difficult to just recreate the project and include all the necessary files and references? Once the project was saved from VS 2012, the format may have broken compatibility with 2010. Sometimes this is fixable just by updating the version number in the project file, but I don't see it in your image.

Can't run solution from TFS as all references are missing

I have a project which works fine. This morning, I created a new TFS project and published all the code from Visual Studio 2015.
On another computer, also via VS2015, I've logged into Visual Studio Team Services to grab the same project and downloaded all the code
When I try to build, there are over 100 errors, but the cause appears to be the same. It can't find resources, and the error messages all appear to be
The type of namespace name 'some name' does not exist in '....' (are you missing an assembly reference?)
So, I expand the References and I'm missing pretty much all of them. In fact, other than the references within my own project, the rest are not there
Looking at the properties shows no path. Back on the original PC I see the path to any of the .dlls is similar too
C:\Users\Me\Documents\Visual Studio 2015\Projects\MyProj\ToT\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll
Is the issue that since this path doesn't match on the 'faulty' machine it can't show... Therefore what is the solution to this
I checked and noted that the files do appear to exist when I look at them in File Explorer.
All system references missing Visual Studio 2013 NuGet Async did not help
Please note, this happens with all projects in my solution, but not consitently. For example, EntityFramework is missing from all, but System is missing from my UI layer, but not from my BLL layer
Is there a way to fix this?
You need to run the update-package -reinstall command to reinstall all referenced packages.
I had the same problem, there are lots of answers by now but I will still post it here:
1.Close Visual Studio
2.Manually delete the local “packages” folder
3.Reopen the solution, and rebuild. (Nuget should restore the packages)
Source:
http://robertgreiner.com/2013/09/team-foundation-service-build-error-nuget/
Go to TOOLS -> nuget package manager -> package manager console -> and run to the console : UPDATE-PACKAGE -REINSTALL .
Clean your solution, rebuild and you are ready!
Sounds trivial but your missing references to system.xxxx could imply a problem with the .NET Framework, what version are you using and is it installed properly on your 'faulty' machine. Might be worth a re-install/repair? I'd check what versions are actually referenced too.
As for NuGet, make sure that Enable package restore is set as:
Also, I had a problem similar to this once and I had to upgrade the NuGet package manager to version 3 in Tools -> Extensions and Updates (You need to uninstall and then re-install as update won't work)
Finally if that doesn't work, check in File Explorer in the packages path and delete all packages. They should not be included in source control as this is what NuGet will download. If they are there or partially there, sometimes it will not download them.
Verify the .NET version:
Open the project properties pane and check the Target Framework:
Ensure this version of .NET is installed. OR change the target framework to a suitable version
First, go to VS--Tools--Extensions and Updates to check whether there are updates, install all updates. Then select one reference with a warning icon, check the Specific Version property, if the value is True, change it to False.
If the issue persists, check the Reference Assemblies of .Net framwork on your two computers, to see whether they are under the same location (the .Net framework is supposed to be under *C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework*).
=========================================================================
11/5: To avoid references missing, you can either check in all references to source control and reference from the source controlled ones, or use Nuget Package Manager to install packages. The previous is not recommended now, try Nuget Package Manager.
Before hitting your head against the wall with the million of Nuget 'fixes' you need to make sure you are getting ALL the DLLs that are in your Bin folder under source control. For some reason a simple "Get Latest Version" is not enough. Visual Studio will keep telling you all files are up to date but apparently this doesn't mean all the files under source control are downloaded (or it does and what happened to me is just a sassy bug). Anyways, to make sure you are truly "getting all" you need to force an update by using the "Get Specific Version" command with the "Overwrite all" option checked as VS suggests. To do this:
Go to your Bin folder in Source Control Explorer (Or w.e folder you truly want to get all)
Right Click > Advanced > Get Specific Version
Check the "Overwrite all files even if the local version matches the specified version" checkbox
Click Get
By doing this I ensured all the referenced DLLs were downloaded from TFS and for me that solved the problem. I'm using Visual Studio Enterprise 2015.

Opening a solution from TFS

I'm working on a project in Visual studios 2013. I was trying to figure out how to do something and was recommended to look at another project on TFS that does something similar. When I got latest version of this other project, I found out it was made in VS2010. It migrated it to VS2013, and locked the file to me. I undid the changes because I don't want to modify this other program. I was unable to find a way to open that file without it trying to lock the file to me with migrating to VS2013.
As an attempted solution, I copied the file elsewhere on my computer and tried opening it without connecting to TFS. I assumed this would allow it to migrate to 2013 without updating the database. It still had issues and gave me this error: Solution file '%s' cannot be migrated because the solution cannot be checked out from source code control. To migrate the solution, make sure the solution file can be checked out and re-open it.
How can I open this solution without updating the TFS solution and locking the file to myself?
I just ran into this same problem. I checked the permissions on the solution files I was trying to open and saw that it was set to 'read-only'. I deselected read-only and the solution opened.
If everyone else is using VS2010 with Service Pack 1, then upgrading the solution isn't a problem. People will still be able to open it in VS2010 SP1, even if you check it in. See the Visual Studio 2013 Compatibility notes on MSDN for specific things to watch for.
Alternatively, after checking the files out but before opening the .sln file, create a copy of it in the same folder calling it MyProject2013.sln (for example). Add this new solution to source control using Source Control Explorer and then open it, letting Visual Studio upgrade the .sln file as it would normally. The 2010 .sln file will be left untouched and you should be OK to do what you like with the 2013 solution.

New Asp.Net Project Template Dialog is empty

I have (just reinstalled) Visual Studio 2013 Professional (on Win 8.1) to try and fix this: If I try to create a new Web Project, for either .Net 4.5 or 4.5.1, then I see the screen below.
If I try to open an existing MVC 5 website (one I've just created through that wizard on another machine) - then it works just fine.
Equally, if I set the target framework to 4 then I get the previous MVC 4 template appear, and that works.
If I look in the Microsoft Visual Studio 12.0\Common7\IDE\ProjectTemplates\Web\CSharp\1033\ folder then I see WebApplication45 which appears to contain the content that this project template uses - so why is it broken!?
The machine did use to have VS2012 on it, and I notice that in the list of installed products for 2013 it has 'ASP.Net Web Frameworks and Tools 2012.2' - which I believe is a VS 2012 thing. So I'm wondering if that's interfering with it. But there's nothing on my Add/Remove programmes for this, so I don't know how to uninstall it!
Any help greatly appreciated before I throw my screen through the window :)
Please try the following:
Close VS, open Explorer and go to C:\Program Files (x86)\Microsoft Visual
Studio 12.0\Common7\IDE\PrivateAssemblies
Delete the following assemblies if they exist:
Microsoft.VisualStudio.Web.WindowsAzure.Contracts.dll
Microsoft.VisualStudio.Web.WindowsAzure.Explorer.dll
Microsoft.VisualStudio.Web.Internal.Contracts.dll
Restart VS
In Tools > Extensions and Updates:
Update to lates VS2013 update (it is Update 3 now)
Install if not installed Microsoft ASP.NET and Web Tools
Install if not installed ASP.NET Web Forms MVC 4
Install if not installed MS VS ASP.NET MVC 5 Scaffolding
I solved it by removing all programs connected with .Net development and SQL (just being really cutthroat) - not just Visual Studio; going down my installed programs list from top to bottom:
Visual Studio 2013, obviously
All .Net Framework SDKs and Language Targeting Packs
All Azure tools SDKs (some start with 'Azure', one starts 'Windows Azure')
All SQL Server stuff - possibly too much, but I didn't need them outside of VS
IIS Express
I then rebooted and deleted all remaining Microsoft Visual Studio folders (I had v10, 11 and 12) from Program Files (x86) and all remaining SQL Server folders. SQL is also in the x64 program files, and that's used legitimately by the OS, so might want to skip that one.
I then rebooted again and reinstalled 2013 with Update 3 - and now the new project dialog works as expected.
It's most likely the removal of just one of those things that fixed it (my money is on clearing down the VS folders).
I fixed this by deleting these files from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies:
Microsoft.VisualStudio.Web.WindowsAzure.Contracts.dll
Microsoft.VisualStudio.Web.WindowsAzure.Explorer.dll
Microsoft.VisualStudio.Web.Internal.Contracts.dll
(based on http://blogs.msdn.com/b/bharry/archive/2014/08/04/vs-tfs-2013-3-update-3-released.aspx#10550199).

Resources