-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Import from SDKs #1400
Comments
Similar for |
As a workaround, I'm currently using Without it not even AfterBuild was working, presumably because the implicit target import just redefined it. |
@gulbanana this is addressed in the newer implementation which is in PR now: #1492 |
Great, I'll try it again in a later build. |
Any idea if #1492 is available on dotnet-cli dev builds? |
@codito Yes, it should be. Note that sometimes the "latest" link on the CLI homepage isn't actually the very latest. |
I can confirm the fix is available on dotnet-cli |
Closing since this is implemented. On further reflection, I don't think this is needed for |
It works great on VS2017 RTW without specifying an SDK version, like so: <Project>
<Import Project="SampleVsix.props" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net462;net461</TargetFrameworks>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Import Project="SampleVsix.targets" />
</Project> |
This works for me as well. And in fact I have exactly the same scenario: A VSIX project that must import the language targets before the VSSDK targets. |
This is related to #1392, but not a prerequisite for it.
It's currently difficult to determine what the path of an
<Import>
should be, because it requires knowing how to locate the file to be imported, using properties and relative paths.#1392 introduces the concept of an "SDK" in order to automatically import an
Sdk.props
before the user project and anSdk.targets
after it. But that's often not sufficiently granular: sometimes you need to override a target (so your definition must be ordered after the imported one), or set a property before importing an initial target.Design
Should be syntactic sugar for something like
This is a) easier to type than the existing mechanism requiring a rooted path and b) doesn't lose any generality, as #1392 does.
The text was updated successfully, but these errors were encountered: