Windows Workflow foundation activity + migration to visual studio 2010 - visual-studio-2010

I created a custom worflow activity that inherit from CompositeActivity as shown below using VS2008
public class CustomWorkflowActivity : System.Workflow.ComponentModel.CompositeActivity
I am able to write the below with no problems
<GS0:People365WorkflowActivity x:Class="People365.Workflows.Advance_Loan_1WF"
x:Name="Advance_Loan_1"
xmlns:GS0="clr-namespace:WorkflowEngine.Engine;assembly=WorkflowEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d2bf1cbcd6bbcd82"
xmlns:GS1="clr-namespace:WorkflowEngine.ActivityLibrary;assembly=WorkflowEngine.ActivityLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d2bf1cbcd6bbcd82"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<GS1:People365SequenceActivity x:Name="Activity2" WorkflowTemplateActivityId="a6b6327b-c27f-459e-a933-c3cf66ab711f" IsMandatoryActivity="False"></GS1:People365SequenceActivity>
</GS0:People365WorkflowActivity>
after migrating the application to VS2010, the below errors appear
The type 'People365WorkflowActivity' does not support direct content.
Type 'WorkflowEngine.Engine.People365WorkflowActivity' does not have a suitable TypeConverter or content property to handle this content.
Any help is very appreciated.

use the bellow:
<GS0:People365WorkflowActivity x:Class="People365.Workflows.Advance_Loan_1WF"
x:Name="Advance_Loan_1" xmlns:GS0="clr-
namespace:WorkflowEngine.Engine;assembly=WorkflowEngine,Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=d2bf1cbcd6bbcd82" xmlns:GS1="clr-
namespace:WorkflowEngine.ActivityLibrary;assembly=WorkflowEngine.ActivityLibrary,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=d2bf1cbcd6bbcd82"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<GS0:People365WorkflowActivity.Activities>
<GS1:People365SequenceActivity x:Name="Activity2"
WorkflowTemplateActivityId="a6b6327b-c27f-459e-a933-c3cf66ab711f" IsMandatoryActivity="False">
</GS1:People365SequenceActivity>
</GS0:People365WorkflowActivity.Activities>
</GS0:People365WorkflowActivity>

Related

.NET 6.0 Migration Swashbuckle issue

I have migrated one Web API from .NET Core 2.1 to .NET 6.0. And did the required changes, So API started building.
I have below lines in startup.cs, When I run the API it gives me error at ApiVersionDescriptions.
The error is
System.Reflection.ReflectionTypeLoadException HResult=0x80131602 Message=Unable to load one or more of the requested types.Method 'Apply' in type 'Swashbuckle.AspNetCore.Annotations.AnnotationsDocumentFilter' from assembly 'Swashbuckle.AspNetCore.Annotations, Version=3.0.0.0, Culture=neutral, PublicKeyToken=e9121ecc40036af8' does not have an implementation. Method 'Apply' in type 'Swashbuckle.AspNetCore.Annotations.AnnotationsOperationFilter' from assembly 'Swashbuckle.AspNetCore.Annotations, Version=3.0.0.0, Culture=neutral, PublicKeyToken=e9121ecc40036af8' does not have an implementation. Method 'Apply' in type 'Swashbuckle.AspNetCore.Annotations.AnnotationsParameterFilter' from assembly 'Swashbuckle.AspNetCore.Annotations, Version=3.0.0.0, Culture=neutral, PublicKeyToken=e9121ecc40036af8' does not have an implementation. Method 'Apply' in type 'Swashbuckle.AspNetCore.Annotations.AnnotationsSchemaFilter' from assembly 'Swashbuckle.AspNetCore.Annotations, Version=3.0.0.0, Culture=neutral, PublicKeyToken=e9121ecc40036af8' does not have an implementation. Source=System.Private.CoreLib

The Java type `javax.inject.Inject` is generated by more than one managed type. Please change the [Register] attribute

