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
Convert projects to .NET SDK Format #1710
Conversation
cc @jageall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some feedback, using default and .net core sdk (instead of mono to compile) make it a lot easier to upgrade later to multitargeting
@@ -222,7 +222,13 @@ function buildEventStore { | |||
patchVersionFiles | |||
patchVersionInfo | |||
rm -rf bin/ | |||
xbuild src/EventStore.sln /p:Platform="Any CPU" /p:DefineConstants="$DEFINES" /p:Configuration="$CONFIGURATION" || err | |||
msbuild \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use .net core sdk to build also net461
.
so in the build script you can use dotnet build
, dotnet pack
, etc. who are easier to use (and same command line experience for users).
That also mean you dont need to use msbuild
of mono for compiling, so you can use mono just as runtime.
It make it easier to upgrade (the .net sdk can be installed side by side, easier to upgrade and pin with a global.json
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @enricosada! Thanks for looking over this and providing feedback. We're actually using dotnet msbuild
at the moment internally, but the build scripts are due for a rewrite once the rest of the cleanup work is done, so that hasn't been ported into the old ones yet (the change you are commenting on will not be in the eventual version of this pull request).
The only slightly weird thing appears to be that to build with Mono it is necessary to set FrameworkPathOverrides
(or something similar, I forget the exact variable and am on a Windows box right now so don't have it in history).
Ultimately we want to fit into the "standard" .NET workflow as much as possible given the native dependencies.
<TargetFramework>net46</TargetFramework> | ||
<Platform>x64</Platform> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<OutputPath>..\..\bin\tests\</OutputPath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that make a lot harder to run dotnt test
with multitargeting (useful later to test both net461
and netcoreapp
)
using dontet test
is easier also from command line and build scripts, no need to use custom test runner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mostly legacy from the current build scripts, and will be changed as per your comment.
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<OutputPath>..\..\bin\tests\</OutputPath> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new mono support portable
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, interesting - we should likely switch to use that.
<Optimize>false</Optimize> | ||
<TargetFramework>net46</TargetFramework> | ||
<Platform>x64</Platform> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<OutputPath>..\..\bin\intermediate\</OutputPath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing like that make use of multitargeting a lot harder later.
new sdk use bin/{Configuration}/{tfm}
to make it easier to do incremental build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 - This is left over from the previous build script set and was ported over - it should be fixed reasonably shortly.
Thanks for the feedback @enricosada! As the replies to individual comments hopefully show, you've caught things in an intermediate state right now - we're moving in the direction that you are advocating for and will be there before this is merged. Right now there are a few other pieces of cleanup to do first in order to remove compile-time platform detection, and then I'm going to fix up these bits. |
@jen20 sure! 👍 to the work |
d257431
to
071e8dc
Compare
Removes some files not included in the existing projects - EventStore.Core.Tests/Index/IndexV3/table_index_hash_collision_when_upgrading_to_64bit.cs - EventStore.Projections.Core.Tests/ClientAPI/when_handling_created/with_from_all_any_foreach_projection/when_running_and_events_are_indexed.cs - EventStore.Projections.Core.Tests/ClientAPI/when_handling_deleted/with_from_all_any_foreach_projection/when_running_and_events_are_indexed.cs - EventStore.TestClient/Commands/RunTestScenarios/ProjGenerateSampleData.cs - EventStore.TestClient/Commands/RunTestScenarios/ProjectionsScenario1.cs
This commit uses msbuild in preference to xbuild on *nix systems. We also call the restore target prior to the compile target.
- moved Eventstore.Rags under src - dependencies are now pulled from myget feed
- Pin version of mono to be installed to 5.16 on OS X - Pin version of mono to be installed to 5.16 on Centos 7 image Co-authored-by: Avish Cheetaram <avishcheetaram.ai@gmail.com>
06d0b4f
to
a058235
Compare
74e1ff5
to
a433f9d
Compare
…e timeouts on EmbeddedClient
…to concurrent access issues when EmbeddedClient subscribes to the node's MainBus) This should not cause any performance issue since subscribing/unsubscribing is usually only done at initialization/shutdown time.
…3 = 24s, queryTimeout = 20s)
584ece5
to
74f291c
Compare
Add links to projection library build instructions Add instructions to build UI Add Azure Pipelines status badge Remove outdated information
8c5bf92
to
b4511fa
Compare
This is intended to supersede #1703 and add in the changes necessary to get our current CI process going again. It may take in some other PRs over time too.