Archive for category Visual Studio
When did I build that project in Visual Studio?
Posted by Jake in Visual Studio on November 21, 2012
Have you ever started a build in Visual Studio and went off to do some other darn important things? Then when you come back twenty-seven minutes later, you look at the Output Window and say… “Did I build that yet or is that from an hour ago?” Well, I do. It’s not easy getting older. But, there’s a simple command you can put in the “VS Project Properties – Build Events – Post-build event command line” that will output the time the build finished. “Time /T” Pretty ingenious, no? Yeah, not really, but it works. I even have some screen shots for those who can’t read! Cool slide-show mode too.
Happy Turkey Day!
Error occurred in deployment step ‘Recycle IIS Application Pool’: The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.
Posted by Jake in SharePoint, Visual Studio on November 4, 2010
If you get this error when deploying a SharePoint solution in Visual Studio on a SharePoint server, check that you have db_owner SQL Server permissions on the SharePoint content databases.
Update: I received a similar error to the one listed above:
Error occurred in deployment step ‘Recycle IIS Application Pool’:<nativehr>0x80070005</nativehr><nativestack></nativestack> Access denied.
For this error, make sure that you are a Site Collection Administrator
Visual Studio 2010 properties window – commands & descriptions missing
Posted by Jake in Visual Studio on June 23, 2010
In the Visual Studio 2010 Beta, the Properties Window contained a sub-window that enabled the generation of handlers for workflow properties (not just workflow properties, but any item that had an a event property). I found this to be a quick and consistent way to create those event handling stubs. Upon upgrading to the release version of VS2010, I noticed that the command window was missing:
To display the commands, bring up the context menu for the properties window (right click) and check the commands option. The same goes for descriptions.
Installing Visual Studio 2010 on computer with VMWare running
Posted by Jake in Visual Studio, VMWare on June 7, 2010
This was a curious matter. I installed Visual Studio 2010 on a machine that had VMWare Server running. The VS install went through a restart and installed just fine. When I tried to launch VMWare to access a VM through VMWare Web Access, the VMWare configuration site was not running. Turned out that the VMWare Host Agent (VMwareHostd) was not started (even though it was still set to startup Automatically)! I started that service and was able to access the VMWare config web site. This happened on two different dev machines, so some part of the VS install was being stubborn.
Adding a CSS file to a SharePoint 2010 Application page in VS 2010
Posted by Jake in SharePoint, Visual Studio on June 1, 2010
A quick run down on the steps to add a Cascading StyleSheet to a SharePoint Application page in Visual Studio 2010
From the Visual Studio 2010 Solution Explorer, select the project, right click and select the Add option and then the “SharePoint Mapped Folder…”
The “Add SharePoint Mapped Folder” dialog is presented which displays all the folders under {SharePointRoot}:
Select the location that you would like to place your Stylesheet, which in most cases will be: {ProgramFiles}\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES
Once the STYLES folder is added, it may be easier to add a custom folder that will contain your CSS file(s)
Now that the folder structure is complete, you can add a stylesheet to that folder:
Inside your application page, reference the stylesheet within the PlaceHolderAdditionalPageHead ContentPlaceHolder similar to: <link type="text/css" rel="stylesheet" href="/_layouts/1033/styles/Sohema/sohema.css" />
The details of adding the files to the package is nicely handled by Visual Studio and included in the Package xml files:
Deploy your solution and notice the addition of your CSS file under the location that was specified:
Add content to your CSS file and you’re done!
Suppress Visual Studio debug attach warning
Posted by Jake in Visual Studio on May 25, 2010
This is such a pain in the neck, I had to re-blog this….
When you are debugging in VS 2010 and attaching to the w3wp.exe process, you’ll get this lovely warning (with no option to suppress!)
To remove that warning, run the powershell command:
Set-ItemProperty HKCU:\Software\Microsoft\VisualStudio\10.0\Debugger -Name “DisableAttachSecurityWarning” -value “1”
UPDATE! Thanks to Donal Conlon for commenting that Visual Studio should not be running when you execute this command.
Thanks d1$c0!