Office 365 & ADFS: Compiler Error Message: CS0101: The namespace ‘Resources’ already contains a definition for ‘CommonResources’

Over the past month, I had participated in bringing Office 365 to our corporate environment. Working with respective team mates, all that had remained some login customizations and an email announcement. Reviewing a previously referenced Microsoft technet article, I had thought this should be a piece of cake.

Going through one of three ADFS proxy servers, I had started going through the customization directions from Customizing the ADFS forms based login page. The first couple of files, I had updated per article. Before making any changes, I had made a copy of each file, just in case of human error. Moving onto the directory C:\inetpub\adfs\ls\App_GlobalResources, I had repeated the same steps on the file, CommonResources.en.resx.

After testing, I had received a generic .net error. Having a long day, I had concluded a syntax error somewhere. More often than I had liked to admit, an errant space or another syntax faux paux, usually the source of a .net error. After some proof reading, nothing had seemed out of sorts. In the interest of time, I had rolled back the original file by updating the file name.

Example:
CommonResources.en.resx
CommonResources.en.resx.backup

However, much to my chagrin, I had still received the generic .net error. After some reflection, I had started to look at file dates and alternate servers. After some frustration, I had worked my way inside out. Beginning with an internal ADFS server, I had copied the same custom files over. At this point, I had received the error message below. I had looked at line 25. Nothing had appeared incorrect. Going back to the error, I had deduced maybe having both files the cause of the message. I had copied the extra files to my server desktop. Testing again on the ADFS server, the error had cleared. I had repeated the same method on the ADFS proxy server with similar success. So with much jubilation, I had completed the customizations today and promptly exited the building.

.net Error message:

Server Error in ‘/adfs/ls’ Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0101: The namespace ‘Resources’ already contains a definition for ‘CommonResources’

Source Error:

[No relevant source lines]

Source File: c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\App_GlobalResources.h4pqoe46.2.cs Line: 25

Show Detailed Compiler Output:

c:\windows\system32\inetsrv> “C:\Windows\Microsoft.NET\Framework64\v2.0.50727\csc.exe” /t:library /utf8output /R:”C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll” /R:”C:\Windows\assembly\GAC_MSIL\Microsoft.IdentityModel\3.5.0.0__31bf3856ad364e35\Microsoft.IdentityModel.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll” /R:”C:\Windows\assembly\GAC_64\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll” /R:”C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll” /R:”C:\Windows\assembly\GAC_MSIL\Microsoft.IdentityServer\6.1.0.0__31bf3856ad364e35\Microsoft.IdentityServer.dll” /R:”C:\Windows\assembly\GAC_64\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll” /R:”C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll” /R:”C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorlib.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll” /R:”C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll” /out:”C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\App_GlobalResources.h4pqoe46.dll” /debug- /optimize+ /res:”C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\resources.commonresources.en___copy.resources” /res:”C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\resources.commonresources.en.backup.resources” /res:”C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\resources.commonresources.resources” /w:4 /nowarn:1659;1699;1701 “C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\App_GlobalResources.h4pqoe46.0.cs” “C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\App_GlobalResources.h4pqoe46.1.cs” “C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\App_GlobalResources.h4pqoe46.2.cs” “C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\App_GlobalResources.h4pqoe46.3.cs”

Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.4927
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\App_GlobalResources.h4pqoe46.2.cs(25,18): error CS0101: The namespace ‘Resources’ already contains a definition for ‘CommonResources’
c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\adfs_ls\a6c27ef8\7adb2961\App_GlobalResources.h4pqoe46.0.cs(11,11): (Location of symbol related to previous error)

Version Information: Microsoft .NET Framework Version:2.0.50727.5472; ASP.NET Version:2.0.50727.5474

Read more:
Customizing the ADFS forms based login page (blogs.technet.com/b/stevenha/)

20131028-211320.jpg

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s