Posts

Showing posts with the label Visual Studio

Donate

Failed To Push To The Remote Repository See The Output Window For More Details

Image
Hello, I recently encountered an error when pushing some of my ASP.NET Core MVC project to github that says "Failed To Push To The Remote Repository See The Output Window For More Details" as shown on the image below. After checking the Output Window by selecting GitHub from the dropdown list, a more explicit error message appears which is " git: 'credential-manager-core' is not a git command. See 'git --help'. ". I immediately checked my Git version that appears to be Git-2.37.1-64-bit which is slightly behind the recent update Git-2.45.0-64-bit . Replacing the old Git software with the current one solved the issue. Cheers!

Xamarin Forms Project - Project Not Selected To Build For This Solution Configuration

Image
Hello and Happy Easter! A while ago I was downloading some Xamarin Forms projects from Github for testing and research purposes. Upon running the projects, it won't show on the Android emulator and in the Visual Studio IDE, a notification shows that the project was skipped in deployment with a detailed statement like "Project Not Selected To Build For This Solution Configuration" . I found the solution which is to right click on the Solution of the project -> Select Configuration Manager. If you notice, the Deploy checkbox is unchecked. Changing the state to checked solved the issue. I can now run the projects using the Android emulator. Cheers!

Visual Studio Error - Unfortunately, a process used by Visual Studio has encountered an unrecoverable error

Image
Two days ago, my Visual 2017 Professional IDE was acting weirdly because of this error " Unfortunately, a process used by Visual Studio has encountered an unrecoverable error. We recommend saving your work, and then closing and restarting Visual Studio ". This error only shows up to a specific ASP.NET MVC project with multiple class libraries and NuGet packages. Other projects opened does not show this exception. As of this posting, my Visual 2017 IDE has been updated to the latest version which is 15.9.30 without any 3rd Party Plugins. Doing some research on the forums led me to different solutions offered like uninstall/re-install the Visual Studio IDE or delete the Newtonsoft.Json Version 9.0.0.0 located in C:\Windows\assembly\GAC_MSIL . The latter solution is not applicable since our Newtonsoft.Json version is 6.0.0. The solution that worked for me is the classic Windows band-aid fix that is to delete files located in temp folders on windows and ASP.NET. Here's wh

Visual Studio Nuget Package Restore Error - The type or namespace name 'Xamarin' could not be found

Image
Good evening, Recently, I encountered an error called "The type or namespace name 'Xamarin' could not be found (are you missing a using directive or an assembly reference?)" when running my simple Xamarin Forms application in Visual Studio 2019 which is the output of the training I attended with. It seems that the project is missing some references and when running the solution, the project was unable to download the missing assemblies. After investigating the problem, I found the culprit. Our custom Nuget packages were located in a server which has been turned off due to system upgrades and these files will be moved to a new location. So to fix the issue I had to perform the steps below: 1. Temporarily unchecked our custom built packages in Package Sources of Package Manager Settings since our server that contains those packages was turned off for system maintenance and the projects including the packages will be moved to a new location. 2. Run the command &q

Visual Studio And WPF Menu Items Are Left Aligned Instead Of Right Aligned

Image
Hello, We noticed lately that our WPF Projects menu items and Visual Studio menu items are left aligned rather than right aligned. However, not all desktop were affected by this issue. Further research led me here Windows 10 Drop-Down Menus Are Aligned To The Left in which you have to execute a shell command shell:::{80F3F1D5-FECA-45F3-BC32-752C152E456E} via Windows + R command. This will open the Tablet PC Settings with Right-Handed radio button checked. Changing it to Left-Handed then Apply will change the menu items alignment to the right. Visual Studio Menu Items Are Now Right Aligned

Microsoft Access - The 'Microsoft.ACE.OLEDB.12.0' Provider Is Not Registered On The Local Machine

Image
Hello, I was working on a project that reads an MS Access database using C# using OLEDB Provider. I already have downloaded and installed the Microsoft Access Database Engine 2010 Redistributable (AccessDatabaseEngine_X64.exe) from Microsoft since my OS is Windows 10 64bit. Upon running the project, I encountered the error as mentioned in the title of this post. I've tried several solutions and it didn't work for me. The only fix that worked is to change the Platform target of the project to "Any CPU" and unchecked the Prefer 32-bit checkbox . Cheers! :)

Create A NuGet Package Using Visual Studio 2017

Image
Hello all! You may have noticed that the trend in adding components or dll's to a project is through a technology called NuGet Package and with that I'll demonstrate on how to create a simple C# Library NuGet package using Visual Studio 2017. Below are the steps to follow. 1. First is to create a C# class library project called StringLib and add a class with a single method to convert the first letter of a string to uppercase. public class ToUpperCase { /// <summary> /// Change first letter to uppercase /// </summary> public string ToUpperFirstLetter ( string s) { if ( string .IsNullOrEmpty(s)) { return string .Empty; } char [] a = s.ToCharArray(); a[ 0 ] = char .ToUpper(a[ 0 ]); return new string (a); } } 2. Build the project to generate a .dll file. 3. Copy the .dll or any files to be included

Chrome Script Debugging In Visual Studio Is Enabled Hangs Up

Image
Good morning! While using the Visual Studio 2017 to debug ASP.NET MVC applications targeting the Chrome browser, one might encounter that both the IDE and browser hangs up. The workaround is to uncheck the Enable JavaScript debugging for ASP.NET (Chrome and IE) .

Could not load file or assembly Microsoft.VisualStudio.ConnectedServices Version=2.0.0.0

Image
Hello, This issue happens when closing applications created by Visual Studio 2015 either Console, Winforms or ASP.NET. The resolution for this problem is explained here in detail Visual Studio 2015 Enterprise with Update 1 - Could not load file or assembly Microsoft.VisualStudio.ConnectedServices, Version=2.0.0.0 . Be aware that the ConnectedServices page has several versions and you might install the current package which is incorrect. Since the assembly required is 2.0.0.0, the correct package is in this page Microsoft.VisualStudio.ConnectedServices 2.0.0 .

NuGet Package Manager Missing For Visual Studio 2015 Missing On Fresh Install

In the event that NuGet Package Manager Tool is not found on Visual Studio 2015 Update 1 after fresh install of the software, simply download the VSIX installer from Visual Studio MarketPlace and add it to the IDE. Here's the link of the NuGet Tool: NuGet Package Manager for Visual Studio 2015 . Cheers! :-)

Cannot convert type 'System.Configuration.ConfigurationSection' to 'System.Collections.Specialized.NameValueCollection'

Image
Good evening! I've tried casting the config object to NameValueCollection using .NET Framework 4.5.2 of Visual Studio 2015 which I read from a tutorial on how to read config files using type NameValueSectionHandler . However, as I use the code below to cast the ConfigurationSection object to NameValueCollection, C# Code Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); NameValueCollection scriptFiles = (NameValueCollection)config.GetSection( "scriptfiles" ); I get an error which is the title of this post. It seems that the code was applicable to older versions of .NET Framework and not the recent ones. After doing some research, I found out that the workaround is to use ConfigurationManager.GetSection() in which the parameter passed is the SectionName of the config object instead of directly casting the ConfigurationSection object returned by the config.GetSection() method. C# Code Configuration config = Configurati

ASP.NET 4.5 Has Not Been Registered on the Web Server (Visual Studio 2012)

This issue "ASP.NET 4.5 Has Not Been Registered on the Web Server" occurred when I opened an asp.net application built with Visual Studio 2012 recently when I installed Visual Studio 2015 in my laptop with a Windows 8 operating system. Given that this happens I assume that some settings may have been updated or corrupted by the recent version of VS. The solutions I have tried included registering asp.net through Visual Studio command tools with no effect. After searching through the web, I found a solution which is to download the hotfix for VS 2012 here Unexpected dialog box appears when you open projects in Visual Studio 2012 after you install the .NET Framework 4.5.3 . After downloading and installing the hotfix, the issue was resolved.

Adding ASP.NET 5 Templates To VS 2015

Image
Good day! One might notice that the ASP.NET 5 templates are not visible when creating a new Web Application Project in Visual Studio 2015 given that this is a fresh installation of the software. So to add the ASP.NET 5 Templates, download the ASP.NET 5 run-time tools Microsoft ASP.NET and Web Tools 2015 (RC) – Visual Studio 2015 and proceed with the setup. Restart your machine afterwards. That's it.. :-)

This version of Visual Studio requires the April 2014 update to Windows 8.1 (VS 2015)

Hello, Now that I've got the time to install Visual Studio 2015 Enterprise on my laptop with Windows 8.1 Operating System I decided to give it a go. That's when the moment I opened the installer file, an issue pops out of the screen with the description " This version of Visual Studio requires the April 2014 update to Windows 8.1 and Windows Server 2012 R2 known as KB2919355 ". The solution to this issue can easily be found at stackoverflow. But missing the links of the packages needed to resolve the problem. A step by step example is presented below. 1. Download update package 2919442 and install update to your pc. This is the pre-requisite update of package 2919355     x86     x64 2. Download update package 2919355 and install update to your pc.     x86     x64 3. After those updates have been installed, restart the computer for the updates to take effect. Cheers! :-)

Visual Studio Showing Only "Attach" And No Debug Options In ASP.NET Project

Hello, Last night my computer shuts down unexpectedly due to power outage and when I opened an ASP.NET project this morning, it only shows "Attach" in the debug options. Running to different browsers such as Google Chrome, Firefox and Internet Explorer were missing. After a few search, I encountered a solution which is to set again the ASP.NET Project as StartUp Project by right clicking the project and selecting the option Set as StartUp Project . That's it.. :-)

The term 'Enable-Migrations' is not recognized as the name of a cmdlet

Hello, When I started creating an ASP.NET MVC application in VB.NET and decided to add Membership tables using the Enable-Migrations command in Package Manager Console, I encountered this error 'The term 'Enable-Migrations' is not recognized as the name of a cmdlet'. In C#, I haven't encountered this issue. So, what I did was to Rebuild the project, and then restart Visual Studio IDE. Eureka,the problem was fixed. :-) Cheers! :)

Method Line Separator in Visual Studio 2013

Image
Hello, There was a question in the forums on how to add a line separator in every method written in Visual Studio 2013 C# IDE. Well, there's a plugin for Visual Studio called Productivity Power Tools 2013 which you can download and install. After installing it, then proceed to making changes to your IDE. To show line separator in your Visual Studio 2013 IDE, perform the steps below: Click on Tools Menu -> Options -> Productivity Power Tools -> Other Extensions -> Show a separator between methods in the Editor Screenshot: Note: Make sure to restart Visual Studio to affect those changes. Reference: Visual Studio 2013 Goodies

jQuery Intellisense Not Working In External Javascript File Using Visual Studio 2013

Image
Hello, In order for the jQuery intellisense to work in Visual Studio 2013, perform the following steps. 1. Proceed by clicking Tools -> Options -> Text Editor -> JavaScript -> Intellisense -> References. 2. Change Reference Group to Implicit (Web)   By default a reference has been added to _references.js. If not, add a new reference file under Scripts folder. 3. Open _references.js file using your Visual Studio IDE or any text editor software. 4. Add reference path to jquery files (.js, .min.js, and .intellisense.js). 5. Close Visual Studio and Open it again. (I was struggling for hours as to why performing steps 1 through 4 didn't work. This step fixed the issue) Reference: jQuery intellisense not working in VS 2012 Regards, :)

The type or namespace name 'LineShape' does not exist in the namespace 'Microsoft.VisualBasic.PowerPacks' (are you missing an assembly reference?)

Image
Good day! After migrating and then rebuilding the solution of a Windows Forms application from Windows XP machine to Windows 8, I encountered an error as stated on the title of this post. I suspect this has something to do with the old version from the XP machine not recognized on the new machine. The steps to fix this issue are provided below: 1. Download Microsoft Visual Basic Power Packs 3.0 here: Microsoft Visual Basic Power Packs 3.0 2. Remove the previous Microsoft Visual Basic Power Packs under References in your project 3. Add the MS Power Pack version 3.0 as reference to your project from the default installation folder located here: C:\Program Files (x86)\Microsoft Visual Basic 2005 Power Packs\3.0 4. Rebuild your project. Greg Esguerra:)

There is a duplicate scriptResourceHandler section defined (HTTP Error 500.19)

Image
Good evening! The solution I found so far for this issue "There is a duplicate scriptResourceHandler section defined (HTTP Error 500.19)" was to change the Application Pool of the website from DefaultAppPool to .NET v2.0. I also have tried with no luck other solutions based from stackoverflow. Issue Fix Details Operating System: Windows 8 IIS: Version 8 Default Site Framework: .NET 3.5 SP1 Reference: There is a duplicate scriptResourceHandler section defined

Donate