Hi, I'm running 4.2 RC2 and I'm having some trouble building the domain:

Here is my code:

var config = new DomainConfiguration("sqlserver", ConfigurationManager.ConnectionStrings["Data.Providers.ConnectionString"].ConnectionString);
            config.UpgradeMode = Xtensive.Storage.DomainUpgradeMode.Validate;
            config.Types.Register(Assembly.GetExecutingAssembly(), _entitiesNamespace);
            _domain = Domain.Build(config);

And I get:

System.IO.FileLoadException occurred
  Message="A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)"
  Source="mscorlib"
  StackTrace:
       at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at Xtensive.Core.Reflection.AssemblyHelper.LoadExtensionAssembly(String extensionAssemblyName)
       at Xtensive.Storage.Building.Builders.DomainBuilder.CreateHandlerFactory()
       at Xtensive.Storage.Building.Builders.DomainBuilder.BuildDomain(DomainConfiguration configuration, DomainBuilderConfiguration builderConfiguration)
       at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.BuildStageDomain(UpgradeStage stage)
       at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.Build(DomainConfiguration configuration)
       at Xtensive.Storage.Domain.Build(DomainConfiguration configuration)
       at Data.Providers.DataObjectsSessionAdapter..cctor() in C:\Dev\Source\Main\Data.Providers\DataObjectsSessionAdapter.cs:line 24
  InnerException:

Does this mean I need to strong name my assembly to use DataObjects.NET? That's not really an option for me.

Also, the way I have DO.NET running on the project:

<UsePostSharp>true</UsePostSharp>
    <DontImportPostSharp>true</DontImportPostSharp>
    <DataObjectsDotNetPath>$(MSBuildProjectDirectory)\..\ReferenceAssemblies\DataObjects.Net</DataObjectsDotNetPath>
.
.
.
  <Import Project="$(DataObjectsDotNetPath)\Common\DataObjects.Net.targets" />

and the references...

<Reference Include="PostSharp.Laos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\ReferenceAssemblies\DataObjects.Net\Lib\PostSharp\PostSharp.Laos.dll</HintPath>
    </Reference>
    <Reference Include="PostSharp.Public, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\ReferenceAssemblies\DataObjects.Net\Lib\PostSharp\PostSharp.Public.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.configuration" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Runtime.Serialization">
      <RequiredTargetFramework>3.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
    <Reference Include="WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsBase.dll</HintPath>
    </Reference>
    <Reference Include="Xtensive.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Core.Aspects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Core.Weaver, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\ReferenceAssemblies\DataObjects.Net\Bin\Latest\Xtensive.Core.Weaver.dll</HintPath>
    </Reference>
    <Reference Include="Xtensive.Indexing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Integrity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Modelling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Sql.SqlServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Storage, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Storage.Indexing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Storage.Indexing.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Storage.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Storage.Providers.Sql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />
    <Reference Include="Xtensive.Storage.Rse, Version=1.0.0.0, Culture=neutral, PublicKeyToken=93a6c53d77a5296c, processorArchitecture=MSIL" />

PostSharp is not installed separately.

Thank you in advance for your assistance.


Updated at 25.02.2010 18:00:00

Never mind...I got it. My exe had to have the same persistent attribute and proj additions as my data assembly. thanks

This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by JeffN.

asked Feb 25 '10 at 17:17

Editor's gravatar image

Editor
46154156157

Ok - thanks for not making me thinking about possible cause of the issue ;)

(Feb 25 '10 at 17:17) Alex Yakunin Alex%20Yakunin's gravatar image
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×573

Asked: Feb 25 '10 at 17:17

Seen: 3,328 times

Last updated: Feb 25 '10 at 17:17

powered by OSQA