Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ba19496
Initial plan
Copilot Mar 2, 2026
36dcbdb
Remove checked-in nuspec files and convert to MSBuild properties
Copilot Mar 2, 2026
c01eba6
Changes before error encountered
Copilot Mar 2, 2026
ccbce7a
Fix package content: restore PDB entries, suppress net472 deps in Tas…
Copilot Mar 2, 2026
b22182a
Rename all PACKAGE.md files to README.md
Copilot Mar 2, 2026
08c59e3
Remove PDB files from main packages, add RemovePdbFromMainPackage target
Copilot Mar 2, 2026
a1ba6f4
Rename RemovePdbFromMainPackage target to ExcludePdbFiles for clarity
Copilot Mar 2, 2026
a30459c
Keep PDB files in symbols package only: add StripPdbFromMainPackage i…
Copilot Mar 2, 2026
837e44c
Extract StripPdbFromNupkg task to shared eng/StripPdbFromNupkg.targets
Copilot Mar 2, 2026
366d4fb
Replace StripPdbFromNupkg with two-pass pack for correct PDB handling
Copilot Mar 3, 2026
52d43d7
Address reviewer feedback: revert Directory.Packages.props, fix paths…
Copilot Mar 3, 2026
b89d49d
Add ExcludePdbFiles/CreateSymbolsPackage to EFCore.Tasks, fix Design …
Copilot Mar 3, 2026
da71ac5
Use documented pack extension points
ViktorHofer Mar 3, 2026
13cd225
Simplify EFCore.Tools
ViktorHofer Mar 3, 2026
236ac43
Fix symbols for EFCore.Tools
ViktorHofer Mar 3, 2026
fc86041
dotnet-ef.csproj
ViktorHofer Mar 3, 2026
c629829
EFCore.Tasks
ViktorHofer Mar 3, 2026
4727cb0
Add comment
ViktorHofer Mar 3, 2026
ead25ac
Remove temp change
ViktorHofer Mar 3, 2026
824aca1
Remove prop
ViktorHofer Mar 3, 2026
13b350d
Use live dependency on EFCore.Design
ViktorHofer Mar 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<!-- Disable IsAotCompatible on non-DefaultNetCoreTargetFrameworks even if explicitly enabled or else we'll get NETSDK1210 errors -->
<IsAotCompatible Condition="'$(TargetFramework)' != '$(DefaultNetCoreTargetFramework)'"></IsAotCompatible>
<PackageReadmeFile Condition="'$(PackageReadmeFile)' == '' and Exists('PACKAGE.md')">PACKAGE.md</PackageReadmeFile>
<PackageReadmeFile Condition="'$(PackageReadmeFile)' == '' and Exists('README.md')">README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup Condition="'$(PackageReadmeFile)' != ''">
Expand Down
3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26151.104",
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26151.104"
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26151.104",
"Microsoft.Build.NoTargets": "3.7.0"
}
}
1 change: 0 additions & 1 deletion src/EFCore.Analyzers/EFCore.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\..\rulesets\EFCore.noxmldocs.ruleset</CodeAnalysisRuleSet>
<ImplicitUsings>true</ImplicitUsings>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<PackageReadmeFile>README.md</PackageReadmeFile>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<NoWarn>$(NoWarn);RS1038</NoWarn> <!-- Compiler extensions should be implemented in assemblies with compiler-provided references, #35752 -->
</PropertyGroup>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
58 changes: 35 additions & 23 deletions src/EFCore.Tasks/EFCore.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
<Description>MSBuild tasks for Entity Framework Core projects.</Description>
<AssemblyName>Microsoft.EntityFrameworkCore.Tasks</AssemblyName>
<RootNamespace>Microsoft.EntityFrameworkCore</RootNamespace>
<IncludeSymbols>false</IncludeSymbols>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateDependencyFile>true</GenerateDependencyFile>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<DevelopmentDependency>true</DevelopmentDependency>
<NoWarn>$(NoWarn);NU5100;NU5128</NoWarn>
<ImplicitUsings>true</ImplicitUsings>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\..\rulesets\EFCore.noxmldocs.ruleset</CodeAnalysisRuleSet>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddPackContent</TargetsForTfmSpecificContentInPackage>
<BuildOutputTargetFolder>tasks</BuildOutputTargetFolder>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == '$(NetFrameworkToolCurrent)'">
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
</PropertyGroup>

<ItemGroup>
Expand All @@ -32,6 +35,13 @@
</None>
</ItemGroup>

<ItemGroup>
<None Include="**/*.props;**/*.targets"
Pack="true"
PackagePath="%(RecursiveDir)%(Filename)%(Extension)" />
<None Include="lib/**/*" Pack="true" PackagePath="lib/" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
Expand All @@ -45,7 +55,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ef\ef.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\ef\ef.csproj" ReferenceOutputAssembly="false" PrivateAssets="all" />
<ProjectReference Include="..\EFCore.Design\EFCore.Design.csproj" ReferenceOutputAssembly="true" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
Expand All @@ -54,29 +65,30 @@

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="System.Text.Json" PrivateAssets="All" />
<Reference Include="Microsoft.Build" />
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Configuration" />
<Reference Include="Microsoft.Build" Pack="false" />
<Reference Include="Microsoft.Build.Framework" Pack="false" />
<Reference Include="Microsoft.Build.Utilities.v4.0" Pack="false" />
<Reference Include="Microsoft.CSharp" Pack="false" />
<Reference Include="System.Configuration" Pack="false" />
</ItemGroup>

<!--
Workaround for insufficient support for task packages by NuGet Pack: https://github.com/NuGet/Home/issues/6321
and bugs with ProjectReference: https://github.com/NuGet/Home/issues/10907, https://github.com/NuGet/Home/issues/10312
-->
<PropertyGroup>
<NoPackageAnalysis>true</NoPackageAnalysis>
<NuspecFile>$(MSBuildThisFileDirectory)$(MSBuildProjectName).nuspec</NuspecFile>
</PropertyGroup>
<Target Name="AddPackContent">
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCurrent)'">
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(NetMinimum)/*" PackagePath="tools/$(NetCurrent)" />
<TfmSpecificPackageFile Include="$(OutputPath)$(AssemblyName).deps.json" PackagePath="tasks/$(TargetFramework)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == '$(NetFrameworkToolCurrent)'">
<TfmSpecificPackageFile Include="$(OutputPath)*" Exclude="$(TargetPath);$(TargetDir)$(TargetName).pdb" PackagePath="tasks/$(TargetFramework)" />
</ItemGroup>

<Target Name="SetPackageProperties" BeforeTargets="InitializeStandardNuspecProperties" DependsOnTargets="Build">
<ItemGroup>
<NuspecProperty Include="AssemblyName=$(AssemblyName)" />
<NuspecProperty Include="OutputPath=$(OutputPath)" />
<NuspecProperty Include="NetCurrent=$(NetCurrent)" />
<NuspecProperty Include="NetFrameworkToolCurrent=$(NetFrameworkToolCurrent)" />
<NuspecProperty Include="EFOutputPath=$(ArtifactsBinDir)ef\$(Configuration)\$(NetMinimum)" />
<TfmSpecificDebugSymbolsFile Include="@(TfmSpecificPackageFile->WithMetadataValue('Extension', '.pdb'))"
TargetPath="/%(TfmSpecificPackageFile.PackagePath)/%(Filename)%(Extension)"
TargetFramework="$(TargetFramework)"
Condition="'$(IncludeSymbols)' == 'true'" />
<!-- Remove symbols from the non symbol package. -->
<TfmSpecificPackageFile Remove="@(TfmSpecificPackageFile->WithMetadataValue('Extension', '.pdb'))" />
</ItemGroup>
</Target>

Expand Down
23 changes: 0 additions & 23 deletions src/EFCore.Tasks/EFCore.Tasks.nuspec

This file was deleted.

File renamed without changes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a change to the current package on nuget.org. Why adding a placeholder file?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For same reason as the .Tools package. But this is also likely going to be removed.

Empty file.
File renamed without changes.
71 changes: 39 additions & 32 deletions src/EFCore.Tools/EFCore.Tools.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
<Project>

<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Project Sdk="Microsoft.Build.NoTargets">

<PropertyGroup>
<TargetFramework>$(NetMinimum)</TargetFramework>
<PackageId>Microsoft.EntityFrameworkCore.Tools</PackageId>
<NuspecFile>$(MSBuildThisFileDirectory)$(MSBuildProjectName).nuspec</NuspecFile>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<NoPackageAnalysis>true</NoPackageAnalysis>
<DevelopmentDependency>true</DevelopmentDependency>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSource>false</IncludeSource>
<IncludeSymbols>true</IncludeSymbols>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<Description>Entity Framework Core Tools for the NuGet Package Manager Console in Visual Studio.

Enables these commonly used commands:
Expand All @@ -26,43 +18,58 @@ Remove-Migration
Scaffold-DbContext
Script-Migration
Update-Database
</Description>
<CheckEolTargetFramework>False</CheckEolTargetFramework>
</Description>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddPackContent</TargetsForTfmSpecificContentInPackage>
<!-- Necessary to include pdbs -->
<IncludeBuildOutput>true</IncludeBuildOutput>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ef\ef.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\ef\ef.csproj" />
<!-- Referencing a stub project so that this project can continue targeting NetMinimum but expose a
package dependency to the Design package that targets the current TFM only. -->
<ProjectReference Include="..\stubs\EFCore.Design.csproj" ReferenceOutputAssembly="true" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" PrivateAssets="All" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<GeneratedContent Include="*.psd1.in" />
</ItemGroup>

<!--
Workaround for insufficient support for tools packages by NuGet Pack: https://github.com/NuGet/Home/issues/6321.
-->
<Target Name="SetPackageProperties" BeforeTargets="InitializeStandardNuspecProperties" DependsOnTargets="Build">
<ItemGroup>
<NuspecProperty Include="configuration=$(Configuration)" />
<NuspecProperty Include="intermediateOutputPath=$(IntermediateOutputPath)" />
<NuspecProperty Include="targetFramework=$(TargetFramework)" />
</ItemGroup>
</Target>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="GenerateContent"
BeforeTargets="GenerateNuspec"
Inputs="$(MSBuildAllProjects);@(GeneratedContent)"
Outputs="@(GeneratedContent->'$(IntermediateOutputPath)%(FileName)'">
<GenerateFileFromTemplate TemplateFile="%(GeneratedContent.Identity)" Properties="VersionPrefix=$(VersionPrefix)" OutputPath="$(IntermediateOutputPath)%(FileName)" />
Outputs="@(GeneratedContent->'$(IntermediateOutputPath)%(FileName)')">
<GenerateFileFromTemplate
TemplateFile="%(GeneratedContent.Identity)"
Properties="VersionPrefix=$(VersionPrefix)"
OutputPath="$(IntermediateOutputPath)%(FileName)" />
</Target>

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
<Target Name="AddPackContent" DependsOnTargets="GenerateContent">
<ItemGroup>
<TfmSpecificPackageFile Include="lib/**/*" PackagePath="lib/" />
<TfmSpecificPackageFile Include="tools/**/*" PackagePath="tools/" />
<TfmSpecificPackageFile Include="$(IntermediateOutputPath)*.psd1" PackagePath="tools/" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/net472/*" PackagePath="tools/net472/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/x86/$(Configuration)/net472/*" PackagePath="tools/net472/win-x86" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/ARM64/$(Configuration)/net472/*" PackagePath="tools/net472/win-arm64" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.dll" PackagePath="tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.runtimeconfig.json" PackagePath="tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.pdb" PackagePath="tools/$(TargetFramework)/any" />
</ItemGroup>

<ItemGroup>
<TfmSpecificDebugSymbolsFile Include="@(TfmSpecificPackageFile->WithMetadataValue('Extension', '.pdb'))"
TargetPath="/%(TfmSpecificPackageFile.PackagePath)/%(Filename)%(Extension)"
TargetFramework="$(TargetFramework)"
Condition="'$(IncludeSymbols)' == 'true'" />
<!-- Remove symbols from the non symbol package. -->
<TfmSpecificPackageFile Remove="@(TfmSpecificPackageFile->WithMetadataValue('Extension', '.pdb'))" />
</ItemGroup>
</Target>

</Project>
29 changes: 0 additions & 29 deletions src/EFCore.Tools/EFCore.Tools.nuspec

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 13 additions & 25 deletions src/dotnet-ef/dotnet-ef.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetMinimum)</TargetFramework>
<Description>
Entity Framework Core Tools for the .NET Command-Line Interface.

Expand All @@ -13,18 +14,14 @@
dotnet ef database drop
dotnet ef database update
</Description>
<TargetFramework>$(NetMinimum)</TargetFramework>
<OutputType>Exe</OutputType>
<PackAsTool>true</PackAsTool>
<PackAsToolShimRuntimeIdentifiers>win-x64;win-x86;win-arm64</PackAsToolShimRuntimeIdentifiers>
<!-- Because this project uses a custom nuspec, this is necessary to ensure the generated shims are in the publish directory. -->
<PackagedShimOutputRootDirectory>$(OutDir)</PackagedShimOutputRootDirectory>
<RootNamespace>Microsoft.EntityFrameworkCore.Tools</RootNamespace>
<IncludeSource>false</IncludeSource>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<RollForward>Major</RollForward>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\..\rulesets\EFCore.noxmldocs.ruleset</CodeAnalysisRuleSet>
<ImplicitUsings>true</ImplicitUsings>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddEfProjectOutput</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>

<ItemGroup>
Expand All @@ -48,7 +45,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ef\ef.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\ef\ef.csproj" ReferenceOutputAssembly="false" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand All @@ -70,26 +67,17 @@
</Compile>
</ItemGroup>

<Target Name="SetPackageProperties" BeforeTargets="InitializeStandardNuspecProperties" DependsOnTargets="BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup">
<PropertyGroup>
<!-- Make sure we create a symbols.nupkg. -->
<IncludeSymbols>true</IncludeSymbols>
</PropertyGroup>

<!-- PDBs are currently always included as PackAsTool packages don't support excluding them.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is the reason why I had added the workaround to build the symbols package in the second pass

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary to do anything here. This is the same as the latest released package on nuget.org. When the sdk issue will be adressed, efcore will automatically benefit.

https://github.com/dotnet/sdk/issues/53226 -->
<Target Name="AddEfProjectOutput">
<ItemGroup>
<NuspecProperty Include="targetFramework=$(TargetFramework)" />
<NuspecProperty Include="SettingsFile=$(_ToolsSettingsFilePath)" />
<!-- https://github.com/dotnet/msbuild/issues/10715. %2A replaces * working around an issue building Linux. -->
<NuspecProperty Include="Output=$(PublishDir)%2A%2A/%2A" />
<NuspecProperty Include="OutputBinary=..\..\artifacts\bin\ef\$(Configuration)\$(TargetFramework)\ef.dll" />
<NuspecProperty Include="OutputRuntimeConfig=..\..\artifacts\bin\ef\$(Configuration)\$(TargetFramework)\ef.runtimeconfig.json" />
<NuspecProperty Include="OutputSymbol=..\..\artifacts\bin\ef\$(Configuration)\$(TargetFramework)\ef.pdb" />
<NuspecProperty Include="OutputExe=..\..\artifacts\bin\ef\$(Configuration)\net472\ef.exe" />
<NuspecProperty Include="OutputExeSymbol=..\..\artifacts\bin\ef\$(Configuration)\net472\ef.pdb" />
<NuspecProperty Include="OutputX86Exe=..\..\artifacts\bin\ef\x86\$(Configuration)\net472\ef.exe" />
<NuspecProperty Include="OutputX86ExeSymbol=..\..\artifacts\bin\ef\x86\$(Configuration)\net472\ef.pdb" />
<NuspecProperty Include="OutputARM64Exe=..\..\artifacts\bin\ef\ARM64\$(Configuration)\net472\ef.exe" />
<NuspecProperty Include="OutputARM64ExeSymbol=..\..\artifacts\bin\ef\ARM64\$(Configuration)\net472\ef.pdb" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.dll" PackagePath="tools/$(TargetFramework)/any/tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.runtimeconfig.json" PackagePath="tools/$(TargetFramework)/any/tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/$(TargetFramework)/ef.pdb" PackagePath="tools/$(TargetFramework)/any/tools/$(TargetFramework)/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/$(Configuration)/net472/*" PackagePath="tools/$(TargetFramework)/any/tools/net472/any" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/x86/$(Configuration)/net472/*" PackagePath="tools/$(TargetFramework)/any/tools/net472/win-x86" />
<TfmSpecificPackageFile Include="$(ArtifactsBinDir)ef/ARM64/$(Configuration)/net472/*" PackagePath="tools/$(TargetFramework)/any/tools/net472/win-arm64" />
</ItemGroup>
</Target>

</Project>
Loading
Loading