Archive for category Errors

Visual Studio: How to Resolve TestWindowPackage.Initialize Failure

I began to receive the error message box in Visual Studio after a restart from an install of an unrelated to test Visual Studio plugin (which I have used in the past):

The ‘TestWindowPackage’ package did not load correctly.  … examining the file … AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml

Looking at that log showed these errors:

TestWindowPackage.Initialize failed with exception … System.InvalidOperationException:

Loading MEF components failed with the following exception:
The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

No exports were found that match the constraint:
    ContractName    Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer
    RequiredTypeIdentity    Microsoft.VisualStudio.TestWindow.VsHost.PackageContainer

 

To resolve the issue I did step 1 and 2 but am showing step 3 in case it helps.

  1. Close all instances of Visual Studio.
  2. Delete all files in AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache Note that directory is not found in Roaming as the activity log file, but in Local.
  3. Restart, if that doesn’t work then start over with step 4.
  4. From a Visual Studio Command Line do this operation: devenv /setup /ResetSkipPkgs See (/Setup (devenv.exe)) for more information.
Share

Tags:

Azure Build: How to Enable A Build Definition in Visual Studio

 

In Visual Studio 2013 one may run into this error  when getting a build running with Windows Azure online TFS.

Team Foundation Error

TF215079: The build definition NexusTFS_CD is disabled. Enable the build definition and try again.

TFS Error

Here are two things to look for/ to do. But both of the items require one to bring up the build definition file (internally named xaml (not the wpf kind)) by (in Visual Studio) right clicking on the build definition which shows the disabled build with an x in the icon in the Team Explorer, Build section:

WhereToClick

  1. There may be build problems other than the build definition is disabled. Select the Process section by clicking it and look for any triangle warning signs in the window/tab which opens. If the triangle icon is there, that may mean that something is missing and needs your attention. If in TFS, your Team Project Collection has multiple solutions, the actual solution to build may not be set. Set it in the Projects section.
    Yellow Warning
  2. To enable the build definition go to the General settings and and change the Queue Processing  from Disabled to Enabled.

Enable

If everything is a go, the icon should change after you save the xaml file. Queue a new build and run.

Success

Share

Tags: , ,

Azure: Failed to Create Web Site in Visual Studio Using Azure

If you have a valid azure account but receive this message in Visual Studio 2013 (or 2012 with the Azure toolkit installed) while trying to create a website

This subscription is not registered to use the following resources: Website. The remote server returned an unexpected response: (400) Bad Request.

Subscription

Here are the steps to fix and or pinpoint the issue.

  1. Log into to manage the account Azure Portal (Opens in new window). Is this account the same one that is tied to Visual Studio?
  2. Find the WebSites section along the left hand side.
  3. Create a new website.

If you are able to do those steps, you have eliminated the sign on issue (wrong account) and the general ability to create websites in Azure.

  1. Try to create a website again in Visual Studio using the account specified above used to log into Windows Azure Portal.

If it still fails at this point, trying installing the latest Azure Toolkit (2.2 of this writing) into Visual Studio. Tell me what you have run into…I would like to hear.

Share

Tags: , ,

Visual Studio TFS: TF10175 During Add Solution To Source Control in Visual Studio How To Fix

If one is attempting to add a project in Visual Studio 2013, 2012 or 2010 and one get this message:

TF10175: The team project folder $/{Project Name Being Added} does not exist. Contact your Team Foundation Server administrator and ask that it be created.

This discusses how to create a Team Project in TFS and then add the solution into source control.

Steps To Create a Team Project in TFS

  1. Verify you are actually can connect to a top level Team Project Server. I use the term top level because it is the TFS server which holds your sub Team Projects. In Visual Studio open up the Team Explorer window and select the Connect (it’s the electrical plug icon) and then proceed to select a top level server / Team Project to connect to. If you can connect proceed to the next step, if you cannot connect, talk to the person in charge of TFS and either have her/him grant you access to do step 2 or have them do step 2 and give you access so you then add it to Source Control. Once the team project is added *by them* then you may have to do #1 again (if they add it) but then specifically connect to the team project before skipping to step 3.
  2. Create a Team Project on the server before you save to it. If you have privileges you should be able to go to File->New->Team Project and put the name of the project (or possibly solution name) into the “What is the name of the team project?"

    If this dialog below doesn’t come up or there is a failure, do the advice in step 1 about contacting an admin to do step 2.

    Click to enlarge:
    TFSAdd

  3. Once that is created, you can then add the solution to source control.
Share

Tags: , , , , ,

Visual Studio: Downloaded Assembly Gives "ValidateXaml" task failed unexpectedly Error or FileLoadException

This is a How To Fix when you have downloaded a foreign (to your computer) assembly which can occur when dealing with Silverlight assemblies but it applies to all assemblies downloaded. Here is more of the errors:

error MSB4018: The "ValidateXaml" task failed unexpectedly.

error MSB4018: System.IO.FileLoadException: Could not load file or assembly ‘… \ImageSequence.dll’ or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

The situation is that the OS has identified that the assembly was not made on the computer and has been blocked. This is usually the case with downloaded assemblies and is a security feature.

Steps To Resolve

  1. In Visual Studio in the Solution Explorer Window right click on the project which contains the dll and select Open Folder in Windows Explorer.
  2. In Windows Explorer find the dll in question and right click and select Properties.
  3. Select Unblock and select OK. (As shown below)

    BlockedFile

  4. Rebuild.

Once you see the properties and this text its more self explanatory than the Visual Studio error.

This file came from another computer and might be blocked to help protect this computer.

Why?

Remember that .Net is an Xcopy install. Meaning that any .Net application can be installed by simply copying over the assemblies. The OS recognizes the assemblies and categorizes them for running. When one copies code over and tries to manipulate it in Visual Studio the OS blocks for safety reasons and it subsequently fails during a Visual Studio build.

Share

Tags: , ,