Archive

Posts Tagged ‘Visual Studio 2008’

Testing execution timeout in Visual Studio 2008 Team System

December 9th, 2009 Comments off

With Visual Studio Team System, the LocalTestRun.testrunconfig file controls execution parameters for running tests. The default timeout on individual tests is 30 minutes. Ouch!

Solution:

  • Double click on the ‘Solution Items\LocalTestRun.testrunconfig’ file.
  • Select ‘Test Timeouts’
  • Set the individual test time to your preference or set a total time abort if you prefer.

Fixed: API restriction w/ Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

November 11th, 2009 Comments off

I wrote about this a couple days ago. I have now confirmed my fix.

ENV:
Win7 Ent x64, VS 2008 SP1

Problem:
API restriction: The assembly ‘file:///c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll’ has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.

Solution:
Make sure you don’t have any extra references in your non-test projects. It happened to one guy on our team. The reference showed up during the check-in code review.

Remove “processorArchitecture=MSIL” from the UnitTestFramework reference in ALL of the test project files.

<reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />

becomes…

<reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

Restart VS. Reloading the project isn’t enough to get around the issue once it has popped up. I had to restart Visual Studio.

The issue went away after I double checked all of my project files and cleaned up the references in my test projects. (There are 12 projects in my current solution including 5 test projects.) I tested the fix by:

  1. Deleting the UnitTestFramework reference from one of my test projects.
  2. Re-add the reference via the UI by right-clicking on the references folder
  3. Add reference
  4. .Net tab
  5. Select Microsoft.VisualStudio.QualityTools.UnitTestFramework
  6. Click ok
  7. Save all. At this point the processorArchitecture reference appeared in my project file.
  8. Compile. Failure.
  9. Manually edit the project file with Notepad2.
  10. Save.
  11. Reload project when VS notices the change outside of the IDE.
  12. Compile. Failed.
  13. Restart Visual Studio.
  14. Load solution.
  15. Compile solution. No errors.

Works on my machine…

Problems with Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

November 9th, 2009 Comments off

I have been having problems with the internal testing library in Visual Studio. I get an API error. “The assembly has already been loaded and cannot be loaded into the appDomain.”

Really? <sarcastic response>

Everyone on the team has had intermittent issues for a couple months. One solution seemed to be to clean the solution, close VS, reload VS, open your solution, load the Test View (View -> Tool Bars -> Testing, find the “Test View” icon and click on it). Once the Test View loaded up the assemblies the issue might not appear. Obviously that isn’t an ideal solution.

I tried going through each project, removing any references to the lib, clean, rebuild solution (obviously a failure), then re-add the reference for each missing assembly. That worked once and only once.

My latest effort was to go through each project file and manually edit the reference. I removed the processorArchitecture=MSIL attribute from each entry. I loaded up my solution in VS and went through the usual Test View steps. So far, it works.

Maybe this problem is worse on x64 systems. Our team lead was running Win2008 x64 for months and always struggled with this issue. When i was on WinXP the issue was a minor annoyance that would pop up once a week or so. I switched to Win7 x64 a couple weeks ago and the issue has been a constant irritant ever since.

Hmm…

The components for the 64-bit debugger are not registered…

September 2nd, 2009 Comments off

So I was getting this error:

Error while trying to run project: Unable to start debugging.

The components for the 64-bit debugger are not registered. Please repair your Visual Studio 2008 Remote Debugger installation via ‘Add or Remove Programs’ in Control Panel.

A little surfing and I found a solution. Install the debugger! The 64-bit debugger is not installed by default. The installer is on the Visual Studio install disc. “<Drive Letter>\Remote Debugger\x64\rdbgsetup.exe”

An error occurred while signing: SignTool.exe not found.

August 25th, 2009 1 comment

This error popped up tonight when I tried to publish an app via ClickOnce deployment. This was the first time I had tried to publish since biulding up my latest machine. I had assumed the signing tool would have installed when I installed VS2008 but I was wrong. After seaching around for a solution, I realized that I needed to download the new SDK for Win7.

You can download ISOs or do a Web Setup (which is what I’m doing). The ISOs are
here and the WebSetup is here. I may have jumped too quickly on doing the Web Setup as I have two development machines, my quad core desktop and the netbook. Yes, I do development on a Asus EEE PC 1000HE netbook. I can even run multiple VMs via Virtual PC 2007 on the netbook. It’s a little slow but it works just fine. We’ll see how the installs go.

There’s also a new Win7 training kit available as well. It’s at here.

Enjoy

Win7, Moto Updates, & Guilty

July 10th, 2009 Comments off

Windows 7

I have to admit I am totally jazzed about the Windows 7 release. I’m rarely an early adopter and I still avoid messing with betas. My mindset is usually, “I don’t have time to get everything done on my plate as it is. Why would I want to play with something that I know it is (probably) broken and doesn’t include any upgrade path when the full release comes out?” Still I’m really tempted to throw Win7 RC on the netbook.

Speaking of the netbook. I am falling in love with it. It is a crack up in so many ways. I am doing all of these things that you shouldn’t do to a netbook. I installed Visual Studio Team Edition with all of the add-ons. I installed Virtual PC so I can run a Win2003 Server in the background while I program. I’m plugging in my portable laptop drive then working off compressed versions of my files. All of these action shouldn’t be possible on a XP Home netbook. I don’t know how many times I got warning, but I still plowed ahead and did it. And EVERYTHING works. I can query my Win2003 server, which is running SQL Server 2005. My biggest problem is the small screen. This could be fixed with a higher rez or a larger screen, but then I am leaving the realm of netbooks. It is a challenge to work on such a small screen. At work, I have a 20 widescreen. At home, I have a pair of 20” flat screens on my development machine and a 22” on my test box. So the shift to a single 10” widescreen requires a bit of effort. Still… It works. Yeah, it’s slow. Yes, I coulda/woulda/shoulda done it differently, but pushing this little machine is kind of fun. Tuesday night, I was a PADNUG with everything fired up and running. I had my external drive, my Bluetooth mouse, Virtual PC running and active while I fixed a couple bugs in VS2008TS. It rocked.

Sidebar:

DreamSpark
If you’re a current university or high school student, you can download professional Microsoft developer, designer, and gaming software through DreamSpark at no charge. Yes, students get to download software at no charge.

Follow the DreamSpark link
to learn more.

I installed ASP MVC on Wednesday after confirming I had already installed .net 3.5 SP1. It dropped in without any issues.

Which brings me around to the original topic… I am thinking about digging up another laptop hard drive so I can install Win7 on the netbook without mucking about with the default OS install. I know where I’ve got a 100 gig drive lurking someone where around the house.

Moto Crash: Update
The KTM should be back on the road next week. My new helmet might arrive today. I need to pick up some new armour on my way home from work tonight. I’m already lining things up for a shakedown run through the Cascades.

My body is starting to re-align. Muscles are less sore or sore from PT as opposed to sore from muscle spasms that last for days. I am back to tapping my foot at work. I tend to thump out the bass drum lines to the music I listen to while I program. I’m on the second floor of a steel reinforced building. When I get going, the monitors on the workstation next start to bob. It’s kind of funny for me, but I’m sure it annoys my co-workers beyond measure. I usually smile and stop as soon as I notice or someone points out the shake. I don’t mean to do it.

Guilty as charged.
100 Basic Geek-Skills for Geeks

Problems with ClickOnce Deployments

June 21st, 2009 Comments off

I’ve been fighting problems with my ClickOnce deployment. I’ve got an app that has 23 successful updates. Number 24 didn’t go as well. I started making major changes almost a month ago and I finished up a couple of the last minor fixes yesterday. The deployment uploaded fine, but it would not install on either my XP development machine or my Vista test platform. In the end, it was a couple simple changes to the app.manifest file. A some point, I had played with the ClickOnce settings. This messing about added extra info to the XML file and reverting back to “Full Trust” didn’t remove these edits.

Here’s the mainfest before I found a solution.

<?xml version="1.0" encoding="utf-8"?>
<asmv1 :assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyidentity version="1.0.0.0" name="MyApplication.app" />
  <trustinfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedprivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!-- UAC Manifest Options
            If you want to change the Windows User Account Control level replace the
            requestedExecutionLevel node with one of the following.

        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedexecutionlevel level="requireAdministrator" uiAccess="false" />
        <requestedexecutionlevel level="highestAvailable" uiAccess="false" />

            If you want to utilize File and Registry Virtualization for backward
            compatibility then delete the requestedExecutionLevel node.
        -->
        <requestedexecutionlevel level="asInvoker" uiAccess="false" />
      </requestedprivileges>
      <applicationrequestminimum>
        <defaultassemblyrequest permissionSetReference="Custom" />
        <permissionset class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="none">
          <ipermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Security.Permissions.StorePermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Diagnostics.EventLogPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Security.Permissions.DataProtectionPermission, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" version="1" Unrestricted="true" />
        </permissionset>
      </applicationrequestminimum>
    </security>
  </trustinfo>
</asmv1>

So here’s the complete working manifest file.

< ?xml version="1.0" encoding="utf-8"?>
<asmv1 :assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyidentity version="1.0.0.0" name="MyApplication.app" />
  <trustinfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedprivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!-- UAC Manifest Options
            If you want to change the Windows User Account Control level replace the
            requestedExecutionLevel node with one of the following.

        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedexecutionlevel level="requireAdministrator" uiAccess="false" />
        <requestedexecutionlevel level="highestAvailable" uiAccess="false" />

            If you want to utilize File and Registry Virtualization for backward
            compatibility then delete the requestedExecutionLevel node.
        -->
        <requestedexecutionlevel level="asInvoker" uiAccess="false" />
      </requestedprivileges>
    </security>
  </trustinfo>
</asmv1>

Moto days are better

April 8th, 2009 Comments off

My days are usually better when I ride. Maybe it is being forced into the moment instead of the esoteric world of software development where I spend most of my time. I had a Doctor’s appointment this morning so I slept in and took my time then I was late. It didn’t matter because a previous patient had a bunch of stuff to discuss and appointments were running one hour late. I cooled my heals and read a mag I’d picked up at PADNUG last night. I had had a nice mellow ride to the Doktor’s office so I was mellow and ready for whatever chaos I encountered. Read more…

Troubleshooting Specific Errors in ClickOnce Deployments

March 9th, 2009 Comments off

I’ve had a problem with ClickOnce deployments lately.

Unable to create the Web site ‘‘. The components for communicating with FrontPage Server Extensions are not installed.

I think I found the solution with the following URLs. I’ve installed the WebDesignerCore. Now I need to see if I can publish…

http://msdn.microsoft.com/en-us/library/ms229001.aspx

http://support.microsoft.com/kb/945358/en-us

Links

August 21st, 2008 Comments off

Find/Replace Regular Expression in Visual Studio 2008
http://msdn.microsoft.com/en-us/library/2k3te2cs.aspx

Implementing the ISerializable Interface
Framework 2.0: http://msdn.microsoft.com/en-us/library/system.runtime.serialization.iserializable(VS.80).aspx
Framework 3.5: http://msdn.microsoft.com/en-us/library/system.runtime.serialization.iserializable.aspx

It was beautiful today when I ran errands at lunch. Blue skys peaking out from puffy white clouds…

On Monday I started a new contract. I’m writing automation software to handle online reporting requirements for a company that works with medical stuff. Interesting work. My wrist is killing me from all of the cut-n-paste as I construct my most basic objects. This contract is scheduled for 4 weeks with possible extensions.

Whatever.

Back to my code…