Skip to content

Commit

Permalink
Fixed MscrmTools#2 InvalidOperationException: Sequence contains no el…
Browse files Browse the repository at this point in the history
…ements
  • Loading branch information
MscrmTools committed Apr 28, 2017
1 parent dfe8198 commit 34a0e7f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
3 changes: 3 additions & 0 deletions MsCrmTools.UserSettingsUtility.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(CodealikeProperties) = postSolution
SolutionGuid = 4ddf6272-f732-4d08-b044-fdb6bcb5e430
EndGlobalSection
EndGlobal
7 changes: 6 additions & 1 deletion MsCrmTools.UserSettingsUtility/AppCode/UserSettingsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ public void UpdateSettings(Guid userId, UserSettings settings)
Values = { userId },
});

var record = records.Entities.First();
var record = records.Entities.FirstOrDefault();

if (record == null)
{
return;
}

if (settings.AdvancedFindStartupMode >= 1)
record["advancedfindstartupmode"] = settings.AdvancedFindStartupMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="McTools.Xrm.Connection, Version=1.2017.4.13, Culture=neutral, PublicKeyToken=96037217801d9658, processorArchitecture=MSIL">
<HintPath>..\packages\MscrmTools.Xrm.Connection.1.2017.4.13\lib\net452\McTools.Xrm.Connection.dll</HintPath>
<Reference Include="McTools.Xrm.Connection, Version=1.2017.2.12, Culture=neutral, PublicKeyToken=96037217801d9658, processorArchitecture=MSIL">
<HintPath>..\packages\MscrmTools.Xrm.Connection.1.2017.2.12\lib\net452\McTools.Xrm.Connection.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="McTools.Xrm.Connection.WinForms, Version=1.2017.4.13, Culture=neutral, PublicKeyToken=f1559f79cf894e27, processorArchitecture=MSIL">
<HintPath>..\packages\MscrmTools.Xrm.Connection.1.2017.4.13\lib\net452\McTools.Xrm.Connection.WinForms.dll</HintPath>
<Reference Include="McTools.Xrm.Connection.WinForms, Version=1.2017.2.12, Culture=neutral, PublicKeyToken=f1559f79cf894e27, processorArchitecture=MSIL">
<HintPath>..\packages\MscrmTools.Xrm.Connection.1.2017.2.12\lib\net452\McTools.Xrm.Connection.WinForms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Crm.Sdk.Proxy, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CrmSdk.CoreAssemblies.8.2.0\lib\net45\Microsoft.Crm.Sdk.Proxy.dll</HintPath>
Expand Down Expand Up @@ -93,7 +95,8 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Xrm.Tooling.Connector, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CrmSdk.XrmTooling.CoreAssembly.8.2.0.5\lib\net452\Microsoft.Xrm.Tooling.Connector.dll</HintPath>
<HintPath>..\packages\Microsoft.CrmSdk.XrmTooling.CoreAssembly.8.2.0.2\lib\net452\Microsoft.Xrm.Tooling.Connector.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
Expand Down Expand Up @@ -130,12 +133,15 @@
<Reference Include="System.Xml" />
<Reference Include="XrmToolBox, Version=1.2017.3.14, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\XrmToolBoxPackage.1.2017.3.14\lib\net452\XrmToolBox.exe</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XrmToolBox.Extensibility, Version=1.2017.2.7, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\XrmToolBoxPackage.1.2017.3.14\lib\net452\XrmToolBox.Extensibility.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="XrmToolBox.PluginsStore, Version=1.2017.1.4, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\XrmToolBoxPackage.1.2017.3.14\lib\net452\XrmToolBox.PluginsStore.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -192,7 +198,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_ConfigurationName="Release" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.YearStamp.MonthStamp.DayStamp" />
<UserProperties BuildVersion_BuildVersioningStyle="None.YearStamp.MonthStamp.DayStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_ConfigurationName="Release" />
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions MsCrmTools.UserSettingsUtility/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2017.4.28")]
[assembly: AssemblyFileVersion("1.2017.4.28")]
[assembly: AssemblyVersion("1.2017.4.2")]
[assembly: AssemblyFileVersion("1.2017.4.2")]
2 changes: 1 addition & 1 deletion MsCrmTools.UserSettingsUtility/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="McTools.Xrm.Connection.WinForms" publicKeyToken="f1559f79cf894e27" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2017.4.13" newVersion="1.2017.4.13" />
<bindingRedirect oldVersion="0.0.0.0-1.2017.2.12" newVersion="1.2017.2.12" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="McTools.Xrm.Connection" publicKeyToken="96037217801d9658" culture="neutral" />
Expand Down
4 changes: 2 additions & 2 deletions MsCrmTools.UserSettingsUtility/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<package id="Microsoft.CrmSdk.CoreAssemblies" version="8.2.0" targetFramework="net452" />
<package id="Microsoft.CrmSdk.Deployment" version="8.2.0" targetFramework="net452" />
<package id="Microsoft.CrmSdk.Workflow" version="8.2.0" targetFramework="net452" />
<package id="Microsoft.CrmSdk.XrmTooling.CoreAssembly" version="8.2.0.5" targetFramework="net452" />
<package id="Microsoft.CrmSdk.XrmTooling.CoreAssembly" version="8.2.0.2" targetFramework="net452" />
<package id="Microsoft.IdentityModel" version="6.1.7600.16394" targetFramework="net452" />
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.24.304111323" targetFramework="net452" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net452" />
<package id="MscrmTools.Xrm.Connection" version="1.2017.4.13" targetFramework="net452" />
<package id="MscrmTools.Xrm.Connection" version="1.2017.2.12" targetFramework="net452" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
<package id="NuGet.Core" version="2.12.0" targetFramework="net452" />
<package id="XrmToolBoxPackage" version="1.2017.3.14" targetFramework="net452" />
Expand Down

0 comments on commit 34a0e7f

Please sign in to comment.