Showing posts with label compile. Show all posts
Showing posts with label compile. Show all posts

Thursday, March 29, 2012

ERROR: Failure to compile WMI file

I received this error at the end of the "Reporting Services" setup.

I checked WMI process in Services and everything is OK, it's running.

So far I was able to install Designer Tools only (unchecking Report Manager and Report server).

All system components are up to date and SQL Server SP3 is installed.

I would highly appreciate it if somebody could help me out. It's now matter of survival to me.

Thanks in advance,

Confused Virginian

You also need SP3a to install Reporting Services. Hope this helps.|||

Caddre,

Thank you for your help. I already have SP3 installed.

Eventually I found the fix, right there:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/reinstalling_wmi.asp

This article explains how to recreate corrupted WMI repository.

Virginian

Friday, February 17, 2012

Error while loading custom assembly in Designer

I've created a custom assembly using C# that provides utility functions for
reporting services. I'm getting a the following compile time errors.
1. Error while loading code module: 'accentopto.report.utilities,
Version=1.0.1885.19928, Culture=en-US, PublicKeyToken=null'. Details: File or
assembly name accentopto.reporting.utilities, or one of its dependancies, was
not found.
2. Error in class instance declaration for class Utilities: [BC30002] Type
'Utilities' is not defined.
I've verified the version metadata using ildasm.
Here are the CodeModules and Classes elements from the .rdl file.
<CodeModules>
<CodeModule>accentopto.report.utilities, Version=1.0.1885.19928,
Culture=en-US, PublicKeyToken=null</CodeModule>
</CodeModules>
<Classes>
<Class>
<ClassName>Utilities</ClassName>
<InstanceName>Utilities</InstanceName>
</Class>
</Classes>
Here is the CodeGroup element in the rspreviewpolicy.config file for the
Designer
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="Execution"
Name="Accent_Reporting_Utilities"
Description="Code group for Accent data processing extensions">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\80\Tools\Report
Designer\accentopto.report.utilities.dll"/>
</CodeGroup>
I've verified that the assembly is in the Report Designer directory.
Here's the code snippet from the Utilities class.
--
using System;
using System.Globalization;
namespace com.accentopto.bizlogic.reporting.rs_shared
{
/// <summary>
/// Shared reporting utilities
/// </summary>
public class Utilities
{
private CultureInfo culture;
private Calendar calendar;
public Utilities()
{
this.culture = new CultureInfo("en-US", false);
this.calendar = culture.Calendar;
}
protected DateTime WeekEndDate(string inDate)
{
DateTime dateOut, dateIn;
string day;
dateIn = Convert.ToDateTime(inDate, culture);
day = dateIn.DayOfWeek.ToString();
switch(day)
{
case "Sunday":
dateOut = dateIn.AddDays(6);
break;
case"Monday":
dateOut = dateIn.AddDays(5);
break;
case "Tuesday":
dateOut = dateIn.AddDays(4);
break;
case "Wednesday":
dateOut = dateIn.AddDays(3);
break;
case "Thursday":
dateOut = dateIn.AddDays(2);
break;
case "Friday":
dateOut = dateIn.AddDays(1);
break;
default:
dateOut = dateIn;
break;
}
return dateOut;
}
/*
* Entry point for testing only
*
public static void Main(string []args)
{
string printDate;
Utilities util;
util = new Utilities();
printDate = util.WeekEndDate(args[0]).ToString();
Console.WriteLine(printDate);
}
*/
}
}
The only thing that I can think of is that my refs to System.Globalization
aren't available.
Thanks for any help.
--
Chris Mackey
Sr. Software Developer
Accent Optical TechnologiesSorry about the redundant entry. The server gave me an error on the first
submission so I thought that it didn't go through. In fact the error message
said that it didn't. Please remove this entry.
"Chris Mackey" wrote:
> I've created a custom assembly using C# that provides utility functions for
> reporting services. I'm getting a the following compile time errors.
> 1. Error while loading code module: 'accentopto.report.utilities,
> Version=1.0.1885.19928, Culture=en-US, PublicKeyToken=null'. Details: File or
> assembly name accentopto.reporting.utilities, or one of its dependancies, was
> not found.
> 2. Error in class instance declaration for class Utilities: [BC30002] Type
> 'Utilities' is not defined.
> I've verified the version metadata using ildasm.
> Here are the CodeModules and Classes elements from the .rdl file.
> <CodeModules>
> <CodeModule>accentopto.report.utilities, Version=1.0.1885.19928,
> Culture=en-US, PublicKeyToken=null</CodeModule>
> </CodeModules>
> <Classes>
> <Class>
> <ClassName>Utilities</ClassName>
> <InstanceName>Utilities</InstanceName>
> </Class>
> </Classes>
> Here is the CodeGroup element in the rspreviewpolicy.config file for the
> Designer
> <CodeGroup class="UnionCodeGroup"
> version="1"
> PermissionSetName="Execution"
> Name="Accent_Reporting_Utilities"
> Description="Code group for Accent data processing extensions">
> <IMembershipCondition class="UrlMembershipCondition"
> version="1"
> Url="C:\Program Files\Microsoft SQL Server\80\Tools\Report
> Designer\accentopto.report.utilities.dll"/>
> </CodeGroup>
> I've verified that the assembly is in the Report Designer directory.
> Here's the code snippet from the Utilities class.
> --
> using System;
> using System.Globalization;
> namespace com.accentopto.bizlogic.reporting.rs_shared
> {
> /// <summary>
> /// Shared reporting utilities
> /// </summary>
> public class Utilities
> {
> private CultureInfo culture;
> private Calendar calendar;
> public Utilities()
> {
> this.culture = new CultureInfo("en-US", false);
> this.calendar = culture.Calendar;
> }
> protected DateTime WeekEndDate(string inDate)
> {
> DateTime dateOut, dateIn;
> string day;
> dateIn = Convert.ToDateTime(inDate, culture);
> day = dateIn.DayOfWeek.ToString();
> switch(day)
> {
> case "Sunday":
> dateOut = dateIn.AddDays(6);
> break;
> case"Monday":
> dateOut = dateIn.AddDays(5);
> break;
> case "Tuesday":
> dateOut = dateIn.AddDays(4);
> break;
> case "Wednesday":
> dateOut = dateIn.AddDays(3);
> break;
> case "Thursday":
> dateOut = dateIn.AddDays(2);
> break;
> case "Friday":
> dateOut = dateIn.AddDays(1);
> break;
> default:
> dateOut = dateIn;
> break;
> }
> return dateOut;
> }
> /*
> * Entry point for testing only
> *
> public static void Main(string []args)
> {
> string printDate;
> Utilities util;
> util = new Utilities();
> printDate = util.WeekEndDate(args[0]).ToString();
> Console.WriteLine(printDate);
> }
> */
> }
> }
> The only thing that I can think of is that my refs to System.Globalization
> aren't available.
> Thanks for any help.
> --
> Chris Mackey
> Sr. Software Developer
> Accent Optical Technologies