xunit cannot discover tests after upgrading to v2 - xunit

After upgrading to xunit2 and following the migration guide (http://xunit.github.io/docs/test-migration.html), I get the following error when discovering tests in my projects:
------ Discover test started ------
[xUnit.net 00:00:00.0701819] Exception discovering tests from MyLibrary.Tests.dll: System.MissingMethodException: Constructor on type 'Xunit.Sdk.TestFrameworkProxy' not found.
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
at System.AppDomain.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)
at Xunit.RemoteAppDomainManager.CreateObject[TObject](String assemblyName, String typeName, Object[] args)
at Xunit.Xunit2Discoverer..ctor(ISourceInformationProvider sourceInformationProvider, IAssemblyInfo assemblyInfo, String assemblyFileName, String xunitExecutionAssemblyPath, String configFileName, Boolean shadowCopy, String shadowCopyFolder)
at Xunit.XunitFrontController.CreateInnerController()
at Xunit.XunitFrontController.get_InnerController()
at Xunit.Runner.VisualStudio.TestAdapter.VsTestRunner.DiscoverTests[TVisitor](IEnumerable`1 sources, IMessageLogger logger, Func`3 visitorFactory, Action`3 visitComplete, Stopwatch stopwatch)
========== Discover test finished: 0 found (0:00:00.2454142) ==========
I have no experience debugging testrunners or xunit, so I don't know where to look. I hope someone has encountered the problem before and can give a quick answer, but my google-fu shows nothing.
I don't know what information would be useful for tracking down this problem, so I'll add things as people ask for them.

From the test runner documentation: If you're having problems discovering or running tests, you may be a victim of a corrupted runner cache inside Visual Studio.
Deleting %TEMP%\VisualStudioTestExplorerExtensions seems to fix the issue.
Ref.: http://xunit.github.io/docs/running-tests-in-vs.html

Make sure you have installed both Xunit and Xunit.Runner.VisualStudio nuget packages

Related

HttpWebRequest not working on device

I have read some topics that contains that problem but none of the answer was useful or topic wasn't resolved at the end.
So my app is working fine on emulator but doesn't work on device (HTC Trophy it that matters somehow?). I'm catching exception like that:
System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass2.<EndGetResponse>b__1(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__0(Object sendState)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Delegate.DynamicInvokeOne(Object[] args)
at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at System.Windows.Threading.Dispatcher.<>c__DisplayClass4.<FastInvoke>b__3()
at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Delegate.DynamicInvokeOne(Object[] args)
at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
at System.Windows.Threading.Dispatcher.OnInvoke(Object context)
at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
at System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Birdaholic1.AddSighting.GetResponseCallback(IAsyncResult asynchronousResult)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClassa.<InvokeGetResponseCallback>b__8(Object state2)
at System.Threading.ThreadPool.WorkItem.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadPool.WorkItem.doWork(Object o)
at System.Threading.Timer.ring()
What should I do? Where should I start to fix it?
Checklist for things to look at:
is the URI-object set with the UriKind.Absolute attribute?
does my cell phone have a data connection (i.e. does other apps like Facebook, internet explorer work)?
if so, can I open the URL in the web browser (given it's a GET-request) and find it?
If the answer is yes to all those questions, try with a second device if at all possible and try to recreate the problem. If it still persists, look at the server side of things, perhaps caching is screwing you up for some reason.
Happy (bug) hunting!

Constructor on type 'System.Web.Mvc.WebFormView' not found

I just checked out a asp net mvc project from out TFS. After installing all required NuGet packages, I tried to run the project.
I keep getting this error message when trying to use one of the following methods of the MvcSiteMapProvider:
SiteMapTitle()
SiteMap()
SiteMapPath()
I am using .NET Framework 4.0, MVC3 and the MvcSiteMapProvider version 3.2.2.0.
I installed the MvcSiteMapProvider via NuGet (Package Manager Console).
my project references the DLL in ...\packages\MvcSiteMapProvider.3.2.2.0\lib\net40\MvcSiteMapProvider.dll, using Runtime Version v2.0.50727
[MissingMethodException: Constructor on type 'System.Web.Mvc.WebFormView' not found.]
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1136
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
System.Activator.CreateInstance(Type type, Object[] args) +19
MvcSiteMapProvider.Internal.MvcSiteMapProviderViewEngine.CreatePartialView(ControllerContext controllerContext, String partialPath) +109
System.Web.Mvc.VirtualPathProviderViewEngine.FindPartialView(ControllerContext controllerContext, String partialViewName, Boolean useCache) +217
System.Web.Mvc.<>c__DisplayClass8.<FindPartialView>b__7(IViewEngine e) +21
System.Web.Mvc.ViewEngineCollection.Find(Func`2 lookup, Boolean trackSearchedPaths) +127
System.Web.Mvc.ViewEngineCollection.FindPartialView(ControllerContext controllerContext, String partialViewName) +170
System.Web.Mvc.Html.TemplateHelpers.ExecuteTemplate(HtmlHelper html, ViewDataDictionary viewData, String templateName, DataBoundControlMode mode, GetViewNamesDelegate getViewNames, GetDefaultActionsDelegate getDefaultActions) +418
System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData, ExecuteTemplateDelegate executeTemplate) +1117
System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData) +66
System.Web.Mvc.Html.TemplateHelpers.TemplateFor(HtmlHelper`1 html, Expression`1 expression, String templateName, String htmlFieldName, DataBoundControlMode mode, Object additionalViewData, TemplateHelperDelegate templateHelper) +117
System.Web.Mvc.Html.TemplateHelpers.TemplateFor(HtmlHelper`1 html, Expression`1 expression, String templateName, String htmlFieldName, DataBoundControlMode mode, Object additionalViewData) +100
System.Web.Mvc.Html.DisplayExtensions.DisplayFor(HtmlHelper`1 html, Expression`1 expression, String templateName) +57
MvcSiteMapProvider.Web.Html.SiteMapTitleHelper.SiteMapTitle(MvcSiteMapHtmlHelper helper, String templateName) +412
MvcSiteMapProvider.Web.Html.SiteMapTitleHelper.SiteMapTitle(MvcSiteMapHtmlHelper helper) +33
ASP._Page_Views_Shared__Layout_cshtml.Execute() in xxx\Views\Shared\_Layout.cshtml:28
Any help would be appreciated.
Try to update to version 3.2.3, then it should work.