Migrated Xamarin.Android project to AndroidX and had to update some packages. Now I am unable to build my project and getting following error messages:
`javax.inject.Named` generated by: JavaX.Inject.INamed, Xamarin.JavaX.Inject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
`javax.inject.Scope` generated by: Javax.Inject.IScope, Scanbot.Xamarin.SDK.Dependencies, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
`javax.inject.Qualifier` generated by: JavaX.Inject.IQualifier, Xamarin.JavaX.Inject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
The Java type `javax.inject.Inject` is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.
`javax.inject.Provider` generated by: JavaX.Inject.IProvider, Xamarin.JavaX.Inject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
`javax.inject.Inject` generated by: JavaX.Inject.IInject, Xamarin.JavaX.Inject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
`javax.inject.Qualifier` generated by: Javax.Inject.IQualifier, Scanbot.Xamarin.SDK.Dependencies, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
The Java type `javax.inject.Provider` is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.
`javax.inject.Scope` generated by: JavaX.Inject.IScope, Xamarin.JavaX.Inject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
`javax.inject.Named` generated by: Javax.Inject.INamed, Scanbot.Xamarin.SDK.Dependencies, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
The Java type `javax.inject.Scope` is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.
`javax.inject.Provider` generated by: Javax.Inject.IProvider, Scanbot.Xamarin.SDK.Dependencies, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
`javax.inject.Singleton` generated by: JavaX.Inject.ISingleton, Xamarin.JavaX.Inject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
`javax.inject.Inject` generated by: Javax.Inject.IInject, Scanbot.Xamarin.SDK.Dependencies, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
The Java type `javax.inject.Named` is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.
The Java type `javax.inject.Qualifier` is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.
`javax.inject.Singleton` generated by: Javax.Inject.ISingleton, Scanbot.Xamarin.SDK.Dependencies, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
The Java type `javax.inject.Singleton` is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.
Please advice how it can be fixed or how can I change the [Register] attribute and where it needs to be done. I cannot remove those packages, other packages depend on them.
After the migration , we'll need to make some manual namespace changes for scenarios the tool doesn't cover.
AndroidX replaces the Android support libraries , and so any references to Android support library types must be replaced with references to AndroidX types.
The following table shows the namespace changes
Android support library namespace
AndroidX namespace
Android.Support.V4.App
AndroidX.Core.App
Android.Support.V4.Content
AndroidX.Core.Content
Android.Support.V4.App
AndroidX.Fragment.App
Android.Support.V7.App
AndroidX.AppCompat.App
Android.Support.V7.Widget
AndroidX.AppCompat.Widget
More : https://github.com/xamarin/AndroidX/blob/main/mappings/androidx-class-mapping.csv.
Refer to the links for more details :
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/troubleshooting/questions/forms5-migration#use-androidx-types
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/platform/android/androidx-migration
Update
Delete all the packages and re-add them in projects.

Error with Strongly Typed Entity Framework Object in Razor View

Creating the razor view with strongly typed of Entity Framework generated POCO gives the below error.
The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
However i added System.Data, System.Data.Entity dlls into my MVC 3 project.
In case if i use ViewModel object instead of EF Created POCO it is not showing error.
What is the problem of binding Entity Framework object in Razor View?
Edit: Reading Using Entity Model Object in ASP.Net MVC View Page is not helping me. What could i do here, Do i need to create another ViewModel for each POCO?
Try adding
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
To the <system.web> section of your web.config

How can I enable Telerik Openaccess ORM load external assemblies?

I'm new at Telerik OpenAccess ORM and I use other assemblies like CRISII (in house built for templates). I use these with other ORM's successfully like SubSonic but can't with Telerik. Here is my error:
Error 73 Unable to load assembly 'WritingChallenge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' : Could not load file or assembly 'CRISII, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b589e2deb0b5c884' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
ExceptionString:
System.SystemException: Unable to load assembly 'WritingChallenge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' : Could not load file or assembly 'CRISII, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b589e2deb0b5c884' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Telerik.OpenAccess.Metadata.MetadataAttributesReader.PrepareMetaModelTypes(Assembly assembly)
--- End of inner exception stack trace ---
at Telerik.OpenAccess.Metadata.MetadataAttributesReader.PrepareMetaModelTypes(Assembly assembly)
at Telerik.OpenAccess.Metadata.MetadataAttributesReader.ReadMetaModel(Assembly assembly)
at Telerik.OpenAccess.Metadata.AttributesMetadataSource.<>c__DisplayClass1.<FromAssembly>b__0()
at Telerik.OpenAccess.Metadata.AttributesMetadataSource.CreateModel()
at Telerik.OpenAccess.Metadata.MetadataSource.GetModelCore(MetadataContainer old)
at Telerik.OpenAccess.Sdk.Enhancer.Enhancer.CrossDomainRunImpl(AssemblyLoader assemblyLoader)
at Telerik.OpenAccess.Sdk.Enhancer.EnhancerBase.CrossDomainRun() C:\SVNProjects\WritingChallenge\WritingChallenge\obj\Debug\WritingChallenge.dll WritingChallenge
A possible cause for this issue is the Attributes mapping, you are using for your domain model. You could try switching to XML mapping and using it as your mapping approach.

CLR Can't find a type, even though it's in the same assembly

I'm troubleshooting a WCF problem in our application, and turned on WCF tracing with the WCF Service Configuration Editor in VS 2010, which added the following sharedListener to the web.config:
<sharedListeners>
<add initializeData="D:\Logs\CRCCustomerService\Web_tracelog.svclog"
type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
<filter type="" />
</add>
</sharedListeners>
Now, when I take steps to reproduce my error, I'm getting an exception thrown from the System.Diagostics library saying that it can't find XmlWriterTraceListener:
Stack Trace:
System.TypeInitializationException: The type initializer for 'System.ServiceModel.DiagnosticUtility' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Couldn't find type for class System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData)
at System.Diagnostics.TypedElement.BaseGetRuntimeObject()
at System.Diagnostics.ListenerElement.GetRuntimeObject()
at System.Diagnostics.ListenerElement.GetRuntimeObject()
at System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()
at System.Diagnostics.TraceSource.Initialize()
at System.Diagnostics.TraceSource.get_Listeners()
And it goes on for several more lines, but this establishes the context.
My question is, since, according to ObjectBrowser and Reflector, XmlWriterTraceListener is a member class of the same assembly that System.Diagnostics is, how can it NOT not be able to find it?
And secondly, since every single line in the exception stack comes from system code, how on earth do I begin to debug the root cause here?
Are you using .NET 4.0?
If not, you have to beware the service config utility. It will hard code the version of the listener to 4.0 and you'll need to manually change your web.config

Resources