-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add build utils to simplify local package sharing #77822
base: main
Are you sure you want to change the base?
Conversation
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.
@@ -286,6 +286,14 @@ | |||
<Warning Condition="'%(RestrictedInternalsVisibleTo.Partner)' == '' and '%(RestrictedInternalsVisibleTo.Namespace)' == ''" Text="RestrictedInternalsVisibleTo items must specify the 'Partner' or 'Namespace' attribute. Target assembly: %(Identity)" /> | |||
</Target> | |||
|
|||
<!-- | |||
Deletes the package built by this project from local NuGet cache (if present). | |||
Allows refreshing locally built Roslyn packages consumed by another local repo. |
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.
Alternative (I think a better one because it works in other repos and maybe more scenarios) is to specify VersionSuffix when packing, I usually do
.\build.cmd -pack /p:VersionSuffix=$(git rev-parse --short HEAD)
That produces a uniquely versioned package.
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'd need to keep updating the version in the other repository with every build though. It also requires building from command line - which is another extra step.
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.
Burn this with fire. Do not touch my NuGet folder without explicit permission.
Whatever you are trying to do, there are ways to do it. This is not one of those ways.
@sharwell |
Specifically, deleting a package version from the cache doesn't break anything. If a build needs that version it will redownload the package from the sources. |
Automatically deletes package built by a project from NuGet cache. This allows build from another repo to use Roslyn package output dir as a package source without manually cleaning up packages for every Roslyn change.
Imports
Settings.user.props
fromSettings.props
to allow devs to locally override properties, such asVSSDKTargetPlatformRegRootSuffix
.Adds
*.user.props
to.gitignore
to keep it local.