Binding Text property with ApplicationBarIconButton in WP7

I want to bind the string to Text Property in ApplicationBarIconButton in WP7.
While doing this, I got an error as
Set property 'Microsoft.Phone.Shell.ApplicationBarIconButton.Text' threw an exception.
StackTrace:
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.RuntimePropertyInfo.InternalSetValue(PropertyInfo
thisProperty, Object obj, Object value, Object[] index,
StackCrawlMark& stackMark)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
at MS.Internal.XamlMemberInfo.SetValue(Object target, Object value)
at MS.Internal.XamlManagedRuntimeRPInvokes.SetValue(XamlTypeToken inType,
XamlQualifiedObject& inObj, XamlPropertyToken inProperty,
XamlQualifiedObject& inValue)
at MS.Internal.XcpImports.Application_LoadComponentNative(IntPtr
pContext, IntPtr pComponent, UInt32 cUriStringLength, String
uriString, UInt32 cXamlStrLength, Byte* pXamlStr, UInt32
cAssemblyStrLength, String assemblyStr)
at MS.Internal.XcpImports.Application_LoadComponent(IManagedPeerBase
componentAsDO, String resourceLocator, UnmanagedMemoryStream stream,
UInt32 numBytesToRead, String assemblyString)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at Syncfusion.Phone.Tools.Controls.TimeSpanPickerPage.InitializeComponent()
at Syncfusion.Phone.Tools.Controls.TimeSpanPickerPage..ctor()
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(RuntimeConstructorInfo
rtci, BindingFlags invokeAttr, Binder binder, Object parameters,
CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean
verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, StackCrawlMark& stackMark)
at System.Activator.InternalCreateInstance(Type type, Boolean nonPublic, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type)
at System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback
userCallback, PageResourceContentLoaderAsyncResult result)
at System.Windows.Navigation.PageResourceContentLoader.<>c_DisplayClass4.b_0(Object
args)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo
rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object
parameters, CultureInfo culture, Boolean isBinderDefault, Assembly
caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Delegate.DynamicInvokeOne(Object[] args)
at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority
priority)
at System.Windows.Threading.Dispatcher.OnInvoke(Object context)
at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
at System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle,
Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)
Solution: The ApplicationBar is a special element that is not implemented in Silverlight and cannot be used with databinding. You'll have to directly update the Text property in C#. Peter Torr explains it here: Peter Torr's Blog > Why are the ApplicationBar objects not FrameworkElements?
It seems to me you already know the answer, anyhow binding data the ApplicationBar is not possible, you can create the application bar at runtime though, you might be able to do something from there. ApplicationBarIconButton At Runtime
Although the ApplicationBar is not a bindable object, there are workarouds to make binding work.
One, is the ApplicationBarBehavior from the Cimbalino Windows Phone Toolkit (you can get it from NuGet)!

