Giter Site home page Giter Site logo

How to use SharpDX in main project about atf HOT 3 CLOSED

sonywws avatar sonywws commented on June 10, 2024
How to use SharpDX in main project

from atf.

Comments (3)

Ron2 avatar Ron2 commented on June 10, 2024

Hello,

I added every SharpDX library that is included with ATF to the Circuit Editor sample app, and I'm not getting that exception. It's legal and normal to reference the same dll from multiple projects.

Do you have the setting "break when an exception is thrown" set for all exceptions? This is in Debug -> Exceptions. I'm wondering if you have accidentally defined a method named ResourceUtil.Register(Type). That static Resources class uses reflection to search for that method, but it will throw an exception if it finds two of them. You would see an InvalidOperationException being raised in this case, but if you don't have break-on-exceptions turned on, you might just see the TypeInitializationException thrown afterwards, whose InnerException property is the original InvalidOperationException.

If that's not it, maybe you could set a breakpoint in Sce.Atf.Resources, in the static constructor, and see how far execution gets (if at all).

Please let me know how it goes and if you can report more info.

--Ron

from atf.

kiwidoggie avatar kiwidoggie commented on June 10, 2024

I am also getting the same error, by including the SharpDX 3.1.1 library without any references (in code) to it.

System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'Sce.Atf.Applications.StandardEditCommands' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

  1. No exports were found that match the constraint:
    ContractName Sce.Atf.Applications.IContextRegistry
    RequiredTypeIdentity Sce.Atf.Applications.IContextRegistry

Resulting in: Cannot set import 'Sce.Atf.Applications.StandardEditCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry")' on part 'Sce.Atf.Applications.StandardEditCommands'.
Element: Sce.Atf.Applications.StandardEditCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry") --> Sce.Atf.Applications.StandardEditCommands --> TypeCatalog (Types='Sce.Atf.Applications.SettingsService, Sce.Atf.Applications.StatusService, ...').

System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'Sce.Atf.Applications.StandardEditHistoryCommands' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

  1. No exports were found that match the constraint:
    ContractName Sce.Atf.Applications.IContextRegistry
    RequiredTypeIdentity Sce.Atf.Applications.IContextRegistry

Resulting in: Cannot set import 'Sce.Atf.Applications.StandardEditHistoryCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry")' on part 'Sce.Atf.Applications.StandardEditHistoryCommands'.
Element: Sce.Atf.Applications.StandardEditHistoryCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry") --> Sce.Atf.Applications.StandardEditHistoryCommands --> TypeCatalog (Types='Sce.Atf.Applications.SettingsService, Sce.Atf.Applications.StatusService, ...').

System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'Sce.Atf.Applications.StandardSelectionCommands' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

  1. No exports were found that match the constraint:
    ContractName Sce.Atf.Applications.IContextRegistry
    RequiredTypeIdentity Sce.Atf.Applications.IContextRegistry

Resulting in: Cannot set import 'Sce.Atf.Applications.StandardSelectionCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry")' on part 'Sce.Atf.Applications.StandardSelectionCommands'.
Element: Sce.Atf.Applications.StandardSelectionCommands..ctor (Parameter="contextRegistry", ContractName="Sce.Atf.Applications.IContextRegistry") --> Sce.Atf.Applications.StandardSelectionCommands --> TypeCatalog (Types='Sce.Atf.Applications.SettingsService, Sce.Atf.Applications.StatusService, ...').

I was wondering if there was any resolution to this? Throws on Atf.Core.vs2010/ATF/Framework/ATF.Core/MefUtil.cs line 60.

from atf.

abeckus avatar abeckus commented on June 10, 2024

Hi,
Currently ATF is in maintenance mode, no more work will be done expect major bug fixes.

Thanks
Alan

from atf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.