-
Notifications
You must be signed in to change notification settings - Fork 379
Open
Description
- This issue is blocking
- This issue is causing unreasonable pain
Running dotnet build doesn't produce a VSIX, only the full framework msbuild.exe does. That's because Core MSBuild is disabled here:
| <Import Project="VisualStudio.targets" Condition="'$(UsingToolVSSDK)' == 'true' and ('$(IsVsixProject)' == 'true' or '$(IsSwixProject)' == 'true' or '$(GeneratePkgDefFile)' == 'true') and '$(MSBuildRuntimeType)' != 'Core'"/> |
I'm not sure what's the reason for that because having something like the following in the project file makes dotnet build produce vsix as well:
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<VsixVersion Condition="'$(VsixVersion)' == ''">42.42.42.4242424</VsixVersion>
<DeployExtension Condition="'$(MSBuildRuntimeType)' == 'Core'">false</DeployExtension>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Sdk" />
<PackageReference Include="Microsoft.VSSDK.BuildTools" PrivateAssets="all" />
</ItemGroup>
<Target Name="GetVsixVersion" Returns="$(VsixVersion)">
<PropertyGroup>
<VsixVersion Condition="'$(VersionSuffixDateStamp)' != ''">$(VersionPrefix).$(VersionSuffixDateStamp)$(VersionSuffixBuildOfTheDayPadded)</VsixVersion>
</PropertyGroup>
</Target>
<!-- Order matters here. VSSDK appends to PrepareForRunDependsOn but Microsoft.NET.Sdk overwrites it. See https://github.com/dotnet/msbuild/issues/2393. -->
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="Exists('$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets') and '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64'" />
</Project>Metadata
Metadata
Assignees
Labels
No labels