Wednesday, April 30, 2014
Tuesday, March 11, 2014
TFS custom enumeration not showing
I have been working with this solution I have 4 projects:
- Project to hold the xaml files
- Project to hold the first level library (contain my custom activities)
- Project to hold Business Layer stuff
- Project to test the Business Layer stuff
Everything was working great.
I had an enumeration that was in the "first level library". It was a parameter in my builds. I noticed a better place for it would be in the Business Layer project instead, so I moved. After I did this I got the following error on my builds:
"Failed to load the following parameters:"
<InArgument x:Key="EnumerationName" x:TypeArguments="enumerationLibrary:EnumerationName" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns=http://schemas.microsoft.com/netfx/2009/xaml/activities">[EnumerationName.DefaultValue]</InArgument>
I would also get the following:
The parameter EnumerationName could not be loaded because the type InArgument<MyNamespace.BLProjectName.EnumerationName> was not found. You cannot edit this parameter, but you can save your build definition without it.
I have already added my TFS folder to the build server's "Version control path custom assemblies" therefore I knew the DLL was in the right place and TFS should see it.
Well then I found this forum entry.
Basically TFS will NOT jump from a xaml workflow file to a DLL that does not have a Activity in it. Since I moved my enumeration to the Business project that project does not have an activity. The solution for this? Add a dummy activity into the project.
Here is an example from Valéry Letroye in the forum above:
- Project to hold the xaml files
- Project to hold the first level library (contain my custom activities)
- Project to hold Business Layer stuff
- Project to test the Business Layer stuff
Everything was working great.
I had an enumeration that was in the "first level library". It was a parameter in my builds. I noticed a better place for it would be in the Business Layer project instead, so I moved. After I did this I got the following error on my builds:
"Failed to load the following parameters:"
<InArgument x:Key="EnumerationName" x:TypeArguments="enumerationLibrary:EnumerationName" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns=http://schemas.microsoft.com/netfx/2009/xaml/activities">[EnumerationName.DefaultValue]</InArgument>
I would also get the following:
The parameter EnumerationName could not be loaded because the type InArgument<MyNamespace.BLProjectName.EnumerationName> was not found. You cannot edit this parameter, but you can save your build definition without it.
I have already added my TFS folder to the build server's "Version control path custom assemblies" therefore I knew the DLL was in the right place and TFS should see it.
Well then I found this forum entry.
Basically TFS will NOT jump from a xaml workflow file to a DLL that does not have a Activity in it. Since I moved my enumeration to the Business project that project does not have an activity. The solution for this? Add a dummy activity into the project.
Here is an example from Valéry Letroye in the forum above:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.TeamFoundation.Build.Client; using System.Activities; namespace AG.SCRM.TeamBuild.Helpers { //If a custom assembly uses a dependent assembly (reference) which is needed to run activities, //they will not get deployed properly. If this is the case you will get “unknown type” errors on //build definition initialization: // TF215097: An error occurred while initializing a build for build definition xxxx: // The type ‘xxxx’ of property ‘xxxx’ could not be resolved. //To work around this issue, we add a dummy CodeActivity into the dependent assembly with the //class scoped attribute: [BuildActivity(HostEnvironmentOption.All)] [BuildActivity(HostEnvironmentOption.All)] public sealed class DummyCodeActivity : CodeActivity { protected override void Execute(CodeActivityContext context) { throw new NotImplementedException(); } } }
I did the above and everything started working fine.
God bless,
Bruno
Monday, October 7, 2013
ASPNET user does not have write access to Temporary ASP.NET Files
Issue
Current Identity does not have Write Access to v4.0.30319 Temporary ASP.NET Files
Resolution
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet_regiis.exe -ga domain\user
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_regiis.exe -ga domain\user
Current Identity does not have Write Access to v4.0.30319 Temporary ASP.NET Files
Resolution
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet_regiis.exe -ga domain\user
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet_regiis.exe -ga domain\user
Friday, September 13, 2013
Getting the dreaded "silverlight.msi" error on install of Visual Studio 2010 SP1
Found this solution at the MSDN KB (KB2608523).
Create a batch file with the following contents, or just run one line at a time on your command prompt. Remember to start your cmd with Admin privileges by right clicking on it.
You will get some errors depending what version of Windows you got (x86 or x64).
After this I re-installed the latest version of Silverlight and all was done.
Create a batch file with the following contents, or just run one line at a time on your command prompt. Remember to start your cmd with Admin privileges by right clicking on it.
reg delete HKLM\Software\Microsoft\Silverlight /f reg delete HKEY_CLASSES_ROOT\Installer\Products\D7314F9862C648A4DB8BE2A5B47BE100 /f reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\D7314F9862C648A4DB8BE2A5B47BE100 /f reg delete HKEY_CLASSES_ROOT\TypeLib\{283C8576-0726-4DBC-9609-3F855162009A} /f reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\install.exe /f reg delete HKEY_CLASSES_ROOT\AgControl.AgControl /f reg delete HKEY_CLASSES_ROOT\AgControl.AgControl.5.1 /f reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{89F4137D-6C26-4A84-BDB8-2E5A4BB71E00} /f rmdir /s /q "%ProgramFiles%\Microsoft Silverlight" rmdir /s /q "%ProgramFiles(x86)%\Microsoft Silverlight"
You will get some errors depending what version of Windows you got (x86 or x64).
After this I re-installed the latest version of Silverlight and all was done.
Friday, July 26, 2013
System.Web.Mobile getting Application_Error throw on .NET 4.0
Just had an strange issue.
User updated ASP.NET page that was created on Visual Studio 2008 to Visual Studio 2010. In the process the project got update to .NET 4.0.
One of the pages was inheriting from System.Web.Mobile, however when we hit this page we would get a message talking about the dll for the System.Web.Mobile was not found or one of its dependencies was not found.
I went inside the project and change it to .NET 3.5 and this fixed the issue.
Now if you need to do .NET 4.0, System.Web.Mobile has been deprecated, so you need to use MVC instead.
User updated ASP.NET page that was created on Visual Studio 2008 to Visual Studio 2010. In the process the project got update to .NET 4.0.
One of the pages was inheriting from System.Web.Mobile, however when we hit this page we would get a message talking about the dll for the System.Web.Mobile was not found or one of its dependencies was not found.
I went inside the project and change it to .NET 3.5 and this fixed the issue.
Now if you need to do .NET 4.0, System.Web.Mobile has been deprecated, so you need to use MVC instead.
Thursday, May 30, 2013
Processor and Memory in Windows 8 System shows "Not Available"
After looking all over the net I found this. It is for Windows Vista, but it does work for the Windows 8 also.
Basically Service account doesn't have enough power to look at the processor and memory. So if you type the following command in a CMD in Administrator mode you can fix this issue.
Step 1 - Press the "Windows" key.
Step 2 - Type "cmd"
Step 3 - Right Click or Long press on the "cmd" application.
Step 4 - On the bottom of the screen you should see "Run as administrator"
Step 5 - On the new command line type in
Net localgroup Administrators Service /add
Step 6 - Restart the machine.
Step 7 - It should be all OK.
Basically Service account doesn't have enough power to look at the processor and memory. So if you type the following command in a CMD in Administrator mode you can fix this issue.
Step 1 - Press the "Windows" key.
Step 2 - Type "cmd"
Step 3 - Right Click or Long press on the "cmd" application.
Step 4 - On the bottom of the screen you should see "Run as administrator"
Step 5 - On the new command line type in
Net localgroup Administrators Service /add
Step 6 - Restart the machine.
Step 7 - It should be all OK.
Thursday, May 23, 2013
Checking if a DLL is 32bits.
So I was trying to deploy a web service in IIS, but I was getting the following error when I tried to access the service using IE.
"Could not load file or assembly 'myAssembly.name' or one of its dependencies. An attempt was made to load a program with an incorrect format body..."
I had seen this before. My file was inside IIS, so I knew the file was there, so one question remained. I am running pure 64bits, could this dll be compiled in 32bits only? I made the following test.
I went to IIS's "Application Polls" and found my service:
Then I changed the "Enable 32-Bit Applications from FALSE to TRUE.
"Could not load file or assembly 'myAssembly.name' or one of its dependencies. An attempt was made to load a program with an incorrect format body..."
I had seen this before. My file was inside IIS, so I knew the file was there, so one question remained. I am running pure 64bits, could this dll be compiled in 32bits only? I made the following test.
I went to IIS's "Application Polls" and found my service:
Then I changed the "Enable 32-Bit Applications from FALSE to TRUE.
And the amazing thing is that my service returned XML when I hit it with IIS.
Crap my DLL was really 32bits. But how to really check?
Here comes CorFlags:
By just finding the DLL using command line program for VS2010 (Visual Studio Command Prompt (2010). I normally search for "Prompt" and the program will display.
By running:
CorFlags myLibrary.DLL
The following showed up:
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 11
ILONLY : 1
32BIT : 1
Signed : 1
Just for kicks I ran on another library that I knew was 64bits:
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 9
ILONLY : 1
32BIT : 0
Signed : 1
So I need to go back to my compiler and make sure to compile in 64bits and try again.
God bless,
Bruno
Subscribe to:
Posts (Atom)
Kitematic - Self Signed Certificate In Certificate Chain
Found this issue while behind a enterprise proxy. Proxy uses self signed certificate. Windows has the certificate as trusted, docker works f...

-
Found this solution at the MSDN KB (KB2608523). Create a batch file with the following contents, or just run one line at a time on your co...
-
I needed to run a certain code only when the browser was IE. So I needed a way to check for browser, and here is the line of code: if (str...
-
I have been working with this solution I have 4 projects: - Project to hold the xaml files - Project to hold the first level library (cont...