2013-06-10 11 views
1

Это мой первый опыт развертывания .net на debian. Мое приложение было создано и протестировано в win 7 vs2012 с помощью Devart mysql-коннектора, используя первый метод базы данных, после чего я начал разворачивать его на linux. Я встретил BUNCH препятствий! Я вне себя от нервов ... может ли кто-нибудь помочь? До этого я думал, чтобы купить DevArt коннектор MySQL проф издание ... Вот мой стекEF 6 + DevArt Mysql connector + MONO

System.Data.Entity.Core.MetadataException: Unable to load the specified metadata resource. 
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources (System.String assemblyName, System.String resourceName, ICollection`1 uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderCompositeResource..ctor (System.String originalPath, System.String assemblyName, System.String resourceName, ICollection`1 uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader (System.String path, ExtensionCheck extensionCheck, System.String validExtension, ICollection`1 uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader.Create (System.String path, ExtensionCheck extensionCheck, System.String validExtension, ICollection`1 uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader.Create (System.String path, ExtensionCheck extensionCheck, System.String validExtension, ICollection`1 uriRegistry) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Metadata.Edm.MetadataCache.SplitPaths (System.String paths) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Common.Utils.Memoizer`2+<>c__DisplayClass2[System.String,System.Collections.Generic.List`1[System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader]].<Evaluate>b__0() [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Common.Utils.Memoizer`2+Result[System.String,System.Collections.Generic.List`1[System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader]].GetValue() [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Common.Utils.Memoizer`2[System.String,System.Collections.Generic.List`1[System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader]].Evaluate (System.String arg) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Metadata.Edm.MetadataCache.GetArtifactLoader (System.Data.Entity.Core.EntityClient.Internal.DbConnectionOptions effectiveConnectionOptions) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Metadata.Edm.MetadataCache.GetMetadataWorkspace (System.Data.Entity.Core.EntityClient.Internal.DbConnectionOptions effectiveConnectionOptions) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.EntityClient.EntityConnection.GetMetadataWorkspace() [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection() [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Objects.ObjectContext..ctor (System.Data.Entity.Core.EntityClient.EntityConnection connection, Boolean isConnectionConstructor, System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory objectQueryExecutionPlanFactory, System.Data.Entity.Core.Common.Internal.Materialization.Translator translator, System.Data.Entity.Core.Query.InternalTrees.ColumnMapFactory columnMapFactory) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Objects.ObjectContext..ctor (System.String connectionString) [0x00000] in <filename unknown>:0 
at System.Data.Entity.Core.Objects.ObjectContext..ctor (System.String connectionString, System.String defaultContainerName) [0x00000] in <filename unknown>:0 
at PararuLibrary.Databases.Mysql.PararuRuMysqlEntities..ctor() [0x00000] in /home/dotnetprojects/WebService1/PararuLibrary/Databases/Mysql/PararyEDM.Designer.cs:52 
at PararuLibrary.Repositories.UserRepository..ctor() [0x00000] in /home/dotnetprojects/WebService1/PararuLibrary/Repositories/UserRepository.cs:24 
at ConsoleTest.Program.Proceed() [0x00040] in /home/dotnetprojects/WebService1/ConsoleTest/Program.cs:28 
at ConsoleTest.Program.Main (System.String[] args) [0x00001] in /home/dotnetprojects/WebService1/ConsoleTest/Program.cs:22 

После этого я применил изменения в App.config в строке соединения с:

<add name="PararuRuEntitiesCS" connectionString="metadata=res://*/Databases.Mysql.PararyEDM.csdl|res://*/Databases.Mysql.PararyEDM.ssdl|res://*/Databases.Mysql.PararyEDM.msl;provider=Devart.Data.MySql;provider connection string=&quot;User Id=root;Host=localhost;Database=pararu_ru;Persist Security Info=True&quot;" providerName="System.Data.EntityClient" /> 

к .. .

<add name="PararuRuEntitiesCS" connectionString="metadata=res://PararuLibrary/Databases.Mysql.PararyEDM.csdl|res://PararuLibrary/Databases.Mysql.PararyEDM.ssdl|res://PararuLibrary/Databases.Mysql.PararyEDM.msl;provider=Devart.Data.MySql;provider connection string=&quot;User Id=root;Host=localhost;Database=pararu_ru;Persist Security Info=True&quot;" 
     providerName="System.Data.EntityClient" /> 

... у меня есть это ...

System.NotImplementedException: The requested feature is not implemented. 
    at System.Reflection.AssemblyName.ReferenceMatchesDefinition (System.Reflection.AssemblyName reference, System.Reflection.AssemblyName definition) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Metadata.Edm.DefaultAssemblyResolver.ResolveAssembly (System.Reflection.AssemblyName referenceName) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Metadata.Edm.DefaultAssemblyResolver.TryResolveAssemblyReference (System.Reflection.AssemblyName refernceName, System.Reflection.Assembly& assembly) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderCompositeResource.ResolveAssemblyName (System.String assemblyName, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader (System.String path, ExtensionCheck extensionCheck, System.String validExtension, ICollection`1 uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader.Create (System.String path, ExtensionCheck extensionCheck, System.String validExtension, ICollection`1 uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader.Create (System.String path, ExtensionCheck extensionCheck, System.String validExtension, ICollection`1 uriRegistry) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Metadata.Edm.MetadataCache.SplitPaths (System.String paths) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Common.Utils.Memoizer`2+<>c__DisplayClass2[System.String,System.Collections.Generic.List`1[System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader]].<Evaluate>b__0() [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Common.Utils.Memoizer`2+Result[System.String,System.Collections.Generic.List`1[System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader]].GetValue() [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Common.Utils.Memoizer`2[System.String,System.Collections.Generic.List`1[System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader]].Evaluate (System.String arg) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Metadata.Edm.MetadataCache.GetArtifactLoader (System.Data.Entity.Core.EntityClient.Internal.DbConnectionOptions effectiveConnectionOptions) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Metadata.Edm.MetadataCache.GetMetadataWorkspace (System.Data.Entity.Core.EntityClient.Internal.DbConnectionOptions effectiveConnectionOptions) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.EntityClient.EntityConnection.GetMetadataWorkspace() [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection() [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Objects.ObjectContext..ctor (System.Data.Entity.Core.EntityClient.EntityConnection connection, Boolean isConnectionConstructor, System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory objectQueryExecutionPlanFactory, System.Data.Entity.Core.Common.Internal.Materialization.Translator translator, System.Data.Entity.Core.Query.InternalTrees.ColumnMapFactory columnMapFactory) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Objects.ObjectContext..ctor (System.String connectionString) [0x00000] in <filename unknown>:0 
    at System.Data.Entity.Core.Objects.ObjectContext..ctor (System.String connectionString, System.String defaultContainerName) [0x00000] in <filename unknown>:0 
    at PararuLibrary.Databases.Mysql.PararuRuMysqlEntities..ctor() [0x00000] in /home/dotnetprojects/WebService1/PararuLibrary/Databases/Mysql/PararyEDM.Designer.cs:52 
    at PararuLibrary.Repositories.UserRepository..ctor() [0x00000] in /home/dotnetprojects/WebService1/PararuLibrary/Repositories/UserRepository.cs:24 
    at ConsoleTest.Program.Proceed() [0x00040] in /home/dotnetprojects/WebService1/ConsoleTest/Program.cs:28 
    at ConsoleTest.Program.Main (System.String[] args) [0x00001] in /home/dotnetprojects/WebService1/ConsoleTest/Program.cs:22 

ответ

-1

Похоже на ошибку Mono. Попробуйте следующее обходное решение: измените значение свойства модели «Метаданные обработки» с «Вставить в сборку вывода» в «Копировать в каталог вывода». Сохраните модель, перестройте проект в Windows, чтобы убедиться, что он работает, и разверните его в Mono.

+0

Я попробую ...! – NyoNor

-1

Ошибка ясно: этот метод не реализован в моно.

Mono - проект с открытым исходным кодом. Без вклада таких людей, как вы, он не может продолжать развиваться. Пожалуйста, подумайте о том, чтобы внести вклад в реализацию метода (не смотрите на источники MS, поскольку это было бы неверно).

 Смежные вопросы

  • Нет связанных вопросов^_^