-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Various SDK build fixes within VS #49748
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
base: main
Are you sure you want to change the base?
Conversation
… NoWarn for NU5039. Added -ExecutionPolicy Bypass for calls to PowerShell. Added blank GetTargetPath to sdk-tasks.csproj. Other minor cleanup.
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.
Pull Request Overview
Addresses several build and tooling issues when performing a full rebuild in Visual Studio by renaming project files for VS compatibility, suppressing new NuGet warnings, ensuring PowerShell scripts run under restrictive execution policies, and adding a helper script for runtime copying.
- Rename
manifest-packages.proj
→manifest-packages.csproj
and update all references. - Suppress additional NuGet warnings (
NU5039
) and add-ExecutionPolicy Bypass
to MSI-generation scripts. - Introduce an empty
GetTargetPath
MSBuild target and add a newcopy-runtime.ps1
script to copy built runtimes into Program Files.
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
test/Microsoft.DotNet.PackageValidation.Tests/*.csproj | Added Microsoft.CodeAnalysis.CSharp package reference |
test/Directory.Build.props | Combined and clarified NoWarn entries for NU5125/NU5123 |
src/Workloads/VSInsertion/workloads.csproj | Updated <ProjectReference> to point at .csproj file |
src/Workloads/Manifests/Directory.Build.props | Added NU5039 to NoWarn |
src/Tasks/sdk-tasks/sdk-tasks.csproj | Added stub <Target Name="GetTargetPath" /> |
src/Layout/redist/targets/GenerateMSIs.targets | Added -ExecutionPolicy Bypass to PowerShell <Exec> commands |
src/Layout/redist/targets/BundledManifests.targets | Updated MSBuild project path to .csproj |
src/Layout/redist/redist.csproj | Updated <ProjectReference> to .csproj |
sdk.slnx | Updated solution entry for manifest-packages.csproj |
eng/copy-runtime.ps1 | New admin-run PowerShell script to copy built runtime into Program Files |
Directory.Build.props | Added NU5039 to root NoWarn |
.vsconfig | New Visual Studio configuration file |
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(RepoRoot)src\Compatibility\ApiCompat\Microsoft.DotNet.PackageValidation\Microsoft.DotNet.PackageValidation.csproj" /> | ||
<ProjectReference Include="..\Microsoft.NET.TestFramework\Microsoft.NET.TestFramework.csproj" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" /> |
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.
I just moved this into the ItemGroup that is for PackageReferences. Not sure why it was here to begin with.
Builds on: #49746
Summary
After trying to do "Rebuild All" within VS for the repo, I ran into a bunch of problems. This should address some of them.
Various fixes:
manifest-packages.proj
tomanifest-packages.csproj
for VS compatibilityNU5039
to NoWarn since we get this warning for all the packages we make-ExecutionPolicy Bypass
since you cannot build the redist project if your PowerShell is set to Restricted ExecutionPolicy (default on new Windows installs)GetTargetPath
target to sdk-tasks.csproj as it was complaining about it when trying to rebuild