-
Notifications
You must be signed in to change notification settings - Fork 1.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
Allow to skip all project targets based on a property value #2071
Comments
One option is to filter projects from the solution metaproject: dotnet/msbuild#1730 (comment). |
Agreed we need this sort of feature. The bit of boilerplate I've used is the following. Properties set might differ depending on what you want it to do. Make sure the name of this is <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<!-- don't reference the framework -->
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<!-- don't copy any build assets -->
<SkipCopyBuildProduct>true</SkipCopyBuildProduct>
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<!-- don't generate a deps file -->
<GenerateDependencyFile>false</GenerateDependencyFile>
<!-- set TargetPath to a bogus value so it doesn't look like we're producing anything -->
<TargetPath>NOTHING</TargetPath>
</PropertyGroup>
<!-- required by common targets, define them but have them do nothing -->
<Target Name="CreateManifestResourceNames" />
<Target Name="CoreCompile" />
<!-- Import design time targets for Roslyn Project System. These are only available if Visual Studio is installed. -->
<!-- Required for project to load in Visual Studio. -->
<PropertyGroup>
<ManagedDesignTimeTargetsPath Condition="'$(ManagedDesignTimeTargetsPath)'==''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets</ManagedDesignTimeTargetsPath>
</PropertyGroup>
<Import Project="$(ManagedDesignTimeTargetsPath)" Condition="'$(ManagedDesignTimeTargetsPath)' != '' and Exists('$(ManagedDesignTimeTargetsPath)')" />
</Project> |
…118.1 (#2071) [main] Update dependencies from dotnet/arcade
Enable project to set a property during evaluation phase that suppresses all targets, including Restore, Build, Pack, etc.
Use cases:
Existing workarounds:
The text was updated successfully, but these errors were encountered: