-
Notifications
You must be signed in to change notification settings - Fork 48
[CodeGen] Support net6+ on server #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Daniel-Svensson
merged 232 commits into
OpenRIAServices:main
from
lindellhugo:feature/assembly_load_context
Jun 20, 2023
Merged
Changes from all commits
Commits
Show all changes
232 commits
Select commit
Hold shift + click to select a range
aff18a7
Build for EFCore 6 for net6
lindellhugo 41ff8bc
Fix license
lindellhugo 8fe35a1
Replace obsolete IsDependentToPrincipal with IsOnDependent
lindellhugo abe98d1
Replace more obsolete properties
lindellhugo beeadb2
If def depending on netstandard or net 6
lindellhugo 419ca1c
Remove design
lindellhugo ce8c5d0
Added more ifdef
lindellhugo 2f820ba
Cover all cases for type descriptor
lindellhugo 3016878
Codegen using net 6
lindellhugo 01e6de0
Delete OpenRiaServices - Backup.Server.EntityFrameworkCore.csproj
lindellhugo 0aa659c
Merge branch 'feature/build_EFCore_for_net6' into feature/code_gen_us…
lindellhugo d3c2e1b
Add back removed code with comments
lindellhugo eac1ee4
WIP
lindellhugo 28b4f07
Merge main
lindellhugo b41325c
WIP
lindellhugo 2d556dd
WIP Run tests in net 6 to get correct asembly
lindellhugo 43a3c8a
Make it build using net 6
lindellhugo 8427d79
Fix
lindellhugo 5a311ba
Make OpenRia.Services.Tools.Test
lindellhugo 23a6a09
WIP
lindellhugo f8e871e
Test
lindellhugo b233d06
Data annotations
lindellhugo 7662c9a
Make build work
lindellhugo bc471f8
WIP
lindellhugo a02e00f
Build engine is not supported for Net6
lindellhugo 3f1b786
Fix cecil path
lindellhugo c1b0ee5
Comments
lindellhugo e493e57
Fix so we can run net 6
lindellhugo b84dd5c
Make more project build in two types
lindellhugo b2a9f81
Assebly fix
lindellhugo a24376b
Fix test
lindellhugo c2a2956
Fix some test by adding back BuildEngine
lindellhugo 9203d34
Missing build engine task
lindellhugo e27f81b
Fix build helper framworkj
lindellhugo 6d26f07
WIP
lindellhugo cf468d3
WIP
lindellhugo e91053c
More tests works
lindellhugo b5d1abf
WIP Dual Compile
lindellhugo c422f88
Make server test build
lindellhugo f224ae6
Merge
lindellhugo 5f27b1e
MErge
lindellhugo e2a7a3c
Builds fixes
lindellhugo 99dbd8d
Do not use reflection only in net 6
lindellhugo 1e7cf17
Add test for net6
lindellhugo f294879
Assert net 6
lindellhugo 0e2b742
Test for server project works
lindellhugo bbde6ba
Fix net6
lindellhugo de01c8a
Fails on .exe
lindellhugo dde624a
WIP
lindellhugo e4c4653
some compile fixes
Daniel-Svensson 17e0789
try resolving assemblies "smarter"
Daniel-Svensson caf2cb9
Fix build
lindellhugo 28842cc
Register msbuild instance
Daniel-Svensson 120551c
update GetReferenceAssemblies
Daniel-Svensson 1f0bba0
fix msbuild resolver
Daniel-Svensson 75b9a84
Merge branch 'feature/assembly_load_context' of https://github.com/li…
lindellhugo cc0de94
WIP
lindellhugo e840bc2
Revert cecil
lindellhugo aa7994e
Migrate to net 7
lindellhugo 98cdd02
Composition 7
lindellhugo 4b5d48b
Use EF 7
lindellhugo bc61c7e
Fix bug
lindellhugo 4cbfbba
Use net 7.0 in test
lindellhugo a47093f
Lägg till msbuildlog loggning i GetReferenceAssemblies
Daniel-Svensson d294920
Use assembly references for resolving and use common build version
lindellhugo f3db00c
Fixa "GetReferenceAssemblies"
Daniel-Svensson 1b75a74
use new helper even om net4
Daniel-Svensson a498086
use metadataloadcontext in assemblygenerator AssemblyGenerator
Daniel-Svensson d137ed3
WIP
lindellhugo 94beae2
Merge branch 'feature/assembly_load_context' of https://github.com/li…
lindellhugo ac9ecdf
The TS test is passing
lindellhugo d9d7103
Merge main
lindellhugo eace5bf
Fix nuspec
lindellhugo af23571
Remove
lindellhugo b88fc19
Fix query stri ng
lindellhugo 066ccf9
Remove PDB
lindellhugo 6a7b966
Fix merge
lindellhugo ce1759c
Fiz
lindellhugo 4cbe759
WIP
lindellhugo c191d1d
Started cleaning of branch
lindellhugo 6496adc
Revert
lindellhugo 986f2c7
WIP
lindellhugo 0d52b99
Revert to net 6
lindellhugo 207be6e
Revert AspNet to Net6
lindellhugo c199d4a
Revert
lindellhugo 7863eb5
Revert
lindellhugo b3b81c9
Revert
lindellhugo 377600b
Do not include sample project
lindellhugo afbfa24
Make tools build
lindellhugo ce16ab3
Revert client
lindellhugo c497bf9
Make tests run 6.0
lindellhugo 8966bd4
Run test only for net framework
lindellhugo 42e64a1
Revert config
lindellhugo ca3a609
Use NETFRAMEWORK
lindellhugo 9b7bb56
If-def sandboxer
lindellhugo 0f62670
Builds
lindellhugo fc3da00
Add back
lindellhugo e2f1978
Revert
lindellhugo 0c350a1
Revert LinqToSql
lindellhugo 1de8095
Revert EFCore to net 6
lindellhugo d41669d
Revert
lindellhugo ed228d5
NEt 6
lindellhugo a2b2e28
Revert
lindellhugo fdc8841
Revert
lindellhugo 9f4e1ab
Revert
lindellhugo a7e1158
Fix net 472 tests
lindellhugo b88bae6
Fixes for MetaDataLoadContext
lindellhugo 6197880
Net 472 tests for tools works
lindellhugo a29c355
All 4.72 tests pass but still an issue with the attributes
lindellhugo 25977fe
Remove assert
lindellhugo 711ddc0
Merge main
lindellhugo 3e1f547
Fix test
lindellhugo 6b85726
FIX VB failing project, only 29 left in net 7
lindellhugo ede8650
CodeProcessor attribute is not supported
lindellhugo b4574a0
Fix logging messages
lindellhugo fea3da2
Fix validation since messages are different for Net6
lindellhugo 0f6a68b
WIP - 25 test failing
lindellhugo 227f394
WIP - 25 test left, we will have problems with types due to MetaDataL…
lindellhugo 574c791
Fix constructor
lindellhugo 4cb96b3
Fix complete test
lindellhugo 92d39e6
Use not hard coded directory
lindellhugo 0e618c9
Remove hardcoded path
lindellhugo a8fedcf
ScaffoldTableAttribute
lindellhugo b510dcd
Fix
lindellhugo 5d9439e
Clean up
lindellhugo 6232c01
Remove not used code
lindellhugo a7942e8
Use net 6
lindellhugo 1f62723
Use 200
lindellhugo 7c7bf4a
Add codegen project
lindellhugo efc384d
Fix build#
lindellhugo c10fd90
Revert code processor
lindellhugo 2a9ae25
Fixes
lindellhugo 8a69cbc
Added code for the console app
lindellhugo f5cc999
Replace !NET6_0_OR_GREATER => NETFRAMEWORK
lindellhugo 21be150
Review fixes
lindellhugo d768fea
Fixes
lindellhugo ce81f18
wip
lindellhugo 891f1dc
Add Ignore to tests failing in net6
lindellhugo 9839f9d
Revert
lindellhugo 2653308
Merge branch 'feature/assembly_load_context' of https://github.com/li…
lindellhugo b21600c
Added Ignore
lindellhugo 951bcc9
Send parameters through console program
lindellhugo ba433e0
Fix build and tests
lindellhugo bafc28d
WIP sending commands to command logger
lindellhugo 76cac7f
Pass parameters to code generator
lindellhugo b8548fd
Move more parameters to the console app.
lindellhugo 0519946
Add more parameters
lindellhugo 63108a2
Can send parameters#
lindellhugo dfb48ad
Can run codegen through Console
lindellhugo 16863bf
Debug with command line arguments
lindellhugo 124e907
Fix code gen ref
lindellhugo 01584f3
Fix post build script#
lindellhugo 1a22c0a
All tests ok
lindellhugo b1b5c3e
Not needed change
lindellhugo afe3621
Remove backslash
lindellhugo be6aa18
Use xcopy
lindellhugo 652b9d7
Log more output to console
Daniel-Svensson 6012abb
Added references, more logging and start process with ProcessStartInfo
SandstromErik 276e5e4
Fix clean compilation of ClientClassLib
Daniel-Svensson 04a16e6
A small fix for IsNetFramework
Daniel-Svensson 08e31a9
Use Microsoft.Build.Locator in console app
Daniel-Svensson c2e4a2b
Use net 6.0
lindellhugo e5db68f
Run codegen on latest availible runtime
Daniel-Svensson a5dedb3
Make sure to read .dll instead of .exe of server project
Daniel-Svensson 1634b53
Setting for debugging child processes
SandstromErik 4e8ceb5
Enable loading of aspnetcore assemblies
Daniel-Svensson 8bd7e4f
Merge remote-tracking branch 'upstream/main' into feature/assembly_lo…
Daniel-Svensson 83e1256
Only use default AssemblyLoadContext in console app
Daniel-Svensson 9bd6bcc
CreateRIA60_TS is green !
Daniel-Svensson 0cf7419
Update nuspec files
Daniel-Svensson 9611194
run more tests which now works
Daniel-Svensson b38211f
remove AppDomainUtilities since we don't do read only reflection anymore
Daniel-Svensson 2db4077
IsNetFramework -> IsServerProjectNetFramework and simplify
Daniel-Svensson 9fc6236
cleanup
Daniel-Svensson 991a85e
more cleanup
Daniel-Svensson 43ae0e2
Delete launchSettings.json
Daniel-Svensson a0f9b05
equals instead of compare agains 0
Daniel-Svensson ed57422
Cleanup after comments
SandstromErik 12e6f9b
Remove SandBoxer
SandstromErik f2e2415
remove MEDIUM_TRUST specific code
Daniel-Svensson 85c9f08
remove project reference
Daniel-Svensson 8413d76
Fix AreTypes equal
Daniel-Svensson 2b15e37
remove some more code
Daniel-Svensson 3c8cb13
more cleanup
Daniel-Svensson 77fdb45
Remove binary formatter
SandstromErik 5152f20
Add CrossProcess logger based on pipes
Daniel-Svensson bdd3909
obsolete unused property
Daniel-Svensson b180abc
logg update
Daniel-Svensson c517dd2
Working cross process logger
Daniel-Svensson 341d4b7
fix build
SandstromErik c16aa5a
move binders to console project and use temp file for arguments
Daniel-Svensson 3d99da6
Fix paremeter passing
Daniel-Svensson 32c4abf
Enable usage of "dotnet build" compatible task
Daniel-Svensson b62cddc
Change comment to remove compilation warning
Daniel-Svensson e7d7fcb
Move assemblyloadcontext code away from ClientCodeGenerationDispatcher
Daniel-Svensson ae9acac
Refactor code to avoid loading assemblies
Daniel-Svensson e68ba96
Fix warning about ordering of "+"
Daniel-Svensson bc7d7dc
Fix t4 nuspec
SandstromErik 5142296
Log exitcode when not 0 and dont delete file with arguments
SandstromErik 01c16b6
suppress obsolete warnings in tools
Daniel-Svensson 5e36e9f
Use EscapeUriString=> EscapeDataString and minor fixes
Daniel-Svensson bbbf301
undo uncommenting of test file
Daniel-Svensson caf43b6
maybe fix analyzer comment
Daniel-Svensson e925eb3
Fix NotificationMethodGeneratorTest
Daniel-Svensson 3f348fe
use HAS_LINQ2SQL for T4 template and avoid creating Attribute builder…
Daniel-Svensson 3b0d064
Codegen speed: Dont create attribute builders for OpenRiaServicesAttr…
Daniel-Svensson 090e733
NotificationMethodGeneratorTest update
Daniel-Svensson b8ded25
Some fixes
SandstromErik 11484c7
Summary for param logger
SandstromErik ed31987
Fix code analysis varnings
Daniel-Svensson 46deba6
remove UnitTestTraceListener
Daniel-Svensson 8602e12
remove UnitTestTraceListener
Daniel-Svensson 93eb28a
Minor test fixes
Daniel-Svensson 0240770
update version of mstest and Microsoft.NET.Test.Sdk
Daniel-Svensson 5a4ccd6
remove VB reference from .NET in tests again
Daniel-Svensson c36cded
Stop ignoring some tests for net6 and some refactoring
SandstromErik 15c92b7
Add testhost.dll.config
SandstromErik bea9fa8
cleanup deployment item
Daniel-Svensson 1f77b9f
Downgrade MSTest to 2.2.1
Daniel-Svensson cff3220
Use ClientClassLib as reference for code generation since it has net6…
Daniel-Svensson a000bb7
Fix a few codegen tests for net6
Daniel-Svensson 9fdbb04
suppress varnings about 'AssociationAttribute' being obsolete
Daniel-Svensson fe259e3
Change before netstandard2 so it is used in tests
Daniel-Svensson c75e390
Fixes for tests
Daniel-Svensson 37e0d9f
Improve MockSharedCodeServcie
Daniel-Svensson cd1aaab
Fix MockSharedCodeService fix - it did not work with net framework
Daniel-Svensson 1b8bf8c
use NETFRAMEWORK instead of !NET6
SandstromErik 888b557
Another one
SandstromErik cd20bd2
Fixed comments
SandstromErik ccd3e7d
remove some todo and fix analyser varning
Daniel-Svensson 9f23695
Fix todo and codesmell
SandstromErik 472275d
disable test for .NET 6
Daniel-Svensson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/OpenRiaServices.Tools.CodeGenTask/ClientCodeGenerationOptionsBinder.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System.CommandLine; | ||
using System.CommandLine.Binding; | ||
|
||
namespace OpenRiaServices.Tools.CodeGenTask; | ||
|
||
/// <summary> | ||
/// Binder class for <see cref="ClientCodeGenerationOptions"/>. Used to bind arguments to handlers | ||
/// </summary> | ||
public class ClientCodeGenerationOptionsBinder : BinderBase<ClientCodeGenerationOptions> | ||
{ | ||
private readonly Option<string> _language; | ||
private readonly Option<string> _clientFrameworkPath; | ||
private readonly Option<string> _serverProjectPath; | ||
private readonly Option<string> _clientProjectPath; | ||
private readonly Option<string> _clientRootNamespace; | ||
private readonly Option<string> _serverRootNamespace; | ||
private readonly Option<bool> _isApplicationContextGenerationEnabled; | ||
private readonly Option<TargetPlatform> _clientProjectTargetPlatform; | ||
private readonly Option<bool> _useFullTypeNames; | ||
|
||
/// <summary> | ||
/// Constructor that sets all arguments | ||
/// </summary> | ||
public ClientCodeGenerationOptionsBinder(Option<string> language, Option<string> clientFrameworkPath, Option<string> serverProjectPath, Option<string> clientProjectPath, Option<string> clientRootNamespace, Option<string> serverRootNamespace, Option<bool> isApplicationContextGenerationEnabled, Option<TargetPlatform> clientProjectTargetPlatform, Option<bool> useFullTypeNames) | ||
{ | ||
_language = language; | ||
_clientFrameworkPath = clientFrameworkPath; | ||
_serverProjectPath = serverProjectPath; | ||
_clientProjectPath = clientProjectPath; | ||
_clientRootNamespace = clientRootNamespace; | ||
_serverRootNamespace = serverRootNamespace; | ||
_isApplicationContextGenerationEnabled = isApplicationContextGenerationEnabled; | ||
_clientProjectTargetPlatform = clientProjectTargetPlatform; | ||
_useFullTypeNames = useFullTypeNames; | ||
} | ||
|
||
/// <summary> | ||
/// Parse result in binding context to create and return <see cref="ClientCodeGenerationOptions"/> | ||
/// </summary> | ||
protected override ClientCodeGenerationOptions GetBoundValue(BindingContext bindingContext) | ||
{ | ||
return new ClientCodeGenerationOptions | ||
{ | ||
Language = bindingContext.ParseResult.GetValueForOption(_language), | ||
ClientFrameworkPath = bindingContext.ParseResult.GetValueForOption(_clientFrameworkPath), | ||
ServerProjectPath = bindingContext.ParseResult.GetValueForOption(_serverProjectPath), | ||
ClientProjectPath = bindingContext.ParseResult.GetValueForOption(_clientProjectPath), | ||
ClientRootNamespace = bindingContext.ParseResult.GetValueForOption(_clientRootNamespace), | ||
ServerRootNamespace = bindingContext.ParseResult.GetValueForOption(_serverRootNamespace), | ||
IsApplicationContextGenerationEnabled = bindingContext.ParseResult.GetValueForOption(_isApplicationContextGenerationEnabled), | ||
ClientProjectTargetPlatform = bindingContext.ParseResult.GetValueForOption(_clientProjectTargetPlatform), | ||
UseFullTypeNames = bindingContext.ParseResult.GetValueForOption(_useFullTypeNames), | ||
}; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.