Interface not registered(0x80040155) when running Pex On Specific machine

Pex 0.94.0.0 Release Visual Studio 10.0.40219.1 Bug Report
How to reproduce:
Open a class library project
Create an empty method
Right Click->Run Pex
I run without problem on another machine (In Office, VS2010 Utimate)
But I got this exception on my home computer(VS2010 Professtional)
exception details:
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'EnvDTE.DTE'.
This operation failed because the QueryInterface call on the COM component for the interface with IID
'{04A72314-32E9-48E2-9B87-A63603454F3E}') failed due to the following error: Interface not registered.
(Exception from HRESULT: 0x80040155)
at Microsoft.Pex.VsPackage.VsServiceProviderHelper.GetService[T](IServiceProvider serviceProvider)
at Microsoft.Pex.VsPackage.Helpers.ProjectHelper.SaveAllFiles(IServiceProvider serviceProvider)
at Microsoft.Pex.VsPackage.Actions.ActionComponent.SaveAll()
at Microsoft.Pex.VsPackage.Actions.ExplorationActionBase.InternalExecute()
at Microsoft.Pex.VsPackage.Actions.ActionComponent.Execute(Object target)
Current stacktrace
at Microsoft.Pex.VsPackage.Controls.ErrorReport.CreateReport(Exception ex)
at Microsoft.Pex.VsPackage.Controls.ErrorReport.<>c_DisplayClass4.b_3()
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.Pex.VsPackage.Helpers.UIThreadInvoker.SafeMethodInvoker.Invoke()
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
relevant environment variables:
COR_ENABLE_PROFILER=
COR_PROFILER=
PROCESSOR_ARCHITECTURE=x86
machine data:
processor count = 4
Turns out to be some weird registry problem
Reinstalling Windows can solve it

Dynamics CRM error: "The object cannot be updated because it is read-only"

I've got an instance of Dynamics CRM 4.0 with some weird errors. If I close a Case and then try to reactivate it I get the error "The object cannot be updated because it is read-only". This is simple, built-in CRM functionality that works fine on other instances. I get the same error if I try to convert a Quote to an Order - I believe it's trying to update the Quote, which has been "closed" by then. What's wrong and how do I fix it?
MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Error Number: 0x8004022E
Error Message: The object cannot be updated because it is read-only.
Error Details: The object cannot be updated because it is read-only.
Source File: Not available
Line Number: Not available
Request URL: http://jupiter:5555/EN/cs/cases/edit.aspx?id={C75704E2-3B82-DE11-BFAD-00188B2CB446}
Stack Trace Info: [CrmException: The object cannot be updated because it is read-only.]
at Microsoft.Crm.ObjectModel.IncidentService.Update(IBusinessEntity incident, ExecutionContext context)
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext context)
at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.RequestBase.Process(Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.RequestBase.Process(CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.CrmServiceInternal.Execute(RequestBase request, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at Microsoft.Crm.Sdk.InProcessCrmService.Execute(Object request)
at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()
at Microsoft.Crm.Application.Platform.ServiceCommands.UpdateCommand.Execute()
at Microsoft.Crm.Application.Platform.EntityProxy.Update(Boolean performDuplicateCheck)
at Microsoft.Crm.Application.Platform.EntityProxy.Update()
at Microsoft.Crm.Web.CS.CaseDetailPage.Open(Object sender, DataEventArgs e)
at Microsoft.Crm.Application.Forms.DataEventProcessor.Raise(FormEventId eventId, FormState state, IUser user, String objectId, Entity entity)
at Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId)
at Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity)
at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, String formType)
at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity)
at Microsoft.Crm.Web.CS.CaseDetailPage.ConfigureForm()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.en_cs_cases_edit_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Try disabling your onload and onsave code to see if that is causing any problems. To quickly and temporarily disable the events, open the dialog box where you paste in your onload/onsave code and uncheck 'Event is enabled'. Then save the form and publish the entity. Does the error still occur?

Resources