Skip to content

Commit

Permalink
Merge pull request #90 from DynamicsValue/feature/26-updates
Browse files Browse the repository at this point in the history
Feature/26 updates
  • Loading branch information
jordimontana82 authored Sep 18, 2024
2 parents bade4dc + d4de596 commit 57ccf1c
Show file tree
Hide file tree
Showing 15 changed files with 252 additions and 379 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI-PullRequest-2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: dotnet nuget enable source github

- name: Build
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFramework 'all'
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all'
env:
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

### Changed

- **BREAKING CHANGE**: This will **only** affect you if you use XrmRealContext class. Moved XrmRealContext to a separate FakeXrmEasy.Integration package to remove dependency on XrmTooling - https://github.com/DynamicsValue/fake-xrm-easy/issues/160
- Resolves an issue in FetchXml queries when using arithmetic values and no early bound assemblies are used. It will now read from injected metadata in absence of proxy type assemblies - https://github.com/DynamicsValue/fake-xrm-easy/issues/158
- Resolves issue in MetadataGenerator where relationship properties were generated in the wrong order, also generates ManyToMany relationship properties - https://github.com/DynamicsValue/fake-xrm-easy/issues/135
- Adds implementation of RelatedEntities in Update message , before it was implemented only for Create - https://github.com/DynamicsValue/fake-xrm-easy/issues/154
Expand Down
8 changes: 4 additions & 4 deletions FakeXrmEasy.Core.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataverseEntities", "tests\
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
FAKE_XRM_EASY_9|Any CPU = FAKE_XRM_EASY_9|Any CPU
FAKE_XRM_EASY_9|x64 = FAKE_XRM_EASY_9|x64
FAKE_XRM_EASY_9|x86 = FAKE_XRM_EASY_9|x86
FAKE_XRM_EASY_9|Any CPU = FAKE_XRM_EASY_9|Any CPU
FAKE_XRM_EASY_9|x64 = FAKE_XRM_EASY_9|x64
FAKE_XRM_EASY_9|x86 = FAKE_XRM_EASY_9|x86
FAKE_XRM_EASY_2013|Any CPU = FAKE_XRM_EASY_2013|Any CPU
FAKE_XRM_EASY_2013|x64 = FAKE_XRM_EASY_2013|x64
FAKE_XRM_EASY_2013|x86 = FAKE_XRM_EASY_2013|x86
Expand All @@ -46,7 +46,7 @@ Global
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x64.ActiveCfg = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x64.Build.0 = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x86.ActiveCfg = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x86.Build.0 = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_9|x86.Build.0 = FAKE_XRM_EASY_9|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_2013|Any CPU.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_2013|Any CPU.Build.0 = FAKE_XRM_EASY_2013|Any CPU
{CE7EE93C-E98A-4AE7-AE84-B4FA7CEB49FE}.FAKE_XRM_EASY_2013|x64.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU
Expand Down
8 changes: 4 additions & 4 deletions pack-configuration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ if($targetFrameworks -eq "all")
{
if($versionSuffix -eq "")
{
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -o $tempNupkgFolder $projectPath/$projectName.csproj
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:IsPacking="true" -o $tempNupkgFolder $projectPath/$projectName.csproj
}
else {
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -o $tempNupkgFolder $projectPath/$projectName.csproj --version-suffix $versionSuffix
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:IsPacking="true" -o $tempNupkgFolder $projectPath/$projectName.csproj --version-suffix $versionSuffix
}
}
else
{
if($versionSuffix -eq "")
{
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:TargetFrameworks=$targetFrameworks -o $tempNupkgFolder $projectPath/$projectName.csproj
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:IsPacking="true" -p:TargetFrameworks=$targetFrameworks -o $tempNupkgFolder $projectPath/$projectName.csproj
}
else {
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:TargetFrameworks=$targetFrameworks -o $tempNupkgFolder $projectPath/$projectName.csproj --version-suffix $versionSuffix
dotnet pack --no-build --configuration $configuration -p:PackageID=$packageId -p:Title=$packageId -p:PackTests=$packTests -p:IsPacking="true" -p:TargetFrameworks=$targetFrameworks -o $tempNupkgFolder $projectPath/$projectName.csproj --version-suffix $versionSuffix
}
}

Expand Down
29 changes: 29 additions & 0 deletions pack-src-project.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
param (
[string]$versionSuffix = "",
[string]$targetFrameworks = "netcoreapp3.1",
[string]$packageIdPrefix = "",
[string]$projectName = "",
[string]$projectPath = ""
)

Write-Host "Running with versionSuffix '$($versionSuffix)'..."

$tempNupkgFolder = './nupkgs'

Write-Host "Packing All Configurations for project $($projectName)" -ForegroundColor Green

if($targetFrameworks -eq "netcoreapp3.1")
{
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_9"
}
else {
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2013"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2015"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2016"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_9"
}

Write-Host "Pack Succeeded :)" -ForegroundColor Green
14 changes: 1 addition & 13 deletions pack-src.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ $projectPath = "src/FakeXrmEasy.Core"

Write-Host "Packing All Configurations for project $($projectName)" -ForegroundColor Green

if($targetFrameworks -eq "netcoreapp3.1")
{
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_9"
}
else {
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2013"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2015"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_2016"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -configuration "FAKE_XRM_EASY_9"
}
./pack-src-project.ps1 -targetFrameworks $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix

Write-Host "Pack Succeeded :)" -ForegroundColor Green
29 changes: 29 additions & 0 deletions pack-tests-project.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
param (
[string]$versionSuffix = "",
[string]$targetFrameworks = "netcoreapp3.1",
[string]$packageIdPrefix = "",
[string]$projectName = "",
[string]$projectPath = ""
)

Write-Host "Running with versionSuffix '$($versionSuffix)'..."

$tempNupkgFolder = './nupkgs'

Write-Host "Packing All Configurations for project $($projectName)" -ForegroundColor Green

if($targetFrameworks -eq "netcoreapp3.1")
{
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_9"
}
else {
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2013"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2015"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2016"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_9"
}

Write-Host "Pack Succeeded :)" -ForegroundColor Green
14 changes: 1 addition & 13 deletions pack-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ $projectPath = "tests/FakeXrmEasy.Core.Tests"

Write-Host "Packing All Configurations for project $($projectName)" -ForegroundColor Green

if($targetFrameworks -eq "netcoreapp3.1")
{
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_9"
}
else {
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2013"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2015"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_2016"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_365"
./pack-configuration.ps1 -targetFramework $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix -packTests "true" -configuration "FAKE_XRM_EASY_9"
}
./pack-tests-project.ps1 -targetFrameworks $targetFrameworks -projectName $projectName -projectPath $projectPath -packageIdPrefix $packageIdPrefix -versionSuffix $versionSuffix

Write-Host "Pack Succeeded :)" -ForegroundColor Green
2 changes: 1 addition & 1 deletion push.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
param (
[string]$packageSource = "local-packages",
[string]$packagePrefix = "FakeXrmEasy.Abstractions"
[string]$packagePrefix = "FakeXrmEasy.Core"
)

Write-Host "Running with packageSource '$($packageSource)'..."
Expand Down
5 changes: 0 additions & 5 deletions src/FakeXrmEasy.Core/FakeXrmEasy.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,23 @@

<ItemGroup Condition="'$(TargetFramework)' == 'net462' And '$(Configuration)'=='FAKE_XRM_EASY_9'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies" Version="9.0.2.52" />
<PackageReference Include="Microsoft.CrmSdk.XrmTooling.CoreAssembly" Version="9.1.1.45" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' And '$(Configuration)'=='FAKE_XRM_EASY_365'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies" Version="[8.2.0.2,9.0)" />
<PackageReference Include="Microsoft.CrmSdk.XrmTooling.CoreAssembly" Version="[8.2.0.1,9.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452' And '$(Configuration)'=='FAKE_XRM_EASY_365'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies" Version="[8.2.0.1,9.0)" />
<PackageReference Include="Microsoft.CrmSdk.XrmTooling.CoreAssembly" Version="[8.2.0.1,9.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452' And '$(Configuration)'=='FAKE_XRM_EASY_2016'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies" Version="[8.1.0.2,8.2)" />
<PackageReference Include="Microsoft.CrmSdk.XrmTooling.CoreAssembly" Version="[8.1.0.2,8.2)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452' And '$(Configuration)'=='FAKE_XRM_EASY_2015'">
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies" Version="[7.1.1,8.0)" />
<PackageReference Include="Microsoft.CrmSdk.Extensions" Version="[7.1.0.1,8.0)" />
<PackageReference Include="Microsoft.CrmSdk.XrmTooling.CoreAssembly" Version="[7.0.0.1,8.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452' And '$(Configuration)'=='FAKE_XRM_EASY_2013'">
Expand Down
7 changes: 7 additions & 0 deletions src/FakeXrmEasy.Core/FileStorage/FileStorageSettings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace FakeXrmEasy.Core.FileStorage
{
/// <summary>
/// Sets default file and image storage settings
/// </summary>
public interface IFileStorageSettings
{
/// <summary>
Expand All @@ -12,6 +15,10 @@ public interface IFileStorageSettings
/// </summary>
int ImageMaxSizeInKB { get; set; }
}

/// <summary>
/// Sets default file and image storage settings
/// </summary>
public class FileStorageSettings: IFileStorageSettings
{

Expand Down
Loading

0 comments on commit 57ccf1c

Please sign in to comment.