-
Notifications
You must be signed in to change notification settings - Fork 545
Convert the .NET library to the .NET SDK format #451
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
Conversation
Thank you for the PR. Since this is disabling builds on VS2015 (which are very important for CI) and is also touching the installer, I will not be able to merge your PR for the upcoming The major change in the release after The work for the release that will become version 2.0 of WinFsp is currently in the private branch pvt-sxs. I would advise against rebasing your work against that branch just yet: although the work on it is mostly complete I may still move things around. My current plan is to release Caveat: it is very important that we find a solution for building on VS2015, because it is used for CI. I faced the same problem of VS2015 not supporting new features when I ported WinFsp to ARM64. I ended up writing the custom script |
Thank you for the feedback, CI should work now. For the VS 2015 build I wrote a script to exclude anything that matches |
WinFsp 2022.2 (v1.12) has now been released. As previously discussed I am looking to merge your PR into the current master branch which will be released as WinFsp 2023 Beta1 (v2.0B1) in the coming days. |
Disclaimer: I am not very familiar with the recent changes in the .NET Core tooling as my detailed knowledge about the .NET ecosystem dates from sometime before 2010. Therefore some of my comments may be misguided or plain wrong. My comments regarding this PR:
|
Hi, thanks for the CR
.NET Standard is basically only for libraries, which they must target so that they're compatible with a wide range of .NET versions
I was thinking of keeping Framework 3.5 only to not break existing projects, and encourage new ones to use the NuGet package Even if we ship the Standard DLL as well, .NET Core projects won't be able to use it unless developers manually install the required dependencies in their project (
Normally The .NET Core version will still need the .NET Core runtime (which no Windows version ships with, so it'd break the rule on all versions) This will need additional CI changes (for all VMs) because .NET Core .exe files aren't generated with Perhaps this can be a separate issue/PR?
Setting those properties inside the .csproj files causes the build to fail with error CS0579 (duplicate attributes)
The changes are not necessary per se, but all the properties removed are completely useless (either already defaults or don't do anything anymore). I'll work on rebase & CR changes in the next few days |
Understood.
This means that the new DLL would have to be distributed via the alternative NuGet mechanism. How does one publish a NuGet package? Would the WinFsp project need a nuget.org account and push the new DLL on every release? (Note that the WinFsp release process is already quite complex and error prone (despite attempts to automate some of it). Adding steps increases the complexity and possibility for errors.)
I agree then that we should not ship the Standard DLL, at least for now. But let's assume for a second that these required dependencies did not exist. Is shipping a DLL via the WinFsp installer something that modern .NET developers expect or can work with? FWIW I looked into what it would take to remove the cited dependencies:
Understood. We will not do this then.
I think you have completely convinced me that shipping a .NET core version of memfs-dotnet is not something we want! 😄
I was just able to change the diff --git a/build/VStudio/dotnet/winfsp.net.csproj b/build/VStudio/dotnet/winfsp.net.csproj
index 34dbc2f2..8a287ae3 100644
--- a/build/VStudio/dotnet/winfsp.net.csproj
+++ b/build/VStudio/dotnet/winfsp.net.csproj
@@ -79,4 +79,8 @@
[snipped]
+^M
+ <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">^M
+ <OutputPath>C:\Users\billziss\Projects\winfsp\build\VStudio\build\Debug\winfsp.net2</OutputPath>^M
+ </PropertyGroup>^M
[snipped]
Perhaps we can add those changes in future commits. My preference for minimal changes is because I want to be able to understand what is being changed, especially in areas where my own knowledge is lacking (like the modern .NET tooling). |
I've set Additionally, the NuGet package contains both DLLs, so even old Framework 3.5 projects that can't use the Standard DLL will be able to migrate (NuGet picks the appropriate DLL based on the project) Also as you said, NuGet properties are missing (I only set PackageId and Version)
Not really. There's no advantage to that and every other library in the project is going to be NuGet anyway
I was wrong about that, it's only BaseIntermediateOutputPath that causes problems:
Got it, I'll only keep the .csproj changes that are necessary |
Understood.
Please set them from
I think I will eventually add the new DLL to the installer as an alternative to nuget.org. For now let us proceed with the plan as is however.
When I was reorganizing the project build structure a couple of years ago, I tried to use file If the |
Thanks for the updated PR. I have some minor comments that do not require any changes on your part. I can make any necessary changes when the PR is ready for merging. Unfortunately there is a problem on CI in test
This means that the new |
BTW, I will be making a release of WinFsp 2023 Beta1 soon and we can hopefully include this PR in the next release (WinFsp 2023 Beta2). UPDATE: WinFsp 2023 Beta1 has been released. (You do not need to rebase your PR against the latest changes.) |
@Noire001 thank you very much for your contribution. It has been merged in. I have added a few commits after your PR, most importantly:
|
This PR converts the .NET library to the .NET SDK format which allows for .NET Core support (#374) .
Building it generates 2 assemblies: one that targets .NET Framework 3.5 and one that targets .NET Standard 2.0
A NuGet package is also generated. It should be published on nuget.org if this PR is merged. The NuGet version will implicitly install the required packages on .NET Core projects (System.IO.FileSystem.AccessControl and Microsoft.Win32.Registry)
For developers, this has the following effects:
dotnet build
from the CLI, independent of IDEsBefore submitting this PR please review this checklist. Ideally all checkmarks should be checked upon submitting. (Use an x inside square brackets like so: [x])