Visual studio 2019 hangs when open excel data source

  • I had Visual studio 2019 installed on windows 10.

    I have a SSIS package that has been working when I run it in visual studio. But recently when I open the ssis package, and open the excel data source to edit, it freeze there forever, then visual studio shows busy. I have to hard stop the process from end task manager.

    The package works before, I did not change anything.

    Any help is appreciated.

  • VS does seem to get its signals crossed from time to time.  When things like this happen I close VS entirely and try the following:

    1. delete the *.vs file in the solution root (it stores personal info and temp files and gets recreated on build)
    2. delete the /bin and /obj folders in every project within the solution (they get recreated on build).  "dotnet clean" is supposed to do this but it doesn't always do so
    3. If Git/GitHub is messed up I delete the .git and .github files in the solution root (these are recreated manually)
    4. If there's a package not found issue I run "dotnet nuget locals all --clear" followed by "dotnet restore" (this gets rid of locally downloaded Nuget packages and forces the solution to be completely restored from package manager packages

    If nothing works maybe create a new solution and copy/paste the code 🙂

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • There's a huge disclaimer and warning associated with each of the items above.  Of course backup everything first.  There are also reasons NOT to do those things:

    1. .vs is a folder (not a file, sorry) and deleting it would get rid of any breakpoints, personal settings set for the particular solution, etc.
    2. /bin and /obj contain the results of the build process.  Deleting them (under standard settings) gets rid of .dll and/or .exe etc.
    3. messing with local git and GitHub can be a pita to fix
    4. Clearing local nuget packages could mean deleting many, many files some of which you might not want to get rid of.

     

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Another thing it COULD be is do you have that excel file open in any other tool (Excel for example)? If it is on a shared drive, is the excel file open by anyone else?

    Excel will lock the file from being opened by any other tool including SSIS IF it is open already.

    If excel is running (even if it doesn't have that file open), may not hurt to close out of Excel just in case something was cached and locking the file.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Hello, thanks all.

    I was suspect VS 2019 or files it used got changed somehow, because it was working before, a few months ago.

    We have office 365 keep updated in our environment for windows PCs. I think that changed the excel drives somehow.

    I was able to download and install Access database engines and that fixed it.

     

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply