Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

[Regression] EditorConfig templates are missing their display name #167

Closed
davkean opened this issue Aug 22, 2019 · 23 comments
Closed

[Regression] EditorConfig templates are missing their display name #167

davkean opened this issue Aug 22, 2019 · 23 comments
Assignees

Comments

@davkean
Copy link
Member

davkean commented Aug 22, 2019

Version Used:
Version 16.3.0 Preview 3.0 [29221.207.master]

Steps to Reproduce:

Expected Behavior:
image

Actual Behavior:

16.2:
image

@davkean
Copy link
Member Author

davkean commented Aug 22, 2019

Same for VB:

image

tag @tmeschter @jasonmalinowski

@jasonmalinowski

This comment has been minimized.

@jasonmalinowski jasonmalinowski self-assigned this Aug 22, 2019
@tmeschter

This comment has been minimized.

@sharwell sharwell transferred this issue from dotnet/roslyn Aug 22, 2019
@jasonmalinowski jasonmalinowski removed their assignment Aug 23, 2019
@jasonmalinowski
Copy link
Member

@davkean @tmeschter So who does this bug get assigned to then?

@davkean
Copy link
Member Author

davkean commented Aug 23, 2019

Who owns this?

@jasonmalinowski
Copy link
Member

I was hoping you knew. This is a repo I didn't really know existed. :-)

@tmeschter
Copy link

Project system owns this.

@tmeschter
Copy link

@jmarolf Any idea what might be wrong here?

@jmarolf
Copy link

jmarolf commented Aug 23, 2019

dunno, I haven't changed anything in setup for over a year. For item templates to show up in the default items category and work, they need to be copied to the Common7\IDE\NewFileItems folder. The only way I know how to do that is with a vsdir file.

So the name for the item template should either be coming from this vsdir or this template file.

Can we confirm that this package from here is being installed/deployed?

I expect this resource string to load:

@davkean
Copy link
Member Author

davkean commented Aug 24, 2019

I compared the working version against the new version and they are identical apart from a version number changing 15.8.0.0 -> 16.3.0.0 in the dll. The package (looks) to be installed.

Working:
image

Non-working:
image

@davkean
Copy link
Member Author

davkean commented Aug 24, 2019

Can other folks repro this?

@jmarolf
Copy link

jmarolf commented Aug 24, 2019

@davkean I can, I'll take a look on monday. There must be something I am not seeing that has changed

@jasonmalinowski
Copy link
Member

I can repro this too, so absolutely a bug.

@jmarolf
Copy link

jmarolf commented Aug 31, 2019

This bug is caused by this setting not being respected during compilation:

What is in the file:

"CodeBase"="$PackageFolder$\Microsoft.VisualStudio.Templates.Editorconfig.Wizard.Setup.dll"

What gets installed:

"Assembly"="Microsoft.VisualStudio.Templates.Editorconfig.Wizard.Setup, Version=16.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

@jmarolf
Copy link

jmarolf commented Aug 31, 2019

I assume that this is because this target does not exist in arcade?

<Target Name="PkgdefProjectOutputGroup" Outputs="@(PkgdefOutputGroupOutput)">
<ItemGroup>
<PkgdefOutputGroupOutput Include="ResourcePackage.pkgdef" />
</ItemGroup>
</Target>

@tmat what is the correct way to include a pkgdef file in arcade?

@jasonmalinowski
Copy link
Member

The PkgdefOutputGroup is only needed if you're doing generation automatically; if you're manually specifying it then you can just directly state it your .vsixmanifest.

If you're seenig it switch from Codebase to Assembly, that leads me to believe that either:

  1. You're not specifying UseCodebase somewhere and want generation, or
  2. You don't want generation at all, but are for some reason unintentionally using generation.

@dmonroym
Copy link
Member

@jasonmalinowski Is there any reason for this behavior to have changed if this code's not been changed in a while?

With regard to your comments:

You're not specifying UseCodebase somewhere and want generation

From what I'm seeing if I try specifying UseCodebase I get the following error: UseCodebase should not be true for VSIX project that turns NGEN on

You don't want generation at all, but are for some reason unintentionally using generation.

Is there any way to validate if we're using generation?

@jmarolf
Copy link

jmarolf commented Sep 11, 2019

Is there any reason for this behavior to have changed if this code's not been changed in a while?

This is likely an arcade change.

We generate a pkgdef for a VSIX and include an manually created pkgdef because solution items are not supported by the VS SDK.

I assume this is not supported in arcade

@jasonmalinowski
Copy link
Member

So things being loaded by a CodeBase causes issues with ngen images; Roslyn for example doesn't have a Codebase entry in our Packages key, it does point to the assembly name. Then there's also an attribute that says when loading our assembly where to find it. That explains Arcade's message: if you're ngenning, you need to use the Assembly one and have the additional entry.

manually created pkgdef because solution items are not supported by the VS SDK.

What do you mean? Your pkgdef is just defining a generic package, there's nothing special about it. I'm not sure why you wouldn't be generating it...

@jmarolf
Copy link

jmarolf commented Sep 12, 2019

Looking at this, its likely this was always wrong and it was only happenstance that the correct pkgdef was selected. @jasonmalinowski what is the right attribute / assets specification to get this to be generated?

[$RootKey$\Packages\{A435156A-8EA1-4A32-BC2E-118681C4DEE8}]
@="ResourcePackage"
"InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL"
"Class"="EditorconfigResourcePackage.EditorconfigResourcePackage"
"CodeBase"="$PackageFolder$\Microsoft.VisualStudio.Templates.Editorconfig.Wizard.Setup.dll"
"AllowsBackgroundLoad"=dword:00000001

@jasonmalinowski
Copy link
Member

You've already got this:

[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[InstalledProductRegistration("#110", "#112", "1.0")]
[Guid(PackageGuidString)]

Which will spit the package node like that; you'll want to remove the InstalledProductRegistration though or else you'll have a useless entry in Help > About.

If you really want a CodeBase attribute though you'll then need to set UseCodebase = true, and then turn off ngen because Arcade is otherwise going to complain. If the package is indeed only providing resources, then I can't imagine ngen is actually going to help anything...

@davkean
Copy link
Member Author

davkean commented Sep 13, 2019

We resolved this, and ended up taking that approach while deleting the "hand-coded" pkgdef. I also saw the InstalledProductRegistation and made exactly the same comment. :)

@davidwengier
Copy link

Fixed in #167

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants