Skip to content
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

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

Open
sebandraos opened this issue Jul 6, 2015 · 6 comments

Comments

@sebandraos
Copy link

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
Copy link
Member

sharwell commented Jul 7, 2015

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

@sebandraos
Copy link
Author

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
Copy link
Member

sharwell commented Jul 7, 2015

@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. 👍

On a separate note, great investigation there!

📝 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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

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

No branches or pull requests

2 participants