tunnelvisionlabs / LangSvcV2

"Language Service V2" reference repository
Other
86 stars 38 forks source link

Incomplete New Items options when creating Portable Class Libraries in VS2013 #61

Open sebandraos opened 9 years ago

sebandraos commented 9 years ago

Hi (Again) Sam, When attempting to add a new item in a PCL solution I'm not being presented the same new item list (with ANTLR Grammars etc.). I have the ANTLR extension, ANTLR4.Runtime and ANTLR4 from NuGet. This seems like an odd behaviour because I do get the full list when creating another type of solution e.g. a Console Application and even (non-portable) Class Libraries. Thanks in advance for any suggestions, Seb

sharwell commented 9 years ago

I'm thinking this might have something to do with this line found in each of the templates.

sebandraos commented 9 years ago

I think you might be right. I've been digging around and it seems that this may be overcome with the addition of(1) CSharp + MultiTarget or (CSharp) | (CSharp + MultiTarget) in . That said I haven't been able to test this because it's a feature added in 2013 Update 2 and despite attempting to upgrade some of the VSSDK packages in the project there are dependencies to VSSDK.XXX.10 and NuGet isn't allowing them to happen because the .10 versions ?arent compatible? with the latest VSSDK packages. I must admit this is far from being my area of expertise so maybe I'm just missing something really obvious but this addition may also run the risk of breaking 2010 compatibility.

(1) https://social.msdn.microsoft.com/Forums/vstudio/en-US/8ecb51d9-a53e-4078-a47f-0195ea98cf6d/create-item-template-for-portable-class-library-pcl?forum=vsx and https://msdn.microsoft.com/en-us/library/dn497698.aspx

sharwell commented 9 years ago

@sebandraos You should not need to change any VSSDK packages in order to target Visual Studio 2013. Assuming you have set up your working environment as described below, just open the solution in Visual Studio 2013 and press F5. :+1:

On a separate note, great investigation there!

:memo: It seems the strong name key used by this project isn't in source control. To create one locally that will work, do the following:

  1. Open a Visual Studio command prompt
  2. Navigate to the folder containing SimpleC.sln
  3. Run cd External
  4. Run sn -k Key.snk

You will also need to install the Visual Studio 2013 SDK (since that is the environment you are testing in).

sebandraos commented 9 years ago

Thanks for the incredibly quick replies Sam, much appreciated. I apologise if the previous message was a bit confused, was trying to be as concise as possible. I had the VisualStudio 2013 SDK and the missing key was flagged the first time I tried to build so had done that as well. So far so good and the ANTLR .vsix builds fine and installs exactly like the original (2010, 2013 and 2015 RC). The reason I was looking at the 2013 specific stuff was the addition of which I can't currently add to the existing templates. Updated bad formatting in my previous post, the two elements after (1) were supposed to read CSharp + MultiTarget or (CSharp) | (CSharp + MultiTarget)

sebandraos commented 9 years ago

In fact it seems to be totally unrelated to LangSvc2... http://stackoverflow.com/questions/28497149/visual-studio-custom-item-templates-for-pcls But nobody has answered there. I'm not sure if that closes the issue here but I will update if I find a solution anyway.

sebandraos commented 8 years ago

Hi Sam, I've just had a look at this again. I'm not entirely sure what the issue was but the additions I suggested before work absolutely fine. I've committed a massive 7 lines to my fork and can submit a pull request if need be. My only concern is not knowing how templates treat compatibility, given that AppliesTo was introduced in VS2013.2 I'm not sure how 2010 would handle it and unfortunately I don't have 2010 to test