Restore VSTO Controls after Word Crash - visual-studio-2010

While I was adding controls to a VSTO MS Word template in Visual Studio, the copy of Word that was serving as the form editor crashed taking Visual Studio down with it. When I restarted Visual Studio, I discovered that while the controls I'd spent the last several hours inserting and naming were preserved in the ThisDocument.Designer.vb file the associated .dotx file apparently was not autosaved because none of the new controls were on it.
Is there any way to restore the controls to the .dotx file from the designer; or am I stuck with having to redo all of the lost work?
I'm using VSTO for Office 2007 if it matters.

If you have built your application at least once then you can copy the .dotx file created in your bin folder.

Related

Microsoft Office VSTO Add-in changes not reflected after build

We have developed VSTO add-in for Word, Excel and PowerPoint. Recently, we changed the friendly name (FriendlyName) and description (OfficeApplicationDescription) of the add-ins in csproj project files.
Our aim is to change the name and description that will be displayed in the Manage add-ins screen in Office apps. After changing the project file, if I run the code from Visual Studio, I can see my changes reflected in the Manage add-ins screen. However, when we install the add-in in non-development machines, we noticed that still old name and description is displayed.
I confirmed that the manifest file in the non-development machine has my updated name and description, but Office still shows the old values.
I tried clearing cache in the below folders:
%LOCALAPPDATA%\Microsoft\Office\16.0\Wef\
%userprofile%\local Settings\Application Data\assembly
Still the issue occurs.

Creating Visual Studio AddIn run error

This has been happening to me over and over for every single AddIn project I make.
I create the AddIn projet from the template wizard and work on it, coding and debugging for a few hours and then all of a sudden I get:
Error 1 Unable to copy file "obj\Debug\Project1.dll" to "bin\Project1.dll". The process cannot access the file 'bin\Project1.dll' because it is being used by another process.
Does anyone know what is this about?
Happening in VS2008 and VS2010.
Thank you
*Edit: I have found a workaround by closing all instances of VS, deleting the Project1.dll file, selecting NO when VS asks me if I want to delete a reference to the AddIn when opening VS instance again.
I actually came across this today and it took me forever to figure it out. For me I was creating an Addin that automatically loaded when Visual Studio starts. The way I fixed it was by going to:
Tools -> Add-in Manager
Then uncheck the first checkbox near your addin. Keep the "Startup" checkbox checked to continue having debugging of your Addin.
Hope this helps.

Visual Studio 2008 keeps adding 3 folders to solution folder prefixed with "Visual Studio"

For some reason, Visual Studio 2008 keeps adding three folders to my solution folder. I always have to delete them so I don't accidentally add them to SVN. How do I prevent these from being created? This happens about once every couple weeks, but I haven't figured out when it happens. We're probably going to convert all of our projects to Visual Studio 2010 later this year, but in the mean time, I'd like to figure this out.
If anyone knows how to write a Windows folder (or file) creation listener, I'll be able to track this down faster. I'm imagining a Windows Service that displays a popup when a folder gets created somewhere in the Windows file system, and it's constantly listening. I've had other situations where folders and files get created in Windows (in different project types in Visual Studio 2008 or Windows for that matter), so that might be a cool resource to have in the arsenal.
That directory is probably set as your VS Projects location. If you open Tools>Options and then click Projects and Solutions, it should show you the folder paths. VS will recreate these paths if you delete them.
After installing VS, they are usually set to something like:
C:\Users\username\Documents\Visual Studio 2010

Source Control icons have disappeared in Visual Studio 2010

Today I installed Visual Studio 2010 Ultimate - RTM.
One item that I noticed that is different is that files listed in the Solution Explorer window not longer display the source control icons beside each file (the lock, unlocked, plus sign for new files, etc.).
Is there a setting that I am overlooking to display these icons?
I have setup Visual Studio 2010 to use my source control client correctly (SourceGear Vault), and it does appear to be working OK -- I'm just used to seeing the little icons by each file.
Anyone out there experiencing this problem? Is there something I can do to get the icons back?
Update: SourceGear technical support confirms that this is a known bug, workitem 15021. It doesn't have anything to do with the conversion; it's just that in VS 2010 web projects, only the solution file has the lock icon or "glyph." This will be fixed a maintenance release, but I'm not sure how soon it will be.
I'm guessing that you need to reinstall Vault so it can apply settings to the new IDE. I have to do the same for Ankh (subversion) to show icons in VS2010.

Why would my Visual Studio 2008 close everytime I open a .xaml file?

Visual Studio 2008 has been very stable for months on my computer.
This morning when I double-click on any .xaml file to open it, or even click on the tab of an already opened .xaml file, Visual Studio says "initializing toolbar" in the status bar and then 20 seconds later fully closes the whole application without any error message.
Other files (e.g. .cs class files) I can open fine.
Has anyone experience this or know what I could check/change to be able to use Visual Studio to edit .xaml files again?
MORE INFO: I can also create a new project and create and edit .xaml files fine.
MORE INFO: I can edit .xaml files in other modules (projects) fine.
MORE INFO: Everytime it crashes, this event is registered:
.NET Runtime version 2.0.50727.3053 - Fatal Error in executable module (72555E00) (80131506).
(odd since I have .NET framework 3.5 installed)
MORE INFO: It is only in one module (project) that .xaml files cause Visual Studio to crash. Even creating a new UserControl in that module crashes Visual Studio.
I get this occasionally (with .xaml and .resx files) and find that if I delete the solutions .suo file things work fine again.
[The suo file just contains per user settings like recently opened files etc so it's nothing important and will just be recreated when you next open the solution.]
I've been getting the same issue whenever I try to access project settings for a C# project.
Found additional information about this:
Here: http://blog.fryhard.com/archive/2008/11/26/visual-studio-2008-closes-at-build-outlook-2007-add-in.aspx
And here: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571/
Apparently it's a bug in the core CLR engine that causes the entire CLR to crash if certain types of assemblies are loaded in a certain order.
Most of the time it appears to be directly related to the Visual Studio add-in called PowerCommands - uninstalling PowerCommands will make the problem go away.
And (we hope) it's supposed to be fixed for .Net 4.
This sounds very similar to the issue I had when I first installed VS 2008. Unfortunately, after hours of research, I ended up reinstalling the IDE (with my fingers crossed). No problems since then, but it's obviously not the most enjoyable way to solve the problem.
What is likely happening here is that one of the controls referenced directly on indirectly in your designer is stack overflowing during the designer process. Because the designer is hosted in process a stack overflow by one of the components will take down the designer and VS.
Try attaching a debugger to VS, break on first chance StackOverflow Exceptions and open the designer.

Resources