-
Notifications
You must be signed in to change notification settings - Fork 78
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
Remove TargetFramework requirement from Microsoft.Build.NoTargets SDK #368
Comments
The One way around this is to set a value for <Project>
<PropertyGroup>
<!--
Set TargetFramework to net6.0 for all projects using Microsoft.Build.NoTargets so that each project
doesn't need to declare it
-->
<TargetFramework Condition="'$(UsingMicrosoftNoTargetsSdk)' == 'true'">net6.0</TargetFramework>
</PropertyGroup>
</Project> If we could get consensus on what the default TargetFramework should be for everyone, I'm open to adding to |
Thanks for the backstory. Sounds like doing it more right would involve bigger changes and/or a "copy and modify" of the existing SDK. But it would provide a couple benefits I could use:
It seems like there's good potential for the NoTargets SDK, but it could use more refinement to avoid confusion and hard-to-read workarounds. |
It seems like If the target framework continues to be configurable by the user's project that uses |
Having a default target framework is different than not requiring one, such as the NuGet dependencies example in my comment. I'd rather it be explicit than pretend it isn't a requirement but it is (just defaulted). |
@JVimes You can use |
@kkirkfield, it also removes any dependency from the package. Handwriting a nuspec is easy. I can even replace tokens using nuget.exe. But managing dependencies using any tooling is not possible for handwriting a nuspec. Maybe what's missing is a |
Alternatively - there is an ambient property in the SDK called This property is set in the installer when creating the SDK bundles and has been around for several versions. |
But that still defines a TFM. Right, @baronfel? |
The NoTargets SDK seems to require
TargetFramework
. Without it I get:Can that requirement be removed? The readme says NoTargets is "useful for utility projects that just copy files, build packages, or any other function where an assembly is not compiled". I have no need for a target framework in my case, and have dependency packages that should not be tied to a target framework either.
The text was updated successfully, but these errors were encountered: