Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Tuesday, August 27, 2024

Buggish: Visual Studio 2022 Stuck in Rebase

I got stuck in Visual Studio 2022 under Git Changes where I only get the options to Skip or Abort.

Short Answer

Got to your .git folder and delete rebase-merge folder then restart Visual Studio. Restart is required as the screen does not update.


RCA

The complicated part is that I was troubleshooting a separate issue where we get ghost files appearing for apparently no reason but related to white-spaces. I have a potential solution but it only impacts the main branch. Everyone's current branches will continue to have this ghost file issue.

One of the biggest problem with the ghost file issue is that you cannot remove it from the staged or unstaged list. When executing the rebase, it will stash the change. The ghost changes will be stashed but will also not go away so the rebase will fail. VS buttons to continue or abort will also fail. In CLI, it is functioning as normal so this is primarily a VS-ish bug. The bug is probably also on git side where the folder is not removed when either the rebase fails or when aborted.

Thursday, April 29, 2021

Buggish: Visual Studio 2019 on Windows 10 (new install), opening aspx pages comes up blank

 I have a recent install of Visual Studio 2019 on a relatively new Windows 10 install. This is a work laptop and pre-setup with some tools.

The odd thing when I first launched the app was that whenever I open an ASPX page, the content window is blank. I have to switch to another window and return, then the content will show up. I haven't had time to investigate what the issue is as I am already pressed on time to modify my tool for the new environment.

This is quite annoying.

Monday, June 8, 2020

Buggish: Visual Studio, "Element [elementName] is not a known element" warning

Visual Studio 2019

I get the errors below randomly. Suddenly while programming the ASP.NET page, my elements will suddenly have the green squiggly warning that my basic ASP elements are not known elements. I have yet to figure out the cause or reason for this to happen, but it does happen somewhat regularly perhaps once a week (of 10-20 hours of programming).

This is purely a syntactical bug, because I can still compile and run my program. It does not interfere with executing the project, but is super distracting. 

My Fix (Updated 9/2/2021)

Issue has increased a bit in the last month but still on the rare side. Fix is still to just close the ASPX page then re-opening. 

My Fix (Updated 4/29/2021)

For the last few months, I found that closing the ASPX page, then re-opening also resolves this issue. This is way faster than my workaround from June.

In the last couple months, I have to say that I haven't noticed this issue. Not sure if maybe I do it so reflexively that I do not notice or that it hasn't happened. I have thought about this until I was skimming over some older posts.

My Fix

1. Clean solution
2. Clean project
3. Restart Visual Studio 2019

I don't know why this fixes the problem. This is my current de facto fix and has worked for the last month. Before that, I some times skipped #1 or #2. Sometimes it worked, sometimes it didn't. Eventually, it just wasn't worth the time to skip one or the other.



  • Element [elementName] is not a known element
  • Element 'Button' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.
  • Element 'GridView' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.
  • Element 'TextBox' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.

Reference

Personal experience

Friday, June 5, 2020

My Return to Visual Studio........... sigh


Microsoft Visual Studio

I know in my previous posts that I had left Visual Studio. Sadly I have returned back. In the previous post, I had left primarily through pricing. I was charged a new customer price when I have been paying for over 10 years. My credit card was canceled due to one fraudulent charge, and I did not update my new card with MS. Also shows you how often I use VS, so I just hated that I was practically donating money to MS and they won't even recognize that been blindly paying them for years. Now the company pays for it, so I grudgingly (morally) returned.

Nothing against the actual application, Visual Studio. It is by far superior IDE to the ones I have used in the meantime, including Visual Studio Code. I can only speak for developing in C#, but I have to say that my programming efficiency is noticeably better with Visual Studio. 

Is it worth the cost for a hobbyist? Not really. The main functions are there in free versions, the pain points are tolerable. Is it worth commercially? Yes, the amount of money you save or produce for the company is definitely worth the price. Is the whole Microsoft shop worth it? That is arguable as other enterprise solutions provide a much better price point. If the company is not a technology company, then it is probably worth it. It is a bit bulky, but you don't need the expertise to hire the right person nor pay the additional cost of "real" developers. Not that option is cheap, but my assumption is that non-tech companies will not have good IT and will not have the expertise to really effectively run IT for the long term. They may be able to find one person, but that person will eventually leave or retire, then it will just be downhill. If they are a rare breed with excellent IT, then I recommend that they should consider transforming into a tech company.

Wednesday, October 9, 2019

I stopped using Microsoft Visual Studio and Azure (2019)

I am mostly a hobbyist developer. I had moved to more process management in software engineering. So the cost of paying for the professional version ($1200 / $800) of Visual Studio is quite steep even though I still paid for several years. I am aware there is an Express version which I had used initially but the professional provided a lot of neat features also provided Azure credit so I figured it compensated some of the cost.

I was content with paying but then my real work got busy for several months, also many things came up in my personal life, so I had neglected programming for a bit. When I returned, I realized Visual Studio no longer let me log in. I eventually found that my subscription had expired. I then noticed that I had received a bunch of emails that said I was overdue. This was due to a fraudulent charge on my credit card which was canceled, and that card was the one on record to renew.

This was extremely confusing, because I thought they had moved to subscription basis which I had been paying. When I paid all the overdue costs, I was still unable to use VS 2019. But somehow VS was separate and that had expired several months past, so it will cost me another $1200 to repurchase to use. I am still a bit confused exactly what is what, like what was Visual Studio and what was monthly subscription.

My current understanding is that I was paying monthly for Azure which does not include VS. I had paid for VS the prior year. Sadly, I didn't notice that I had been paying some much to MS for so long. So I still have Azure to host my site temporarily, but absolutely no access to VS. But if I paid for VS, then I should basically own my copy of VS. After talking to support, this was confirmed to be the case. I was unable to find a key in my MSDN subscription. I just grew tired and frustrated, then just refused to use VS again... not even the Express version.

On top of that, since I had purchased VS 2019, I should have had $50 monthly credit to Azure so why was I paying the Azure monthly costs (which was under $50 / month)?! Ugh.... this is so painful.

In Summary

I had once forgot to renew in the past and paid the full cost, so this is the second time. I was barely ok with the cost. Then they moved me to subscription basis which I had complained about because I just wanted to pay a flat amount. Then I found out that I still had to pay the VS subscription and I guess I was paying the Azure subscription. I had been using VS for over 10 years, maybe around 15 years.... and absolutely no sympathy for my situation. I have been a promoter of MS VS, .NET, and MS SQL, but no longer. I don't hate them, but definitely no love anymore. 

And so, I have moved to Google Cloud, Linux, Python, Apache, Django, and Postgres. After one week, the pricing scheme is very reasonable for hobbyists and people who wants to experiment before going full production. First impressions for this new tech stack will come in the future.

Will I go back? Maybe if there were some changes, but unlikely. I'll continue to use MS Windows, although a good chance I may move

Tuesday, May 23, 2017

Microsoft Visual Studio Friendly Name and Version Number - VS 6-15 / 1998-2017

Because I cannot remember these when I have to uninstall old apps for compliance:

VersionFriendly Name
6.0Visual Studio 6.0 (1998)
7.0Visual Studio .NET (2002)
7.1Visual Studio .NET 2003
8Visual Studio 2005
9Visual Studio 2008
10Visual Studio 2010
11Visual Studio 2012
12Visual Studio 2013
14Visual Studio 2015
15Visual Studio 2017


Tuesday, May 16, 2017

GridView with multiple columns with the same name

Microsoft ASP.NET 4.5
Visual Studio 2013

Scenario: Joining to tables that have the same column names but different uses without using alias (because sometimes you don't have access to the data or query).

Solution: The first column will be the original column name. Each additional column will have an integer counter starting at 1 appended to the end of the column name.

Exampe: If the column name is XXXXXX, then the first column will be XXXXXX, the second column will be XXXXXX1, then XXXXXX2, etc, etc.

Tuesday, March 14, 2017

Buggish: MySql.Data, unable to compile

Error    1    Could not load file or assembly 'MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
My Solution: Use the stable version in Visual Studio 2013 NuGet Package.

My steps I think I've taken:
1. Used NuGet Package to install latest version (7.0.6)
2. Attempted to compile, completed compile then realized that dll was not in the bin folder
3. I didn't realize that NuGet Package is saved in the packages folder, so I downloaded the source mysql-connector-net-6.9.9-src
4. Compiled
5. While trying to find my project folder, I stumbled onto the package folder so I used Add Reference to add the dll for 7.0.6.
6. Compiled, and I got a similar as the one above. (Unsure if the version is the same)
7. I removed the reference and tried to reinstall via NuGet (received similar error)
8. Repeated several times with the compiled code, modifying web.config, restart, reboot
9. Finally, I tried to download the latest stable version.

I am not familiar with NuGet, assemblies, and GAC. I am familiar with the terms but usually have worked by following directions so have not delved into them much before. I do not think my understanding has increased any bit after this either, but hopefully this help someone as I haven't seen this solution.

Thursday, March 9, 2017

Buggish: Visual Studio 2017 - The designer encountered an error while loading the table definition

The designer encountered an error while loading the table definition

Fix

Restarting computer


Failed Attempts


  • Tried reconnecting to Azure db
  • Tried restarting Visual Studio 2017
  • Tried using Visual Studio 2015


Other Odd Behaviors

This was the first time using Visual Studio 2017 (just installed).
An empty web project created.
Connected to Azure db previously created couple years ago and has been in use.
"View Designer" was working initially.
Right before breaking, I just created a new column and new unique index to 3 tables.
Initially unable to "View Designer" on those tables, but able to on the other tables.
After several attempts, unable to "View Designer" on all tables with VS2017 and 2015.
Disconnected and reconnected with no success.
Restarting Visual Studio with no success.
Rebooting my system (running Visual Studio) appears to have fixed the problem.

My guess is some connection was held up... but doesn't make a lot of sense restarting application would fix that problem.

Tuesday, February 28, 2017

Buggish: VS2013 Unable to debug and intellisense haywire

1. The breakpoint will not currently be hit. The source code is different from the original version.

I tried a bunch of different methods suggested in stackoverflow, but none seemed to have worked except to make additional changes to global.asax to force VS to recompile the code. I believe what may have caused the problem is that I was updated global.asax while I was still running the application in debug mode. Normally this is not a problem, but may be a timing of when I updated the code while the page was refreshing.


2. After the problem above, I had issues with intellisense in code-behind not recognizing objects in the aspx page. The red squiggly line comes up, but I am still able to compile and run the application with no compile errors. If I type out the object name, intellisense will not find the object.

Restarting VS fixed this problem. I do not know what caused this as I have restarted VS several times to fix the problem above. Either the problem came up after the fix above, or somehow keeping the files open when I closed VS before restarting somehow fixed the issue.


Reference

http://stackoverflow.com/questions/2468852/the-breakpoint-will-not-currently-be-hit-the-source-code-is-different-from-the

Saturday, January 14, 2017

Buggish: Visual Studio 2013 - Create table designer never loads

Problem type: hanging
Last status message: "the design surface is loading"; "inspecting database structure"
Steps: Open to database in SQL Server Object Explorer, right click Tables, select Add New Table...

Symptom: Application just hangs with "the design surface is loading" in the main panel, and "inspecting database structure" in the Data Tools Operations tool box.

I've left this open for several minutes, but nothing appears to happen.

Worked couple months ago. Haven't been used VS2013 since then.

Resolution: Changed the timeout period from 60 to 360 in registry: [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\SQLDB\Database]
"QueryTimeoutSeconds"=dword:00000168
"LockTimeoutSeconds"=dword:00000005
"LongRunningQueryTimeoutSeconds"=dword:00000000


It is possible that I didn't wait long enough. But after this change, I was able to get the proper windows. I didn't have to wait as long as prior to the change by significant amount, but still had to wait a couple minutes.


Reference:
https://social.msdn.microsoft.com/Forums/Lync/en-US/835ecacd-05ed-4635-9124-922966fc1022/new-sql-standard-database-does-not-load-design-surface-designer-does-not-work?forum=ssdsgetstarted&prof=required

Saturday, October 31, 2015

Buggish: Visual Studio 2015, MS SQL mass insert limitation

I just attempted to insert 43000+ records through Visual Studio 2015 SQL Server Object Explorer to my database on MS Azure cloud. For some reason, it errors out and states that there is an error on line 41357.

I ran that row independently and executed without error. I ran the query again and received the same error except the following line. Then I just ran all the inserts in batches. The final batch was the largest with 18,000+ records which took 3.5 minutes to execute.

So all my individual INSERT queries appears to work fine. Perhaps there is a limitation the number of records that can be sent in a single query.

Sunday, April 12, 2015

Buggish: Visual Studio 2013 with Azure - Waiting Internal Operation and Checkin

Waiting Internal Operation

Microsoft Visual Studio is waiting for an internal operation to complete. If you regularly encounter this delay during normal usage, please report this problem to Microsoft.
I don't know why I get this sometimes, but is quite frustrating to wait for several minutes for this to go away. I have not figured what causes this. My only guess at this point is it may be due to me rebuilding the solution too frequently in a short period of time although this is not always the case.



Check In

Check in fails if I have a sql query open that was not saved. I do not want it saved since I only use it to check certain queries and view data information. If I select not to save, the check in will cancel. The only way around this is to close the window or save. What makes it odd is that the count with the number of files does not change so the process is odd to be dependent on a file that is not even part of the project or check in count.